PySwitchbot 0.57.0__tar.gz → 0.57.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PKG-INFO +1 -1
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/PKG-INFO +1 -1
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/setup.py +1 -1
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parser.py +2 -8
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_adv_parser.py +0 -25
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/LICENSE +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/MANIFEST.in +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/SOURCES.txt +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/dependency_links.txt +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/requires.txt +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/top_level.txt +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/README.md +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/pyproject.toml +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/setup.cfg +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/__init__.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/__init__.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/blind_tilt.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/bot.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/bulb.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/ceiling_light.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/contact.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/curtain.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/hub2.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/humidifier.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/keypad.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/leak.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/light_strip.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/lock.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/meter.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/motion.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/plug.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/relay_switch.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/remote.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/api_config.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/__init__.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/evaporative_humidifier.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/lock.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/__init__.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/base_cover.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/base_light.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/blind_tilt.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/bot.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/bulb.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/ceiling_light.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/contact.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/curtain.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/device.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/evaporative_humidifier.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/humidifier.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/keypad.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/light_strip.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/lock.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/meter.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/motion.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/plug.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/relay_switch.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/discovery.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/enum.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/helpers.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/models.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_base_cover.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_blind_tilt.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_curtain.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_evaporative_humidifier.py +0 -0
- {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_relay_switch.py +0 -0
|
@@ -41,8 +41,6 @@ SERVICE_DATA_ORDER = (
|
|
|
41
41
|
)
|
|
42
42
|
MFR_DATA_ORDER = (2409, 741, 89)
|
|
43
43
|
|
|
44
|
-
APPLE_MANUFACTURER_ID = 76
|
|
45
|
-
|
|
46
44
|
|
|
47
45
|
class SwitchbotSupportedType(TypedDict):
|
|
48
46
|
"""Supported type of Switchbot."""
|
|
@@ -250,14 +248,10 @@ def parse_advertisement_data(
|
|
|
250
248
|
|
|
251
249
|
_mfr_data = None
|
|
252
250
|
_mfr_id = None
|
|
253
|
-
manufacturer_data = advertisement_data.manufacturer_data
|
|
254
|
-
if APPLE_MANUFACTURER_ID in manufacturer_data:
|
|
255
|
-
return None
|
|
256
|
-
|
|
257
251
|
for mfr_id in MFR_DATA_ORDER:
|
|
258
|
-
if mfr_id in manufacturer_data:
|
|
252
|
+
if mfr_id in advertisement_data.manufacturer_data:
|
|
259
253
|
_mfr_id = mfr_id
|
|
260
|
-
_mfr_data = manufacturer_data[mfr_id]
|
|
254
|
+
_mfr_data = advertisement_data.manufacturer_data[mfr_id]
|
|
261
255
|
break
|
|
262
256
|
|
|
263
257
|
if _mfr_data is None and _service_data is None:
|
|
@@ -1970,28 +1970,3 @@ def test_remote_passive() -> None:
|
|
|
1970
1970
|
rssi=-97,
|
|
1971
1971
|
active=False,
|
|
1972
1972
|
)
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
def test_parse_advertisement_ignores_devices_with_apple_manufacturer_id():
|
|
1976
|
-
"""Test parse_advertisement_data ignores devices with apple manufacturer id."""
|
|
1977
|
-
ble_device = generate_ble_device("aa:bb:cc:dd:ee:ff", "any")
|
|
1978
|
-
adv_data = generate_advertisement_data(
|
|
1979
|
-
local_name="WoCurtain",
|
|
1980
|
-
manufacturer_data={
|
|
1981
|
-
89: b"\xcc\xf4\xc4\xf9\xacl",
|
|
1982
|
-
2409: b"\xcc\xf4\xc4\xf9\xacl\xe2\x0f\x00\x12\x04",
|
|
1983
|
-
76: b"\x10",
|
|
1984
|
-
},
|
|
1985
|
-
service_data={
|
|
1986
|
-
"00000d00-0000-1000-8000-00805f9b34fb": b"c\xd0Yd\x11\x04",
|
|
1987
|
-
"0000fd3d-0000-1000-8000-00805f9b34fb": b"c\xc0d\x00\x12\x04",
|
|
1988
|
-
},
|
|
1989
|
-
service_uuids=[
|
|
1990
|
-
"00001800-0000-1000-8000-00805f9b34fb",
|
|
1991
|
-
"00001801-0000-1000-8000-00805f9b34fb",
|
|
1992
|
-
"cba20d00-224d-11e6-9fb8-0002a5d5c51b",
|
|
1993
|
-
],
|
|
1994
|
-
rssi=-2,
|
|
1995
|
-
)
|
|
1996
|
-
result = parse_advertisement_data(ble_device, adv_data)
|
|
1997
|
-
assert result is None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|