Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Config structure for embedded platforms #142
It's nice that we streamline the ways of introducing new component and/or platform modules to home assistant. Now, we know that there should always be a new component package and a platform should go under that component.
But what about config structure? Should we keep the platforms (itach) under a domain (remote) config structure also for new platforms? Or should we ask to set up a component that has the config?
referenced this issue
Feb 7, 2019
Is there an example for how this would look like config-wise? Something like this?
itach: # itach settings remotes: - # itach remote setting
What would this look like for components that have platforms in multiple domains (for example MQTT; I'm in no way suggesting breaking change there :D )
+1. I agree that it would make sense. My reasoning is one of consistency, though ... I don't think the source code layout should dictate the configuration format.
For contributors, I also think it would be very good to always start out on the right path. I can be quite discouraging to throw away work and make a breaking change ("graduate to component"), maybe just 1 release after the initial support.
Config-wise, I want to suggest using the domain name for subsections. So "remote" rather than "remotes" (and "sensor" rather than the "sensors" of rainmachine). This will avoid a breaking change when moving from supporting a single entity to several. I also think it matches the existing YAML well and it avoids some hard questions about the plural naming of things like "notify" and "climate".
Well, I do think we can go with this but I tried to migrate netgear_lte (home-assistant/home-assistant#22105) and I guess some things are still not clear to me.
My current layout is this:
netgear_lte: - host: !secret router_hostname password: !secret router_password notify: - name: sms recipient: !secret admin_phone sensor: monitored_conditions: - usage - sms - host: !secret failover_modem_hostname password: !secret failover_modem_password notify: - name: failover_sms recipient: !secret admin_phone sensor: monitored_conditions: - usage