-
-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Proposal for Niko Home Control II #23105
Conversation
Thank you for your contribution. After a quick look, there are serval action items
|
What different this and the exists |
Hi @awarecan thanks for your comments/questions
This is v2, that one is v1. While they have some compatibility when it comes to hardware, on the software/network side, they are different. So is the communication.
As it stands now, light and switch are pretty much identical. If this doesn't matter, I'll remove one...
I'll try to look at that asap. |
We should not add a new integration for a new version. Please merge this with the other integration . Once you establish a connection you can see which API is in use and pick the appropriate lib and files to use |
@balloob I understand that this would be preferred, but I don't know enough about HA how and if we can/want to do this. The config would probably be different, as now it's basic, but the steps that would be added to a more complete integration, would require different flows for different systems. |
async def async_setup_entry(hass, config_entry, async_add_entities): | ||
"""Load NHC2 lights based on a config entry.""" | ||
hass.data.setdefault(KEY_ENTITY, {})[config_entry.entry_id] = [] | ||
gateway: CoCo = hass.data[KEY_GATEWAY][config_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.
I don't think this is valid syntax. If it is however, what is it supposed to do?
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 is Python 3.6 typing syntax, we support a minimum of python 3.5.3
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.
Will look at those this weekend, thx!
async def async_setup_entry(hass, config_entry, async_add_entities): | ||
"""Load NHC2 switches based on a config entry.""" | ||
hass.data.setdefault(KEY_ENTITY, {})[config_entry.entry_id] = [] | ||
gateway: CoCo = hass.data[KEY_GATEWAY][config_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.
Same thing here.
@@ -1,28 +1,13 @@ | |||
{ | |||
"config": { | |||
"abort": { | |||
"already_configured": "UPnP/IGD is already configured", |
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.
Why are parts of this file, and some others, changed? It seems unrelated to your other changes.
This PR has gone stale. I'll close it now. Please open a new PR when ready to finish. |
Breaking Change:
Nothing should break, but it's my first time writing something in python, so a good review would be gold. I am aware that not yet everything is in order, and i'll try to do what needs to be done.
Getting this all to work has been very tiresome as I've never written Python before.
Description:
Basic integration of Niko Home Control II (lights/switches)
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
Not yet new to this, will have to see how.
If the code communicates with devices, web services, or third-party tools:
requirements
in the manifest (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: