Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state * Address comments * Fix tests
This commit is contained in:
1 parent
4e043b3123
commit
aaa1d06809
129 files changed
+263
-278
No files matched your search
@@ -234,7 +234,7 @@ class TodSensor(BinarySensorDevice):
|
||||
def _point_in_time_listener(self, now):
|
||||
"""Run when the state of the sensor should be updated."""
|
||||
self._calculate_next_update()
|
||||
self.async_schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
async_track_point_in_utc_time(
|
||||
self.hass, self._point_in_time_listener, self.next_update
|
||||
|
||||
Reference in new issue
Block a user