Only do unit conversion of met elevation when set in config entry #88491
Conversation
|
Hey there @Danielhiversen, @thimic, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
ead0bb8 to
c2604be
Compare
|
As mentioned in #88283 (comment), this PR is step 1 of addressing the elevation unit issue in |
c2604be to
93b97b0
Compare
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
ffd9beb to
d327503
Compare
|
Implemented the suggestion in review above. Just to clarify, we want to apply the same unit conversion logic (and assume user entered elevation in feet) if:
Am I understanding this correctly? Sorry for the confusion here... |
Yeah, that's my suggestion, it fixes the bug where an elevation in meters in |
Co-authored-by: Erik Montnemery <erik@montnemery.com>
d327503 to
464448a
Compare
met elevation it is set in config entry
met elevation it is set in config entry met elevation when set in config entry
Proposed change
Move the conversion of elevation from feet to meters, so that it only happens when the elevation is stored in the config entry.
If the elevation is not set in the config entry, elevation is sourced from hass.config.elevation, which is always in meters
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.To help with the load of incoming pull requests: