Add Class to discover all switchbots, all curtain bots or all bot. By RenierM26
-Added discovery method.
-All updates are now handled by single advertisement scan.
This should allow discovery and coordinator based updates in hass integration.
model number (first byte of 16b service data):
"c" = Curtain
"H" = WoHand or otherwise known as bot.
"T" = woSensorTH or otherwise known as temp/humidity sensor. (I don't have one and can't test the output)
Returns python dict with all device data of type with single scan.
Example of single curtain (json formated - easier to format in notepad ++):
"fd8082999999": {
"mac_address": "fd:80:82:99:99:99",
"Flags": "06",
"Manufacturer": "5900fd8082c51181",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"data": {
"calibration": true,
"battery": 57,
"position": 98,
"lightLevel": 2,
"rssi": -68
},
"model": "c",
"modelName": "WoCurtain"
},
Returns python dict with all device data of type with single scan.
Example of returned data for switchbot bot(json formatted - easier to format in notepad ++):
"e78943999999": {
"mac_address": "e7:89:43:99:99:99",
"Flags": "06",
"Manufacturer": "5900e78943d9fe7c",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"data": {
"switchMode": true,
"isOn": true,
"battery": 91,
"rssi": -71
},
"model": "H",
"modelName": "WoHand"
},