Support unit of measurement in ESPHome numbers (#60591)
parent
b5a6e03c21
commit
683bb13f50
|
@ -3,7 +3,7 @@
|
||||||
"name": "ESPHome",
|
"name": "ESPHome",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/esphome",
|
"documentation": "https://www.home-assistant.io/integrations/esphome",
|
||||||
"requirements": ["aioesphomeapi==10.4.0"],
|
"requirements": ["aioesphomeapi==10.5.0"],
|
||||||
"zeroconf": ["_esphomelib._tcp.local."],
|
"zeroconf": ["_esphomelib._tcp.local."],
|
||||||
"codeowners": ["@OttoWinter", "@jesserockz"],
|
"codeowners": ["@OttoWinter", "@jesserockz"],
|
||||||
"after_dependencies": ["zeroconf", "tag"],
|
"after_dependencies": ["zeroconf", "tag"],
|
||||||
|
|
|
@ -52,6 +52,11 @@ class EsphomeNumber(EsphomeEntity[NumberInfo, NumberState], NumberEntity):
|
||||||
"""Return the increment/decrement step."""
|
"""Return the increment/decrement step."""
|
||||||
return super()._static_info.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
|
@esphome_state_property
|
||||||
def value(self) -> float | None:
|
def value(self) -> float | None:
|
||||||
"""Return the state of the entity."""
|
"""Return the state of the entity."""
|
||||||
|
|
|
@ -161,7 +161,7 @@ aioeagle==1.1.0
|
||||||
aioemonitor==1.0.5
|
aioemonitor==1.0.5
|
||||||
|
|
||||||
# homeassistant.components.esphome
|
# homeassistant.components.esphome
|
||||||
aioesphomeapi==10.4.0
|
aioesphomeapi==10.5.0
|
||||||
|
|
||||||
# homeassistant.components.flo
|
# homeassistant.components.flo
|
||||||
aioflo==2021.11.0
|
aioflo==2021.11.0
|
||||||
|
|
|
@ -112,7 +112,7 @@ aioeagle==1.1.0
|
||||||
aioemonitor==1.0.5
|
aioemonitor==1.0.5
|
||||||
|
|
||||||
# homeassistant.components.esphome
|
# homeassistant.components.esphome
|
||||||
aioesphomeapi==10.4.0
|
aioesphomeapi==10.5.0
|
||||||
|
|
||||||
# homeassistant.components.flo
|
# homeassistant.components.flo
|
||||||
aioflo==2021.11.0
|
aioflo==2021.11.0
|
||||||
|
|
Loading…
Reference in New Issue