File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -160,4 +160,6 @@ def async_update_callback(self):
160160 self ._attr ,
161161 None ,
162162 )
163- self .async_write_ha_state ()
163+ else :
164+ self ._state = None
165+ self .async_write_ha_state ()
Original file line number Diff line number Diff line change @@ -218,6 +218,8 @@ def close(self):
218218 self ._socket .close ()
219219 except :
220220 pass
221+ for callback in self ._callbacks :
222+ callback ()
221223
222224 def get_measurements_and_empty (self ):
223225 meas = self ._measurements
Original file line number Diff line number Diff line change @@ -150,4 +150,6 @@ def async_update_callback(self):
150150 self ._attr ,
151151 None ,
152152 )
153- self .async_write_ha_state ()
153+ else :
154+ self ._state = None
155+ self .async_write_ha_state ()
You can’t perform that action at this time.
0 commit comments