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.
Files changed (65) hide show
  1. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PKG-INFO +1 -1
  2. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/PKG-INFO +1 -1
  3. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/setup.py +1 -1
  4. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parser.py +2 -8
  5. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_adv_parser.py +0 -25
  6. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/LICENSE +0 -0
  7. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/MANIFEST.in +0 -0
  8. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/SOURCES.txt +0 -0
  9. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/dependency_links.txt +0 -0
  10. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/requires.txt +0 -0
  11. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/PySwitchbot.egg-info/top_level.txt +0 -0
  12. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/README.md +0 -0
  13. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/pyproject.toml +0 -0
  14. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/setup.cfg +0 -0
  15. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/__init__.py +0 -0
  16. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/__init__.py +0 -0
  17. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/blind_tilt.py +0 -0
  18. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/bot.py +0 -0
  19. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/bulb.py +0 -0
  20. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/ceiling_light.py +0 -0
  21. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/contact.py +0 -0
  22. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/curtain.py +0 -0
  23. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/hub2.py +0 -0
  24. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/humidifier.py +0 -0
  25. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/keypad.py +0 -0
  26. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/leak.py +0 -0
  27. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/light_strip.py +0 -0
  28. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/lock.py +0 -0
  29. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/meter.py +0 -0
  30. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/motion.py +0 -0
  31. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/plug.py +0 -0
  32. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/relay_switch.py +0 -0
  33. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/adv_parsers/remote.py +0 -0
  34. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/api_config.py +0 -0
  35. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/__init__.py +0 -0
  36. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/evaporative_humidifier.py +0 -0
  37. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/const/lock.py +0 -0
  38. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/__init__.py +0 -0
  39. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/base_cover.py +0 -0
  40. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/base_light.py +0 -0
  41. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/blind_tilt.py +0 -0
  42. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/bot.py +0 -0
  43. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/bulb.py +0 -0
  44. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/ceiling_light.py +0 -0
  45. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/contact.py +0 -0
  46. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/curtain.py +0 -0
  47. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/device.py +0 -0
  48. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/evaporative_humidifier.py +0 -0
  49. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/humidifier.py +0 -0
  50. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/keypad.py +0 -0
  51. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/light_strip.py +0 -0
  52. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/lock.py +0 -0
  53. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/meter.py +0 -0
  54. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/motion.py +0 -0
  55. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/plug.py +0 -0
  56. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/devices/relay_switch.py +0 -0
  57. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/discovery.py +0 -0
  58. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/enum.py +0 -0
  59. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/helpers.py +0 -0
  60. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/switchbot/models.py +0 -0
  61. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_base_cover.py +0 -0
  62. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_blind_tilt.py +0 -0
  63. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_curtain.py +0 -0
  64. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_evaporative_humidifier.py +0 -0
  65. {pyswitchbot-0.57.0 → pyswitchbot-0.57.1}/tests/test_relay_switch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PySwitchbot
3
- Version: 0.57.0
3
+ Version: 0.57.1
4
4
  Summary: A library to communicate with Switchbot
5
5
  Home-page: https://github.com/sblibs/pySwitchbot/
6
6
  Author: Daniel Hjelseth Hoyer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PySwitchbot
3
- Version: 0.57.0
3
+ Version: 0.57.1
4
4
  Summary: A library to communicate with Switchbot
5
5
  Home-page: https://github.com/sblibs/pySwitchbot/
6
6
  Author: Daniel Hjelseth Hoyer
@@ -20,7 +20,7 @@ setup(
20
20
  "cryptography>=39.0.0",
21
21
  "pyOpenSSL>=23.0.0",
22
22
  ],
23
- version="0.57.0",
23
+ version="0.57.1",
24
24
  description="A library to communicate with Switchbot",
25
25
  long_description=long_description,
26
26
  long_description_content_type="text/markdown",
@@ -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