Are there any best practices to configuration of Home Assistant?

Hi all

Maybe like others, my congratulation was copied from someone else’s, in my case @silvrr

I was wondering if there were any best practices or approaches to follow?

I mean if you started from the ground up would you put all sensors in first and build from there? Would you dump all elements in a single view and split out.

I have found my configuration has become quite unwieldy. Would you split every device to a separate file etc.

Any techniques or recommendations to an efficient easy to manage configuration would be appreciated

There are quite a few things you can do. I tend to group logical things together as a package, and then individual configs I move out into there own file. Best thing you can do is take a look at peoples config on git hub - heres mine: https://github.com/rossdargan/hass-config

There are many better examples out there though!

1 Like

I tend to configure sensors first then I can use them in automations and scripts. I split the yaml file structure by type (input_boolean, script, etc…) with !include.

Some things that have helped:

Naming things by location then type, e.g. cinema_rear_lights, cinema_amp etc…

Listing all items (scripts, automations etc…) alphabetically in their yaml files. Coupled with my naming convention this lists all rooms together in the files and aids with searching by scrolling through the file. The editor VSCode has a neat scroll overview for this too.

For the front end I have views for rooms and a couple of extra views like automation control, a global heating and a global lights view. So some items are in more than one view.

The groups in the views are grouped by type, e.g. lights, heating, macros/scenes, etc… Though the heating group does have temperature and humidity sensors as well.

1 Like