Skip to content

Commit 61a3df8

Browse files
committed
Remove notifications property, add to gateway data
1 parent 4a5c45e commit 61a3df8

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

plugwise/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,6 @@ def item_count(self) -> int:
109109
"""Return the item-count."""
110110
return self._smile_props["item_count"]
111111

112-
@property
113-
def notifications(self) -> dict[str, dict[str, str]]:
114-
"""Return the Plugwise notifications."""
115-
if "notifications" in self._smile_props:
116-
return self._smile_props["notifications"]
117-
return {}
118-
119112
@property
120113
def reboot(self) -> bool:
121114
"""Return the reboot capability.

plugwise/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def _all_entity_data(self) -> None:
4343

4444
self._smile_props["gateway_id"] = self._gateway_id
4545
self._smile_props["item_count"] = self._count
46-
self._smile_props["notifications"] = self._notifications
4746
self._smile_props["reboot"] = True
4847
self._smile_props["smile_name"] = self.smile_name
4948
if self._is_thermostat:
@@ -128,7 +127,8 @@ def _add_or_update_notifications(
128127
and "plugwise_notification" in entity["binary_sensors"]
129128
):
130129
data["binary_sensors"]["plugwise_notification"] = bool(self._notifications)
131-
self._count += 1
130+
data["notifications"] = self._notifications
131+
self._count += 2
132132

133133
def _update_for_cooling(self, entity: GwEntityData) -> None:
134134
"""Helper-function for adding/updating various cooling-related values."""

0 commit comments

Comments
 (0)