Switchbot bump api version (#59398)

* Bump Switchbot api for reliability improvements.

* Bump api version, update mock test import to reflect api data changes.
This commit is contained in:
RenierM26 2021-11-09 08:01:05 +02:00 committed by GitHub
parent 012e005e0d
commit 121a0915bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 22 deletions

View file

@ -2,7 +2,7 @@
"domain": "switchbot",
"name": "SwitchBot",
"documentation": "https://www.home-assistant.io/integrations/switchbot",
"requirements": ["PySwitchbot==0.12.0"],
"requirements": ["PySwitchbot==0.13.0"],
"config_flow": true,
"codeowners": ["@danielhiversen", "@RenierM26"],
"iot_class": "local_polling"

View file

@ -46,7 +46,7 @@ PyRMVtransport==0.3.3
PySocks==1.7.1
# homeassistant.components.switchbot
# PySwitchbot==0.12.0
# PySwitchbot==0.13.0
# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1

View file

@ -24,7 +24,7 @@ PyQRCode==1.2.1
PyRMVtransport==0.3.3
# homeassistant.components.switchbot
# PySwitchbot==0.12.0
# PySwitchbot==0.13.0
# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1

View file

@ -14,45 +14,42 @@ class MocGetSwitchbotDevices:
self._all_services_data = {
"e78943999999": {
"mac_address": "e7:89:43:99:99:99",
"Flags": "06",
"Manufacturer": "5900e78943d9fe7c",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"isEncrypted": False,
"model": "H",
"data": {
"switchMode": "true",
"isOn": "true",
"battery": 91,
"rssi": -71,
},
"model": "H",
"modelName": "WoHand",
},
"e78943909090": {
"mac_address": "e7:89:43:90:90:90",
"Flags": "06",
"Manufacturer": "5900e78943d9fe7c",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"isEncrypted": False,
"model": "c",
"data": {
"calibration": True,
"battery": 74,
"inMotion": False,
"position": 100,
"lightLevel": 2,
"deviceChain": 1,
"rssi": -73,
},
"model": "c",
"modelName": "WoCurtain",
},
"ffffff19ffff": {
"mac_address": "ff:ff:ff:19:ff:ff",
"Flags": "06",
"Manufacturer": "5900ffffff19ffff",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"isEncrypted": False,
"model": "m",
"rawAdvData": "000d6d00",
},
}
self._curtain_all_services_data = {
"mac_address": "e7:89:43:90:90:90",
"Flags": "06",
"Manufacturer": "5900e78943d9fe7c",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"isEncrypted": False,
"model": "c",
"data": {
"calibration": True,
"battery": 74,
@ -60,21 +57,18 @@ class MocGetSwitchbotDevices:
"lightLevel": 2,
"rssi": -73,
},
"model": "c",
"modelName": "WoCurtain",
}
self._unsupported_device = {
"mac_address": "test",
"Flags": "06",
"Manufacturer": "5900e78943d9fe7c",
"Complete 128b Services": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"isEncrypted": False,
"model": "HoN",
"data": {
"switchMode": "true",
"isOn": "true",
"battery": 91,
"rssi": -71,
},
"model": "HoN",
"modelName": "WoOther",
}