Use _attr_force_update in tasmota (#77900)

This commit is contained in:
epenet 2022-09-06 20:20:07 +02:00 committed by GitHub
parent 6864f43986
commit 19b85851a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 15 deletions

View file

@ -58,6 +58,7 @@ class TasmotaBinarySensor(
):
"""Representation a Tasmota binary sensor."""
_attr_force_update = True
_tasmota_entity: tasmota_switch.TasmotaSwitch
def __init__(self, **kwds: Any) -> None:
@ -98,11 +99,6 @@ class TasmotaBinarySensor(
self.async_write_ha_state()
@property
def force_update(self) -> bool:
"""Force update."""
return True
@property
def is_on(self) -> bool | None:
"""Return true if the binary sensor is on."""