PySwitchbot 0.38.0__tar.gz → 0.39.0__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.38.0 → PySwitchbot-0.39.0}/PKG-INFO +1 -1
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/PySwitchbot.egg-info/PKG-INFO +1 -1
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/setup.py +1 -1
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/lock.py +1 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/lock.py +12 -1
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/LICENSE +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/MANIFEST.in +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/PySwitchbot.egg-info/SOURCES.txt +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/PySwitchbot.egg-info/dependency_links.txt +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/PySwitchbot.egg-info/requires.txt +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/PySwitchbot.egg-info/top_level.txt +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/README.md +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/setup.cfg +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/__init__.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parser.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/__init__.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/blind_tilt.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/bot.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/bulb.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/ceiling_light.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/contact.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/curtain.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/humidifier.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/light_strip.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/meter.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/motion.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/adv_parsers/plug.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/api_config.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/const.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/__init__.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/base_light.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/blind_tilt.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/bot.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/bulb.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/ceiling_light.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/contact.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/curtain.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/device.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/humidifier.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/light_strip.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/meter.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/motion.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/devices/plug.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/discovery.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/enum.py +0 -0
- {PySwitchbot-0.38.0 → PySwitchbot-0.39.0}/switchbot/models.py +0 -0
|
@@ -27,4 +27,5 @@ def process_wolock(data: bytes | None, mfr_data: bytes | None) -> dict[str, bool
|
|
|
27
27
|
"unclosed_alarm": bool(mfr_data[8] & 0b00100000),
|
|
28
28
|
"unlocked_alarm": bool(mfr_data[8] & 0b00010000),
|
|
29
29
|
"auto_lock_paused": bool(mfr_data[8] & 0b00000010),
|
|
30
|
+
"night_latch": bool(mfr_data[9] & 0b00000001),
|
|
30
31
|
}
|
|
@@ -26,6 +26,7 @@ COMMAND_HEADER = "57"
|
|
|
26
26
|
COMMAND_GET_CK_IV = f"{COMMAND_HEADER}0f2103"
|
|
27
27
|
COMMAND_LOCK_INFO = f"{COMMAND_HEADER}0f4f8101"
|
|
28
28
|
COMMAND_UNLOCK = f"{COMMAND_HEADER}0f4e01011080"
|
|
29
|
+
COMMAND_UNLOCK_WITHOUT_UNLATCH = f"{COMMAND_HEADER}0f4e010110a0"
|
|
29
30
|
COMMAND_LOCK = f"{COMMAND_HEADER}0f4e01011000"
|
|
30
31
|
COMMAND_ENABLE_NOTIFICATIONS = f"{COMMAND_HEADER}0e01001e00008101"
|
|
31
32
|
COMMAND_DISABLE_NOTIFICATIONS = f"{COMMAND_HEADER}0e00"
|
|
@@ -164,11 +165,17 @@ class SwitchbotLock(SwitchbotDevice):
|
|
|
164
165
|
)
|
|
165
166
|
|
|
166
167
|
async def unlock(self) -> bool:
|
|
167
|
-
"""Send unlock command."""
|
|
168
|
+
"""Send unlock command. If unlatch feature is enabled in EU firmware, also unlatches door"""
|
|
168
169
|
return await self._lock_unlock(
|
|
169
170
|
COMMAND_UNLOCK, {LockStatus.UNLOCKED, LockStatus.UNLOCKING}
|
|
170
171
|
)
|
|
171
172
|
|
|
173
|
+
async def unlock_without_unlatch(self) -> bool:
|
|
174
|
+
"""Send unlock command. This command will not unlatch the door."""
|
|
175
|
+
return await self._lock_unlock(
|
|
176
|
+
COMMAND_UNLOCK_WITHOUT_UNLATCH, {LockStatus.UNLOCKED, LockStatus.UNLOCKING, LockStatus.NOT_FULLY_LOCKED}
|
|
177
|
+
)
|
|
178
|
+
|
|
172
179
|
def _parse_basic_data(self, basic_data: bytes) -> dict[str, Any]:
|
|
173
180
|
"""Parse basic data from lock."""
|
|
174
181
|
return {
|
|
@@ -239,6 +246,10 @@ class SwitchbotLock(SwitchbotDevice):
|
|
|
239
246
|
"""Return True if auto lock is paused."""
|
|
240
247
|
return self._get_adv_value("auto_lock_paused")
|
|
241
248
|
|
|
249
|
+
def is_night_latch_enabled(self) -> bool:
|
|
250
|
+
"""Return True if Night Latch is enabled on EU firmware."""
|
|
251
|
+
return self._get_adv_value("night_latch")
|
|
252
|
+
|
|
242
253
|
async def _get_lock_info(self) -> bytes | None:
|
|
243
254
|
"""Return lock info of device."""
|
|
244
255
|
_data = await self._send_command(key=COMMAND_LOCK_INFO, retry=self._retry_count)
|
|
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
|