@@ -59,7 +59,10 @@ def is_on(self):
5959
6060 @callback
6161 def update (self ) -> None :
62- _LOGGER .debug ("Update device_locked %s" , self ._coordinator .data .device_locked )
62+ _LOGGER .debug ("%s: Update device_locked %s" ,
63+ self ._coordinator .data .device_id ,
64+ self ._coordinator .data .device_locked
65+ )
6366 if self ._coordinator .data .device_locked != self ._attr_native_value :
6467 self ._attr_native_value = self ._coordinator .data .device_locked
6568 self .schedule_update_ha_state ()
@@ -93,7 +96,10 @@ def is_on(self):
9396
9497 @callback
9598 def update (self ) -> None :
96- _LOGGER .debug ("Update water_state %s" , self ._coordinator .data .water_warning )
99+ _LOGGER .debug ("%s: Update water_state %s" ,
100+ self ._coordinator .data .device_id ,
101+ self ._coordinator .data .water_warning
102+ )
97103 if self ._coordinator .data .water_warning != self ._attr_native_value :
98104 self ._attr_native_value = self ._coordinator .data .water_warning
99105 self .schedule_update_ha_state ()
@@ -129,9 +135,11 @@ def is_on(self):
129135
130136 @callback
131137 def update (self ) -> None :
132- _LOGGER .debug ("Update pump_state[%s] %s" ,
138+ _LOGGER .debug ("%s: Update pump_state[%s] %s" ,
139+ self ._coordinator .data .device_id ,
133140 self ._channel ,
134- self ._coordinator .data .pump_open [self ._channel ])
141+ self ._coordinator .data .pump_open [self ._channel ]
142+ )
135143 if self ._coordinator .data .pump_open [self ._channel ] != self ._attr_native_value :
136144 self ._attr_native_value = self ._coordinator .data .pump_open [self ._channel ]
137145 self .schedule_update_ha_state ()
@@ -167,9 +175,11 @@ def is_on(self):
167175
168176 @callback
169177 def update (self ) -> None :
170- _LOGGER .debug ("Update pump_lock_state[%s] %s" ,
178+ _LOGGER .debug ("%s: Update pump_lock_state[%s] %s" ,
179+ self ._coordinator .data .device_id ,
171180 self ._channel ,
172- self ._coordinator .data .outlet_locked_state [self ._channel ])
181+ self ._coordinator .data .outlet_locked_state [self ._channel ]
182+ )
173183 if self ._coordinator .data .outlet_locked_state [self ._channel ] != self ._attr_native_value :
174184 self ._attr_native_value = self ._coordinator .data .outlet_locked_state [self ._channel ]
175185 self .schedule_update_ha_state ()
@@ -180,7 +190,7 @@ def __init__(self, coordinator: GrowcubeDataCoordinator, channel: int) -> None:
180190 self ._coordinator = coordinator
181191 self ._coordinator .entities .append (self )
182192 self ._channel = channel
183- self ._attr_unique_id = f"{ coordinator .data .device_id } _outlet_" + self . CHANNEL_ID [channel ] + "_blocked"
193+ self ._attr_unique_id = f"{ coordinator .data .device_id } _outlet_" + CHANNEL_ID [channel ] + "_blocked"
184194 self .entity_id = f"{ Platform .SENSOR } .{ self ._attr_unique_id } "
185195 self ._attr_name = f"Outlet " + CHANNEL_NAME [channel ] + " blocked"
186196 self ._attr_device_class = BinarySensorDeviceClass .PROBLEM
@@ -205,9 +215,11 @@ def is_on(self):
205215
206216 @callback
207217 def update (self ) -> None :
208- _LOGGER .debug ("Update pump_lock_state[%s] %s" ,
218+ _LOGGER .debug ("%s: Update pump_lock_state[%s] %s" ,
219+ self ._coordinator .data .device_id ,
209220 self ._channel ,
210- self ._coordinator .data .outlet_blocked_state [self ._channel ])
221+ self ._coordinator .data .outlet_blocked_state [self ._channel ]
222+ )
211223 if self ._coordinator .data .outlet_blocked_state [self ._channel ] != self ._attr_native_value :
212224 self ._attr_native_value = self ._coordinator .data .outlet_blocked_state [self ._channel ]
213225 self .schedule_update_ha_state ()
@@ -243,9 +255,11 @@ def is_on(self):
243255
244256 @callback
245257 def update (self ) -> None :
246- _LOGGER .debug ("Update sensor_state[%s] %s" ,
258+ _LOGGER .debug ("%s: Update sensor_state[%s] %s" ,
259+ self ._coordinator .data .device_id ,
247260 self ._channel ,
248- self ._coordinator .data .sensor_abnormal [self ._channel ])
261+ self ._coordinator .data .sensor_abnormal [self ._channel ]
262+ )
249263 if self ._coordinator .data .sensor_abnormal [self ._channel ] != self ._attr_native_value :
250264 self ._attr_native_value = self ._coordinator .data .sensor_abnormal [self ._channel ]
251265 self .schedule_update_ha_state ()
@@ -281,9 +295,11 @@ def is_on(self):
281295
282296 @callback
283297 def update (self ) -> None :
284- _LOGGER .debug ("Update sensor_state[%s] %s" ,
298+ _LOGGER .debug ("%s: Update sensor_state[%s] %s" ,
299+ self ._coordinator .data .device_id ,
285300 self ._channel ,
286- self ._coordinator .data .sensor_disconnected [self ._channel ])
301+ self ._coordinator .data .sensor_disconnected [self ._channel ]
302+ )
287303 if self ._coordinator .data .sensor_disconnected [self ._channel ] != self ._attr_native_value :
288304 self ._attr_native_value = self ._coordinator .data .sensor_disconnected [self ._channel ]
289305 self .schedule_update_ha_state ()
0 commit comments