Skip to content

Commit f37c619

Browse files
committed
Add pragma-no-cover, remove unused code
1 parent 4b9a102 commit f37c619

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

plugwise/data.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ def _detect_low_batteries(self) -> list[str]:
106106
def _add_or_update_notifications(
107107
self, entity_id: str, entity: GwEntityData
108108
) -> None:
109-
"""Helper-function adding or updating the Plugwise notifications."""
109+
"""Helper-function adding or updating the Plugwise notifications to the gateway."""
110110

111111
if entity_id != self._gateway_id:
112-
return
112+
return # pragma: no cover
113113

114114
if self._is_thermostat or self.smile.type == "power":
115115
if "plugwise_notification" not in entity:
@@ -119,12 +119,6 @@ def _add_or_update_notifications(
119119
entity.update({"notifications": self._notifications})
120120
self._count += 2
121121

122-
else:
123-
entity["binary_sensors"]["plugwise_notification"] = bool(
124-
self._notifications
125-
)
126-
entity["notifications"] = self._notifications
127-
128122
def _update_for_cooling(self, entity: GwEntityData) -> None:
129123
"""Helper-function for adding/updating various cooling-related values."""
130124
# For Anna and heating + cooling, replace setpoint with setpoint_high/_low

0 commit comments

Comments
 (0)