How to read the number of people in zone.house and show it in a mushroom test card?

hi there,

I try to summarize some stuff and I’m stuggling to understand how to display entities attributes right into mushroom text cards.

Here is the code I use :

type: custom:mushroom-title-card
title: Qui est a la maison?
subtitle: |

  zone.home personnes de notre famille se trouvent à la maison

I can see the state (3) when I type zone.home, but it displays at “zone.home in the text”.
How do I make sure 3 is displaying there ?
Is there a general way to query states and show them in this kind of card ?

thanks :slight_smile:

type: custom:mushroom-title-card
title: 'Qui est a la maison?  '
subtitle: |

  {{ states('zone.home') }} personnes de notre famille se trouvent à la maison

1 Like

ok so

 {{ states('entity.something ') }} 

Thank you ! :slight_smile:

Mostly, unless its an attribute of an entity. You can look at the entity in developer console → states. In that case you’d use

{{state_attr("sun.sun", "next_rising") }}

(because sun entity has an attribute called ‘next_rising’)

It’s best to play around in developer console → templates to figure out what you need.

1 Like