Support unit of measurement in ESPHome numbers (#60591)

pull/60633/head
Jesse Hills 2021-12-01 03:20:40 +13:00 committed by GitHub
parent b5a6e03c21
commit 683bb13f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -3,7 +3,7 @@
"name": "ESPHome",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/esphome",
"requirements": ["aioesphomeapi==10.4.0"],
"requirements": ["aioesphomeapi==10.5.0"],
"zeroconf": ["_esphomelib._tcp.local."],
"codeowners": ["@OttoWinter", "@jesserockz"],
"after_dependencies": ["zeroconf", "tag"],

View File

@ -52,6 +52,11 @@ class EsphomeNumber(EsphomeEntity[NumberInfo, NumberState], NumberEntity):
"""Return the increment/decrement step."""
return super()._static_info.step
@property
def unit_of_measurement(self) -> str | None:
"""Return the unit of measurement."""
return super()._static_info.unit_of_measurement
@esphome_state_property
def value(self) -> float | None:
"""Return the state of the entity."""

View File

@ -161,7 +161,7 @@ aioeagle==1.1.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==10.4.0
aioesphomeapi==10.5.0
# homeassistant.components.flo
aioflo==2021.11.0

View File

@ -112,7 +112,7 @@ aioeagle==1.1.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==10.4.0
aioesphomeapi==10.5.0
# homeassistant.components.flo
aioflo==2021.11.0