Skip to content

Commit d665c45

Browse files
committed
Add Smile/Legacy item_count property
1 parent 40f60ad commit d665c45

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

plugwise/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def heater_id(self) -> str:
101101
@property
102102
def item_count(self) -> int:
103103
"""Return the item-count."""
104-
return self._smile_props["item_count"]
104+
return self._smile_api.item_count
105105

106106
@property
107107
def reboot(self) -> bool:

plugwise/helper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ def gateway_id(self) -> str:
9696
"""Return the gateway-id."""
9797
return self._gateway_id
9898

99+
@property
100+
def item_count(self) -> int:
101+
"""Return the item-count."""
102+
return self._count
103+
99104
def _all_appliances(self) -> None:
100105
"""Collect all appliances with relevant info.
101106

plugwise/legacy/helper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def gateway_id(self) -> str:
8383
"""Return the gateway-id."""
8484
return self._gateway_id
8585

86+
@property
87+
def item_count(self) -> int:
88+
"""Return the item-count."""
89+
return self._count
90+
8691
def _all_appliances(self) -> None:
8792
"""Collect all appliances with relevant info."""
8893
self._count = 0

0 commit comments

Comments
 (0)