Restore unit_of_measurement from entity registry#30780
Merged
Merged
Conversation
Contributor
|
does this mean that all entities (lets say sensors) will have configurable "unit of measurment"? |
Member
Author
|
No - this is an extension of the work started here, here and here. The value is populated from the states, its just that it persists over a reboot now. This allows integrations that operate on other integrations (like Alexa or HomeKit) to know that there is a Temperature Sensor and its unit type is "C" even if that temperature sensor was offline when HA started. In the case of HomeKit, this will hopefully mean the end of the |
balloob
approved these changes
Jan 15, 2020
raman325
added a commit
to raman325/home-assistant
that referenced
this pull request
Jan 15, 2020
* upstream/dev: (82 commits) Add support for vacuums to Alexa. (home-assistant#30764) Refactor Ring data handling (home-assistant#30777) Restore unit_of_measurement from entity registry (home-assistant#30780) Update pyubee to 0.8 (home-assistant#30785) Update emulated_roku to 0.1.9 (home-assistant#30791) Add Config Flow support, Device Registry support, available property to vizio component (home-assistant#30653) Allow input_* and timer component setup without config (home-assistant#30772) Search: Add search to default config and don't resolve area (home-assistant#30762) [ci skip] Translation update Use storage based collections for Timer platform (home-assistant#30765) Upgrade youtube_dl to version 2020.01.15 (home-assistant#30767) Whitelist Frenck for release Hass.io allow to reset password with CLI (home-assistant#30755) Revert home-assistant#29701 (home-assistant#30766) Add Safe Mode (home-assistant#30723) Update Ring to 0.6.0 (home-assistant#30748) Add support for the voltage sensor on the greeneye GEM (home-assistant#30484) Fix supported_features in MQTT fan (home-assistant#28680) Fix small typo in alarmdotcom component (home-assistant#30758) bump aiokef to 0.2.5 which uses locks (home-assistant#30753) ...
frenck
pushed a commit
that referenced
this pull request
Jan 15, 2020
* Restore unit_of_measurement from entity registry * Lint fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
As discussed in #30775,
unit_of_measurementwas not stored in (or restored from) the entity registry. This PR implements it the same was asdevice_classwas handled.This allows HomeKit to refer to
unit_of_measurementwhen configuring itself, hopefully removing one more case whereauto_startis needed.CC @balloob
Related issue (if applicable): fixes #30775
Checklist:
tox. Your PR cannot be merged unless tests pass