Add ESPHome sensor force_update option (#28059)
* Add ESPHome sensor force_update option * Update aioesphomeapi to 2.4.0
This commit is contained in:
1 parent
269c8f1d14
commit
ba10d5d604
4 files changed
+8
-3
No files matched your search
@@ -57,6 +57,11 @@ class EsphomeSensor(EsphomeEntity):
|
||||
"""Return the icon."""
|
||||
return self._static_info.icon
|
||||
|
||||
@property
|
||||
def force_update(self) -> bool:
|
||||
"""Return if this sensor should force a state update."""
|
||||
return self._static_info.force_update
|
||||
|
||||
@esphome_state_property
|
||||
def state(self) -> Optional[str]:
|
||||
"""Return the state of the entity."""
|
||||
|
||||
Reference in new issue
Block a user