Link from configuration.yaml to a list of input_booleans

I have 38 input_booleans and I’m a newbie; I will surely wind up with many more. Mostly I use them to create cards that open and close on a click, so I can have menus and fast navigation. I initially created them using UI helpers, but I want a few on initially and prefer semantic names, so I moved them to configuration.yaml. Is there a way to create a yaml file that lists all my input_booleans and is read by configuration.yaml, to declutter configuration.yaml, along the lines of scripts.yaml?

I realize HA would like us to use the UI helpers, but it doesn’t handle copying existing input_booleans, or on by default, AFAIK.

Create a new file containing all of your existing Input Boolean configurations. Let’s assume the new file’s name is input_booleans.yaml. Ensure input_boolean: is not included on the first line (or anywhere else) in that file.

In your configuration.yaml file remove all Input Boolean configurations and change it to this:

input_boolean: !include input_booleans.yaml

Go to Developer Tools > YAML and run Check Configuration. If it passes, restart Home Assistant.

After it starts, go to Developer Tools > States and confirm all your Input Booleans are present.

Reference

Splitting up the configuration

2 Likes

Perfect, thank you! Worked first time.

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.

Done! Thank you again.

1 Like