ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
624 stars 58 forks source link

Feature request: Adding multiple accounts. #302

Closed teemurutus closed 8 months ago

teemurutus commented 11 months ago

It would be nice to have a possibility to use multiple accounts with Home Connect Alt. I got blocked a couple of times so I decided to create separate developer account for each appliance because of the limit.

I already created application credentials for each account (which worked with the not-so-improved version). The selection of the credentials appear but only one can be in use at a time.

HCAlt

ekutner commented 11 months ago

Did you use the "Add entry" option to add another instance of the integration? I never tested that and I have no idea how it would behave but I won't be surprised if it didn't work. There is an implicit assumption in the code that there is only one running instance. I'll take a look when I have some time but this is actually a feature request and a very low priority at that, so can't say when I'll get to it.

teemurutus commented 11 months ago

Yes, I used exactly the "Add entry" -button. After selecting second credentials to add, it begins the authorization process, and after successful authorization it gives an empty box (in screenshot). There is no new entry or change to an existing entry.

image

Thank you for giving this a thought at maybe some point!

ekutner commented 10 months ago

I already created application credentials for each account (which worked with the not-so-improved version).

What did you mean with that sentence? Where and how did it work?

teemurutus commented 10 months ago

It is possible to manually add or remove application credentials (OAuth Client ID and secret) for integrations at "/config/application_credentials":

image

After manually adding more credentials, you get to choose (first screenshot) which credentials to use when you select "add entry".

With the integration included in Home Assistant, it is possible to use multiple accounts after adding credentials for each account: image

ekutner commented 9 months ago

Release 1.1.0-b3 adds proper support for multiple accounts by using multiple config entries. The README explains how to use it. Feel free to test it.

teemurutus commented 9 months ago

This is very good! Everything works smoothly and I have not faced any trouble with three connections.

ekutner commented 8 months ago

Closing as done