File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -111,15 +111,16 @@ def _add_or_update_notifications(
111111 if entity_id != self ._gateway_id :
112112 return
113113
114- if (self ._is_thermostat or self .smile .type == "power" ) and "binary_sensors" not in entity :
115- entity .update ({"binary_sensors" : {"plugwise_notification" : bool (self ._notifications )}})
116- entity .update ({"notifications" : self ._notifications })
117- self ._count += 2
118-
119- if "plugwise_notification" in entity ["binary_sensors" ]:
120- entity ["binary_sensors" ]["plugwise_notification" ] = bool (self ._notifications )
121- entity ["notifications" ] = self ._notifications
122- self ._count += 2
114+ if self ._is_thermostat or self .smile .type == "power" :
115+ if "plugwise_notification" not in entity :
116+ entity ["binary_sensors" ].update ({"plugwise_notification" : bool (self ._notifications )})
117+ entity .update ({"notifications" : self ._notifications })
118+ self ._count += 2
119+
120+ else :
121+ entity ["binary_sensors" ]["plugwise_notification" ] = bool (self ._notifications )
122+ entity ["notifications" ] = self ._notifications
123+ self ._count += 2
123124
124125 def _update_for_cooling (self , entity : GwEntityData ) -> None :
125126 """Helper-function for adding/updating various cooling-related values."""
You can’t perform that action at this time.
0 commit comments