|
@@ -41,8 +41,6 @@ SERVICE_DATA_ORDER = (
|
|
)
|
|
)
|
|
MFR_DATA_ORDER = (2409, 741, 89)
|
|
MFR_DATA_ORDER = (2409, 741, 89)
|
|
|
|
|
|
-APPLE_MANUFACTURER_ID = 76
|
|
|
|
-
|
|
|
|
|
|
|
|
class SwitchbotSupportedType(TypedDict):
|
|
class SwitchbotSupportedType(TypedDict):
|
|
"""Supported type of Switchbot."""
|
|
"""Supported type of Switchbot."""
|
|
@@ -250,14 +248,10 @@ def parse_advertisement_data(
|
|
|
|
|
|
_mfr_data = None
|
|
_mfr_data = None
|
|
_mfr_id = None
|
|
_mfr_id = None
|
|
- manufacturer_data = advertisement_data.manufacturer_data
|
|
|
|
- if APPLE_MANUFACTURER_ID in manufacturer_data:
|
|
|
|
- return None
|
|
|
|
-
|
|
|
|
for mfr_id in MFR_DATA_ORDER:
|
|
for mfr_id in MFR_DATA_ORDER:
|
|
- if mfr_id in manufacturer_data:
|
|
|
|
|
|
+ if mfr_id in advertisement_data.manufacturer_data:
|
|
_mfr_id = mfr_id
|
|
_mfr_id = mfr_id
|
|
- _mfr_data = manufacturer_data[mfr_id]
|
|
|
|
|
|
+ _mfr_data = advertisement_data.manufacturer_data[mfr_id]
|
|
break
|
|
break
|
|
|
|
|
|
if _mfr_data is None and _service_data is None:
|
|
if _mfr_data is None and _service_data is None:
|