-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Cleanup Xiaomi Aqara #10302
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
Cleanup Xiaomi Aqara #10302
Conversation
|
||
if config.get(CONF_KEY) is None: | ||
_LOGGER.warning( | ||
'Key is not provided for gateway %s. Controlling the gateway ' |
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.
Is this a warning or should we mark this config as invalid?
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.
It's a warning! We want to be able to use the gateway without a proper key.
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.
Can we connect if we don't have a key?
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.
Yes. We are able the receive measurements. We are unable to control an actor without a key.
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.
ooh nice, I didn't realise that. Very cool.
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.
Code looks good. I don't know the xiaomi aqara system though.
I'm sorry for the mess. It was my fault! |
It's okay @syssi, managed to catch it in time. Please run your code next time locally 👍 |
Promised! |
Description:
The Xiaomi Aqara component was broken by #10150. This fixes the services and cleans it up.
When opening a PR, please make sure that you run the code that you are submitting! If this would have gone out before 0.57, it would have broken for tons of users, impact our reputation and force us to spend time on doing a hot fix. That's not cool.
Bonus in this PR: gateway is optional in service schemas when the user has only 1 gateway.
Example entry for
configuration.yaml
(if applicable):Checklist:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.