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
@@ -68,7 +68,7 @@ class LcnRegulatorLockSensor(LcnDevice, BinarySensorDevice):
|
||||
return
|
||||
|
||||
self._value = input_obj.get_value().is_locked_regulator()
|
||||
self.async_schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
|
||||
class LcnBinarySensor(LcnDevice, BinarySensorDevice):
|
||||
@@ -100,7 +100,7 @@ class LcnBinarySensor(LcnDevice, BinarySensorDevice):
|
||||
return
|
||||
|
||||
self._value = input_obj.get_state(self.bin_sensor_port.value)
|
||||
self.async_schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
|
||||
class LcnLockKeysSensor(LcnDevice, BinarySensorDevice):
|
||||
@@ -135,4 +135,4 @@ class LcnLockKeysSensor(LcnDevice, BinarySensorDevice):
|
||||
key_id = int(self.source.name[1]) - 1
|
||||
|
||||
self._value = input_obj.get_state(table_id, key_id)
|
||||
self.async_schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
Reference in new issue
Block a user