Home Assistant - Displaying entities on card based on state of other entities
Emiliano Guerzoni
Project Manager | BESS Development | Driving 3+ GW of Energy Storage Projects in Italy
Good morning everyone,
In this article I introduced how to have entities displayed on a card according to their state.
Today I want to go a little bit deeper.
Use case
You want to display an entity (e.g. your geocoded position) only when you are not home.
Software configuration
Home Assistant code (yaml)
This is the piece of code you have to write down to configure your card where the entity has to be reported:
title: Position detail
state_color: true
type: entities
entities:
? - entity: person.A
? - type: conditional
? ? conditions:
? ? ? - entity: person.A
? ? ? ? state_not: home
? ? row:
? ? ? entity: sensor.[yoursmartphone]_geocoded_locations
Some specifics about the code above
You can define as many type: conditional as you want, here more details about this very useful feature to help having your cards super clean and better organized.
I do hope you have enjoyed this article.
I'm available for any feedback so, feel free to contact me or share your thoughts in the comments section below!
Thank you for reading. ??
领英推荐
--------------------------------------------------------------------------------------------------------
Hereafter other articles about?Home Assistant: