PySwitchbot 0.48.1__tar.gz → 0.48.2__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 (52) hide show
  1. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PKG-INFO +1 -1
  2. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PySwitchbot.egg-info/PKG-INFO +1 -1
  3. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/setup.py +1 -1
  4. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/lock.py +2 -1
  5. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/tests/test_adv_parser.py +33 -0
  6. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/LICENSE +0 -0
  7. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/MANIFEST.in +0 -0
  8. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PySwitchbot.egg-info/SOURCES.txt +0 -0
  9. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PySwitchbot.egg-info/dependency_links.txt +0 -0
  10. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PySwitchbot.egg-info/requires.txt +0 -0
  11. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/PySwitchbot.egg-info/top_level.txt +0 -0
  12. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/README.md +0 -0
  13. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/setup.cfg +0 -0
  14. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/__init__.py +0 -0
  15. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parser.py +0 -0
  16. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/__init__.py +0 -0
  17. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/blind_tilt.py +0 -0
  18. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/bot.py +0 -0
  19. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/bulb.py +0 -0
  20. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/ceiling_light.py +0 -0
  21. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/contact.py +0 -0
  22. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/curtain.py +0 -0
  23. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/hub2.py +0 -0
  24. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/humidifier.py +0 -0
  25. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/light_strip.py +0 -0
  26. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/meter.py +0 -0
  27. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/motion.py +0 -0
  28. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/adv_parsers/plug.py +0 -0
  29. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/api_config.py +0 -0
  30. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/const.py +0 -0
  31. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/__init__.py +0 -0
  32. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/base_cover.py +0 -0
  33. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/base_light.py +0 -0
  34. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/blind_tilt.py +0 -0
  35. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/bot.py +0 -0
  36. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/bulb.py +0 -0
  37. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/ceiling_light.py +0 -0
  38. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/contact.py +0 -0
  39. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/curtain.py +0 -0
  40. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/device.py +0 -0
  41. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/humidifier.py +0 -0
  42. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/light_strip.py +0 -0
  43. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/lock.py +0 -0
  44. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/meter.py +0 -0
  45. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/motion.py +0 -0
  46. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/devices/plug.py +0 -0
  47. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/discovery.py +0 -0
  48. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/enum.py +0 -0
  49. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/switchbot/models.py +0 -0
  50. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/tests/test_base_cover.py +0 -0
  51. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/tests/test_blind_tilt.py +0 -0
  52. {pyswitchbot-0.48.1 → pyswitchbot-0.48.2}/tests/test_curtain.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySwitchbot
3
- Version: 0.48.1
3
+ Version: 0.48.2
4
4
  Summary: A library to communicate with Switchbot
5
5
  Home-page: https://github.com/Danielhiversen/pySwitchbot/
6
6
  Author: Daniel Hjelseth Hoyer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySwitchbot
3
- Version: 0.48.1
3
+ Version: 0.48.2
4
4
  Summary: A library to communicate with Switchbot
5
5
  Home-page: https://github.com/Danielhiversen/pySwitchbot/
6
6
  Author: Daniel Hjelseth Hoyer
@@ -10,7 +10,7 @@ setup(
10
10
  "cryptography>=39.0.0",
11
11
  "pyOpenSSL>=23.0.0",
12
12
  ],
13
- version="0.48.1",
13
+ version="0.48.2",
14
14
  description="A library to communicate with Switchbot",
15
15
  author="Daniel Hjelseth Hoyer",
16
16
  url="https://github.com/Danielhiversen/pySwitchbot/",
@@ -49,7 +49,8 @@ def process_wolock_pro(
49
49
  "unclosed_alarm": bool(mfr_data[11] & 0b10000000),
50
50
  "unlocked_alarm": bool(mfr_data[11] & 0b01000000),
51
51
  "auto_lock_paused": bool(mfr_data[8] & 0b100000),
52
- "night_latch": bool(mfr_data[9] & 0b00000001),
52
+ # Looks like night latch bit is not anymore in ADV
53
+ "night_latch": False,
53
54
  }
54
55
  _LOGGER.debug(res)
55
56
  return res
@@ -1459,6 +1459,39 @@ def test_parsing_lock_pro_passive():
1459
1459
  )
1460
1460
 
1461
1461
 
1462
+ def test_parsing_lock_pro_passive_nightlatch_disabled():
1463
+ ble_device = generate_ble_device("aa:bb:cc:dd:ee:ff", "any")
1464
+ adv_data = generate_advertisement_data(
1465
+ manufacturer_data={2409: bytes.fromhex("aabbccddeeff0a8200630000")}, rssi=-67
1466
+ )
1467
+ result = parse_advertisement_data(ble_device, adv_data, SwitchbotModel.LOCK_PRO)
1468
+ assert result == SwitchBotAdvertisement(
1469
+ address="aa:bb:cc:dd:ee:ff",
1470
+ data={
1471
+ "data": {
1472
+ "battery": None,
1473
+ "calibration": True,
1474
+ "status": LockStatus.LOCKED,
1475
+ "update_from_secondary_lock": False,
1476
+ "door_open": False,
1477
+ "double_lock_mode": False,
1478
+ "unclosed_alarm": False,
1479
+ "unlocked_alarm": False,
1480
+ "auto_lock_paused": False,
1481
+ "night_latch": False,
1482
+ },
1483
+ "model": "$",
1484
+ "isEncrypted": False,
1485
+ "modelFriendlyName": "Lock Pro",
1486
+ "modelName": SwitchbotModel.LOCK_PRO,
1487
+ "rawAdvData": None,
1488
+ },
1489
+ device=ble_device,
1490
+ rssi=-67,
1491
+ active=False,
1492
+ )
1493
+
1494
+
1462
1495
  def test_parsing_lock_active_old_firmware():
1463
1496
  """Test parsing lock with active data. Old firmware."""
1464
1497
  ble_device = generate_ble_device("aa:bb:cc:dd:ee:ff", "any")
File without changes
File without changes
File without changes
File without changes