Once you’ve added all your home appliances to Home Assistant, it’s time to put some order into them. You do this with dashboards and automations. Home Assistant is very flexible and makes it possible to really make it your own personal home automation system.

Koen Vervloesem

messy 2

Home Assistant shows all added entities in its dashboard by default, which quickly becomes cluttered

Just throwing all devices together in the Home Assistant dashboard is not a good idea. The number of badges quickly runs out, because each device can have multiple entities. And the boxes at the bottom with switches, lights and other information show their devices by room or type of device by default, which isn’t always what you want.

CONTROL OF THE DASHBOARD
The Home Assistant dashboard interface is called Lovelace and you can customize it to your liking. We’ll keep the default dashboard, but create an additional dashboard. Go to Institutions and then to Lovelace Dashboards and click on the bottom right Dashboard add. Give your dashboard a name (e.g. ‘Home’) and optionally an icon. For the latter, go to the Material Design Icons website (materialdesignicons.com), find a nice icon and look at the name. For example, if that is ‘home’, enter ‘mdi:home’ in Home Assistant at the icon. The corresponding icon will then appear next to it. Leave Show enabled in the sidebar and finally click Create.
In the sidebar you will now see your chosen icon and if you click on it you will see the exact same messy dashboard as before. But now click on the hamburger menu at the top right (the three dots) and then choose Configure UI. You will now be asked if you want to take control of the interface. Switch Start with a blank dashboard and right click take over. You will now be presented with an empty dashboard, ready to fill in all by yourself.

cards 2
Home Assistant allows you to add various types of cards to your dashboard

YOUR OWN DASHBOARD
The blank dashboard you just created is in edit mode, which you can see from the text Edit UI top left. First, define a ‘view’ (a tab) by clicking the plus sign at the top left. Now give the view a name and icon (again from Material Design Icons), after which you click Save clicks.
You now fill this view one by one with cards. Click on the top right Add map. You will then get previews of all types of cards. For example, if you Weather forecast choose, Home Assistant already automatically selects the compatible entity it created by default, with the weather forecast for your location. Enter a name here if necessary and then click Save. Your dashboard now includes a weather forecast map

VIEW SENSORS
Another interesting card is Sensor, which shows the graph of a sensor reading from the last 24 hours. But often you want to show several of these graphs below each other, so that you can compare them. Choose the card for that Vertical stack (at the very bottom of the list). In its configuration you can choose cards again and then add a sensor card. By card type Sensor do you shift the best Show more details in, because otherwise Home Assistant will flatten the graph very much..

vertical stack 2
A vertical stack is a neat way to keep cards in the same column

Don’t click right now Save, but on the plus sign at the top. Then a new card is added to the pile, you choose a card type again and fill in the data. When you’ve created all the cards in the deck, click at the bottom right Save. The cards don’t all have to be sensor cards, by the way; you can also mix different types of cards in a pile.

DASHBOARD FINE TUNING
In the end, you can tailor a dashboard perfectly. Be sure to take a look at all types of cards, because there are extensive options, such as the card Conditional, which displays other cards only when a specific condition is met. That way you can, for example, only show the ink levels of your printer when your printer is turned on, otherwise it will say ‘Not available’.
A quick way to add entities to a map is to click . in edit mode at the top right of the hamburger menu Unused entities to click. You will now see a list of all entities that are not yet in the dashboard. Then select a few entities that you think logically belong together. This can be done by checking the box for the entities one by one. You can also enter a term in the search field to filter the large list of entities. Finally, click on the button at the bottom right Add map. Home Assistant now creates a map with these entities.

dashboard filled 2
You fill the Home Assistant dashboard with cards at will

You can also add views in edit mode, each with their own name or icon. Finally, don’t forget to click the cross in the top left to exit the edit mode. You can edit your dashboard again at any time later by clicking . in the hamburger menu Configure UI to click. If you are satisfied with your dashboard, you can go to Lovelace Dashboards set your own dashboard as default, so that the cluttered dashboard with all entities and maps is no longer shown.

AUTOMATE
With your dashboard you can view the status of devices and control devices, but it is all still done manually. Real home automation is all about automation, so that you outsource as many tasks as possible. Here too, Home Assistant offers countless possibilities and the concept is called in the interface automations. Automations in Home Assistant are actually small programs or recipes in which you describe tasks that should be done automatically. But you don’t need to be able to program for it: you put the automations together in a user-friendly interface.

TRIGGER
An automation in Home Assistant consists of three parts: one or more triggers, one or more (optional) conditions and one or more actions. So the simplest automation consists of one trigger with one action. A trigger starts the automation. It can be a threshold value of a temperature sensor that is exceeded, or the sun is setting, a time that comes and so on. If you define multiple triggers, the automation will start as soon as one of those triggers becomes active.

TERMS AND CONDITIONS
If the automation has no condition, then when a trigger is activated, the actions are performed immediately. But if there are conditions, they can prevent the actions. They will then only be executed if all conditions are met. A condition can be that you are not at home, that the sun has set, and so on. Triggers and conditions are very similar, but the difference is that a trigger is activated by something that happens, while a condition only looks at a state after activating a trigger.

automation website 2
Home Assistant documentation explains automations in detail

Finally, if all the conditions of the automation are met, all actions are performed. Then, for example, a light is switched on, the temperature of your thermostat is set or a push notification is sent to your phone.

AUTOMATIC BOX LIGHTING
Suppose you have a closet in a rather dark room. Every time you open that closet, you also turn on the light in the room, because otherwise you won’t be able to see what’s in the closet. If you now have a door contact sensor supported by Home Assistant and your lighting can also be controlled via Home Assistant, you can automate this. Let’s see how that happens. Create a new automation by entering in Institutions and Automations clicking Add Automation. You will then receive an empty list of automations for the time being. Click on the bottom right Automation add. You will now be asked to explain in one sentence what you want to do. Unfortunately, this only supports English and doesn’t work properly yet. Therefore click on To skip.

cabinet door 2

When the cabinet door is opened, the lighting switches on automatically

Now fill in the fields of the automation one by one. Give them a name, for example ‘Illuminate cabinet when opened’. At the trigger you leave the trigger type on Device and select the contact sensor from the list below. Then choose as trigger X contact open.
Scroll to the actions, leave the action type on Device and select your lighting from the list of devices below. Then choose as an action Enable X. You can also adjust the brightness and flash if you want. Finally click Save to create your automation.
Now when you open your case, the contact sensor is open, the trigger is executed in your automation, and your lights come on. You could now also make another automation that turns off the lighting when the cabinet closes.

ONLY AT NIGHT
You could make an equivalent automation to automatically switch on the bathroom light at night when there is movement in the hallway. That way you don’t have to look for the light button yourself. So create a new automation and give it a name. Choose your motion sensor device and then “X started detecting motion” as the trigger.
You now want the light to come on only at night. You could define night as: ‘it is after sunset or before sunrise’. After all, Home Assistant considers from sunset to midnight after sunset and from midnight to sunrise before sunrise.

MORE CONDITIONS
So click under Conditions on Add condition and first choose ‘Or’ as the type of condition. Then Home Assistant shows a new block within that condition where you can choose a type of condition again. Choose this time Sun and tick After sunset at. Then click Add condition (the top one, so within the Or block) and fill in the new condition with the type ‘Sun’ and check Before sunrise at.
Finally, scroll to actions, choose your lamp as a device and as an action Enable X. It is advisable to enter a weak brightness here so that you are not dazzled at night.

more conditions 2
You can combine multiple conditions in an automation