-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Tplink klap protocol #100356
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
Tplink klap protocol #100356
Conversation
Hey there @rytilahti, @TheGardenMonkey, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
As it happens the updated event only fires if the value changes but I was concerned that if the update event implementation ever changed and ended up firing whenever update is called then this would cause a big problem. They'd all keep updating and raising the events on the other config entries infinitely.
Having to re-enter them on restart would be quite annoying. I initially implemented a global approach here that also handled the persistent storage but it was a bit ugly. There seems to be two paradigms for integrations using config flow, one where the whole integration has a single config entry (and all devices will be added like ring) and it's easy to configure options for the integration, and the other (i.e. tplink) where a config entry is created per device (more control for the user) but then integration level options don't seem to have support in HA. Having implemented both the global storage approach and the options approach, the user experience with the OptionsFlow is much better and it's more obvious to the user how to fix it as they just click configure. Maybe we could ask this question to some of the HA architects to get a view?
I saw a bunch of people complaining on reddit about passwords being stored by HA in plain text and there was a question raised to discuss it. I figured that as we have an encryption library to hand there was no harm but happy to remove. |
Is it possible to withdraw the auth error, i.e., retriggering the flow after the creds have been inputted once? This way, the flow could could save the creds under
So I think there are two cases:
Am I missing something? While not optimal when adding new devices, this would require user to input the credentials only once even if they are adding several devices, right? I suppose the proper way would be to have an "integration store" where we could read this, but I'm not sure if such exists at the moment.
Yeah, I have heard about different approaches but never really looked into that. I agree that it'd be helpful if someone with more knowledge would chime in what's the best approach here.
We want to keep the integration as simple as possible. If encryption is wanted, it should be done by homeassistant core. I did not know about the store, what were the problems when using it for storing information? |
Done |
Breaking change
Proposed change
Update tplink integration to work with kasa klap protocol. Currently in draft as python-kasa needs to be released to support it and there's a conversation to be had with @rytilahti about the implementation.
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: