Centralize rainbird config and add binary sensor platform#26393
Conversation
MartinHjelmare
left a comment
There was a problem hiding this comment.
Since this PR already is a breaking change, I suggest we also change to use discovery.load_platform to load the platforms from the component, instead of using platform config sections. This is our new standard to collect all config under the integration key in the config.
This will make it easier to continue expanding this integration.
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please revert unrelated changes.
konikvranik
left a comment
There was a problem hiding this comment.
Since this PR already is a breaking change, I suggest we also change to use
discovery.load_platformto load the platforms from the component, instead of using platform config sections. This is our new standard to collect all config under the integration key in the config.This will make it easier to continue expanding this integration.
Please look at d6dd916 if that's the way you intended
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please don't add more features to this PR after this.
konikvranik
left a comment
There was a problem hiding this comment.
There has to be upgrade to pyrainbird 0.4.1. Testing with HA I found bug there
|
Make sure to bump the library versions here too. They are still at 0.4.0. |
|
I'm not owner of pyraindbird library so I have to wait until @jbarrancos publishes it to pypi. |
|
Upgraded to pyrainbird 0.4.1, tested on local instance and all seems to work flawlessly |
|
@jbarrancos May I ask you how does |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Good! Can be merged when final comment is addressed and build passes.
* irrigation time just as positive integer. Making it complex does make sense * zone edfaults fullfiled at runtime. There is no information about available zones in configuration time.
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please also set the defaults as before.
|
Please set the defaults as before too. |
|
I'm sorry, which defaults do you mean? |
|
The defaults we removed here: |
|
If you mean _set_defaults to set irrigation times for zones in configuration time, it does not make sense. Zones are not known in configuration time, so could not be set. They are discovered from controller in time of platform setup. |
|
We have a zone config schema. We should set the default trigger time in the zone schema. |
|
We can set values only for zones we want to overwrite some config. We can not overwrite irrigation time for zones that we don't have in configuration. So it is nonsense to substitute default twice. In config and then in runtime. That will be code duplication. What will be that for? |
|
Ok. Address the last comment and we're ready. |
|
Can be merged when build passes. |
Breaking Change:
The configuration has been changed and all configuration is now done under the
rainbird:key in configuration.yaml. Configuration of rainbird switches is moved from platform config section to mainrainbird:config underzones:key. Please read the updated documentation.Description:
Pull request with documentation for home-assistant.io: home-assistant/home-assistant.io#10326
Example entry for
configuration.yaml:Checklist:
tox. Your PR cannot be merged unless tests passrequirements_all.txtby runningpython3 -m script.gen_requirements_all.