Add options flow for met#88525
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
|
|
@emontnemery This is step 2 of addressing the elevation unit issue in |
emontnemery
left a comment
There was a problem hiding this comment.
Looks good, the tests should be improved though.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
| return MetOptionsFlowHandler(config_entry) | ||
|
|
||
|
|
||
| class MetOptionsFlowHandler(config_entries.OptionsFlow): |
There was a problem hiding this comment.
Could this use a SchemaOptionsFlowHandler instead (see accuweather)?
Since this is just a single schema without any validation it seems a better fit.
There was a problem hiding this comment.
Not sure if SchemaOptionsFlowHandler works in this case. The OptionsFlow is calling hass.config_entries.async_update_entry to update the config entry, which SchemaOptionsFlowHandler doesn't seem to do?
Proposed change
Add an option flow to allow users to reconfigure properties of
met, including location (lat/lon), elevation, and location name.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: