Skip to content

Commit

Permalink
Support unit of measurement in ESPHome numbers (home-assistant#60591)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Nov 30, 2021
1 parent b5a6e03 commit 683bb13
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/esphome/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def step(self) -> float:
"""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."""
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 683bb13

Please sign in to comment.