🧭 Navbar card: easily navigate through dashboards

Hi all
Somebody can tell me how to get number of lights turn on in JSTemplate to display in badge ?
I have the following YAML which working but don’t understand to get it OK in JSTemplate.

{{ states.light | rejectattr('attributes.entity_id', 'defined') | selectattr('state', 'eq', 'on') | list | count}}

EDIT : and so on get number of entity ON in a groups of light

Thanks

Maybe I’m dumb but is there a way to make the badges conditional? I want a badge with how many lights are on but it still returns a blank badge even with the sensor outputting null.

Hi everyone!

Is this dashboard done with navbar card? If so, how does it use “docked” in desktop mode? Or is it some CSS magic i can’t figure out?


Thank you!

1 Like