How I Built My Automated Dashboard
Creating a clean dashboard is not difficult, especially when hiding items that are not needed! This article will show you how to hide items as well as entire sections.
As mentioned in the video on my YouTube channel, everything used in this article is using Home Assistant.
Conditional Card
Everything in this article will be using the conditional card. This shows or hides a card based on a condition. (A card is a dashboard item)
Here is how I am using it. If the garage door is open, then show the Conditional Card. If the garage door is closed, then hide it. This can all be set up in the UI but here is the YAML.
type: conditional
conditions:
- condition: state
entity: cover.ratgdo
state: open
card:
type: tile
entity: cover.ratgdo
name: Small Garage Door
I love this because it keeps the dashboard nice and clean since I only see devices that I need to.
I’m using this for the robot vacuum, front door, input booleans to skip automations, alarm, and extra buttons.
Room presence
Now to take it up a notch, only showing one room on the dashboard based on room presence detection.
This is great because every time the dashboard is opened up, the controls for the room are right there front and present.
There are three things needed for this to work like I showed in the video: showing and hiding the room, ESPresence for room detection, and the drop down to manually select the room.
First I’ll go over hiding the room. Add a new Card to the dashboard and select Conditional Card like before. For the Card, select Vertical Stack. This will allow multiple Cards to be shown or hidden from the condition.
Next ESPresence will need added. I did a few videos on it, and here’s the most helpful one.
Now the Conditional Card needs to use the room presence detection. Here is the condition for one of the rooms.
type: conditional
conditions:
- condition: state
entity: sensor.reed_room
state: studio_esp
card:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Studio area
This could be added for each room and it would work great. The only issue is not being able to manually change the room. This can come in handy and it’s not difficult to add a drop down to select the room.
To make a drop down, go to the Helpers section in Home Assistant. /config/helpers Then create a Helper and select “Dropdown”.
Add all the rooms to the dropdown. I also added two more, one called “Auto” and one called “Not home”. I am using Auto to automatically select the room and Not home when ESPresence doesn’t detect I’m in a room.
I added the dropdown to the top of the dashboard so I can quickly change rooms if needed.
To make the Conditional Card for the room, use both the dropdown and the ESPresence. This will require extra logic. There is an “or” as well as an “and”.
The “or” allows the dropdown to manually change the room. The “and” makes it so the ESPresence has to be in the room with Auto selected in the dropdown.
It might seem like a lot, but this will make it so only one rooms shows up at a time.
Here is the final YAML of one of the rooms to use as an example.
type: conditional
conditions:
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity: sensor.reed_room
state: studio_esp
- condition: state
entity: input_select.reed_dashboard_select
state: Auto
- condition: state
entity: input_select.reed_dashboard_select
state: Studio
card:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Studio area
Hope this helps you create an amazing dashboard! If it did, please consider subscribing to Smart Home Solver on YouTube so I can keep making more content like this.