Add ESPHome sensor force_update option (#28059)

* Add ESPHome sensor force_update option

* Update aioesphomeapi to 2.4.0
This commit is contained in:
Otto Winter 2019-10-21 16:06:57 +02:00 committed by Fabian Affolter
parent 269c8f1d14
commit ba10d5d604
4 changed files with 8 additions and 3 deletions

View File

@ -4,7 +4,7 @@
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/esphome", "documentation": "https://www.home-assistant.io/integrations/esphome",
"requirements": [ "requirements": [
"aioesphomeapi==2.2.0" "aioesphomeapi==2.4.0"
], ],
"dependencies": [], "dependencies": [],
"zeroconf": ["_esphomelib._tcp.local."], "zeroconf": ["_esphomelib._tcp.local."],

View File

@ -57,6 +57,11 @@ class EsphomeSensor(EsphomeEntity):
"""Return the icon.""" """Return the icon."""
return self._static_info.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 @esphome_state_property
def state(self) -> Optional[str]: def state(self) -> Optional[str]:
"""Return the state of the entity.""" """Return the state of the entity."""

View File

@ -139,7 +139,7 @@ aiobotocore==0.10.2
aiodns==2.0.0 aiodns==2.0.0
# homeassistant.components.esphome # homeassistant.components.esphome
aioesphomeapi==2.2.0 aioesphomeapi==2.4.0
# homeassistant.components.freebox # homeassistant.components.freebox
aiofreepybox==0.0.8 aiofreepybox==0.0.8

View File

@ -70,7 +70,7 @@ aioautomatic==0.6.5
aiobotocore==0.10.2 aiobotocore==0.10.2
# homeassistant.components.esphome # homeassistant.components.esphome
aioesphomeapi==2.2.0 aioesphomeapi==2.4.0
# homeassistant.components.emulated_hue # homeassistant.components.emulated_hue
# homeassistant.components.http # homeassistant.components.http