Directly call async_write_ha_state (#33508)

* Directly call async_write_ha_state

* Address comments

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-04-01 14:19:51 -07:00
1 parent 4e043b3123
commit aaa1d06809
129 files changed
+263 -278

No files matched your search

@@ -95,7 +95,7 @@ class MinutPointBinarySensor(MinutPointEntity, BinarySensorDevice):
self._is_on = True
else:
self._is_on = None
self.async_schedule_update_ha_state()
self.async_write_ha_state()
@callback
def _webhook_event(self, data, webhook):
@@ -111,7 +111,7 @@ class MinutPointBinarySensor(MinutPointEntity, BinarySensorDevice):
self._is_on = True
if _type == self._events[1]:
self._is_on = None
self.async_schedule_update_ha_state()
self.async_write_ha_state()
@property
def is_on(self):