File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ def _all_device_data(self) -> None:
9999 self ._is_thermostat
100100 or (not self ._smile_legacy and self .smile_type == "power" )
101101 ):
102- device ["binary_sensors" ]["plugwise_notification" ] = False
102+ device ["binary_sensors" ]["plugwise_notification" ] = bool (
103+ self ._notifications
104+ )
103105
104106 # Update for cooling
105107 if device ["dev_class" ] in ZONE_THERMOSTATS :
@@ -108,7 +110,11 @@ def _all_device_data(self) -> None:
108110 remove_empty_platform_dicts (device )
109111
110112 self .gw_data .update (
111- {"smile_name" : self .smile_name , "gateway_id" : self .gateway_id }
113+ {
114+ "smile_name" : self .smile_name ,
115+ "gateway_id" : self .gateway_id ,
116+ "notifications" : self ._notifications ,
117+ }
112118 )
113119 if self ._is_thermostat :
114120 self .gw_data .update (
@@ -508,9 +514,8 @@ async def _update_domain_objects(self) -> None:
508514
509515 async def async_update (self ) -> PlugwiseData :
510516 """Perform an incremental update for updating the various device states."""
511- new = dt .datetime .now ().strftime ("%w" )
512517 # Perform a full update at day-change
513- if new != self ._previous :
518+ if ( new := dt . datetime . now (). strftime ( '%w' )) != self ._previous :
514519 self ._previous = new
515520 await self ._full_update_device ()
516521 self .get_all_devices ()
You can’t perform that action at this time.
0 commit comments