New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to select/change the configured device in ViCare integration #107906
Conversation
Review & merge #107994 first to ease the review. |
"flow_title": "{name} ({host})", | ||
"step": { | ||
"init": { | ||
"description": "Select the serial number of the device to connect. The serial number can be found on the device or in the settings of the VICare app.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "Select the serial number of the device to connect. The serial number can be found on the device or in the settings of the VICare app.", | |
"description": "Select the serial number of the device to connect. The serial number can be found on the device or in the settings of the ViCare app.", |
e7fe196
to
1749203
Compare
1749203
to
bfb9fb4
Compare
return vicare_api | ||
async def async_update_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: | ||
"""Update a given config entry.""" | ||
await hass.config_entries.async_reload(entry.entry_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems not to work, after options changed the integration needs to be reloaded.
@CFenner regarding your suggestion from comment #107847 (comment) I have applied this PR using command
Then i was able to select one of two devices from my vicare But for some reason it seems to that I still have the data about |
Nice that you tested! So when I look at your first screenshot, I get the impression that you get displayed two times the same serial, am I correct? Can you share your diagnostics file? This is probably the case because you have a gateway that is not recognized as such. I will add your gateway model name to the code to get around this. Run the curl command again or do the changes yourself if you feel comfortable. |
Thanks for quick reply @CFenner
Correct, they both have the same serial numbers
Not sure about that. I have just HeatPump |
Maybe this PR is not necessary, but #106477 will also fix the issues a lot of people have with accessing their heatings. Especially when we go for multi device support with #96044.
It will migrate your vicare config entry to a version 2 to store the device you want to connect to. This leads to issues when you want to migrate back to the original version or any other branch. |
Proposed change
This PR adds an options flow and adds the ability to select the device that should be used for this integration (instead of the first one). This is also possible, when the integration is setup from scratch.
This enabled users to fix a bug introduced by Viessmann that leads to the wrong device being used (#107847 #107940).
Type of change
Additional information
Checklist
ruff format 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: