Skip to content

Commit 82abc1d

Browse files
authored
Added support to report low battery for garage doors (#163)
1 parent a87c0ff commit 82abc1d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pymyq/garagedoor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ def open_allowed(self) -> bool:
5151
"""Return whether the device can be opened unattended."""
5252
return self.device_json["state"].get("is_unattended_open_allowed") is True
5353

54+
@property
55+
def low_battery(self) -> bool:
56+
"""Return whether the device has low battery."""
57+
return self.device_json["state"].get("dps_low_battery_mode") is True
58+
5459
@property
5560
def device_state(self) -> Optional[str]:
5661
"""Return the current state of the device."""

0 commit comments

Comments
 (0)