-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Rachio component modernization #16911
Conversation
Add `unique_id` to all rachio entities Add platform discovery to rachio component Move config options from switch.rachio platform to the rachio component
|
||
# Load platforms | ||
for component in SUPPORTED_DOMAINS: | ||
discovery.load_platform(hass, component, DOMAIN, {}, config) |
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.
You can push the time config with {}
to platform without need store it to hass.data
the hole runtime.
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 was trying to figure out how that works! Thanks for the hint; I'll fix this.
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 think that it's nicer to have it all in 1 location, which is the person
. That is also how it is going to be done when you migrate to config entries.
@@ -13,7 +13,7 @@ | |||
from homeassistant.auth.util import generate_secret | |||
from homeassistant.components.http import HomeAssistantView | |||
from homeassistant.const import CONF_API_KEY, EVENT_HOMEASSISTANT_STOP, URL_API | |||
import homeassistant.helpers.config_validation as cv | |||
from homeassistant.helpers import discovery, config_validation as cv |
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.
Oh man discovery, all the cool kids are already using config entries!
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.
That's the next step! Minimal features per PR!
(really I just needed unique_id here, and fixed this while I had it open)
Description:
Some modernization to the Rachio component:
unique_id
to all rachio entitiesRelated issue (if applicable): fixes n/a
Pull request in home-assistant.io with documentation (if applicable): pending
Breaking Change
The Rachio component no longer requires you to specify
switch
andbinary_sensor
platforms. These platforms will be initialized automatically by the Rachio component. For the end user, this means:switch
andbinary_sensor
entries withplatform: rachio
manual_run_mins
on theswitch
platform, move that parameter to therachio:
component configuration.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:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable ([example][ex-requir]).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.