Skip to content

Commit 5bea259

Browse files
committed
Added a global temperature property to each System
1 parent 7130f95 commit 5bea259

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

simplipy/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Define a version constant."""
2-
__version__ = '3.0.2'
2+
__version__ = '3.0.3'

simplipy/system.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ def system_id(self) -> int:
5858
"""Return the SimpliSafe identifier for this system."""
5959
return self._location_info['sid']
6060

61+
@property
62+
def temperature(self) -> int:
63+
"""Return the overall temperature measured by the system."""
64+
return self._location_info['system']['temperature']
65+
6166
@property
6267
def version(self) -> int:
6368
"""Return the system version."""

tests/test_system.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ async def test_properties_base(event_loop, v2_server):
106106
assert system.serial == TEST_SYSTEM_SERIAL_NO
107107
assert system.state == SystemStates.off
108108
assert system.system_id == TEST_SYSTEM_ID
109+
assert system.temperature == 67
109110
assert system.version == 2
110111

111112

0 commit comments

Comments
 (0)