Use _attr_force_update in tasmota (#77900)
This commit is contained in:
parent
6864f43986
commit
19b85851a1
3 changed files with 2 additions and 15 deletions
|
@ -256,6 +256,7 @@ async def async_setup_entry(
|
|||
class TasmotaSensor(TasmotaAvailability, TasmotaDiscoveryUpdate, SensorEntity):
|
||||
"""Representation of a Tasmota sensor."""
|
||||
|
||||
_attr_force_update = True
|
||||
_tasmota_entity: tasmota_sensor.TasmotaSensor
|
||||
|
||||
def __init__(self, **kwds: Any) -> None:
|
||||
|
@ -332,11 +333,6 @@ class TasmotaSensor(TasmotaAvailability, TasmotaDiscoveryUpdate, SensorEntity):
|
|||
return self._state_timestamp
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def force_update(self) -> bool:
|
||||
"""Force update."""
|
||||
return True
|
||||
|
||||
@property
|
||||
def native_unit_of_measurement(self) -> str | None:
|
||||
"""Return the unit this state is expressed in."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue