Configuration.yaml & other questions

What is the best practice of breaking my configuration.yaml into multiple files so that I can manage things better? I’m going to have 30+ Zwave devices, 10+ IoT devices, and a whole lot of logic (30-50+ rules) to go with this. Over in a competitor’s system, you break all those things up into folders (items, rules, etc…) containing files (zwave.items, alarm.rules, etc…) defining items. This makes sense, since one file containing all of this would get unwieldy very quickly.

But I can’t find any docs on how to do this in HASS.

Also, do I have to actually fully stop and restart HASS to get it to re-read my configs? Will all my state information be lost?

Last question, how do I create create variable to save internal states, such as alarm/vacation modes?

You can use !include to include other config files.

device_tracker: !include device_tracker.yaml

[quote=“nkgilley”]You can use !include to include other config files.

device_tracker: !include device_tracker.yaml

Perfect! Thanks, that helps a lot.

Would you happen to know how to create state variables, too?
And will they survive a restart?

You can use scenes to replicate states. Have you seen: https://home-assistant.io/components/scene/

Hmmm… can I then later query to see if a scene is on?

So for instance, if my phone rings, I want things to work differently when I’m in Movie scene than when I’m not.
Or when an inside motion detector fires, I want different rules depending on if my Alarm scene is on than when it is off.

For these situations it is better to write your own Python scripts instead of using the automation component.

About keeping track of states like vacation mode, I am planning to support something similar to that soon.