With a simple script i count all open windows (binary Sensors). The number of open windows is shown in a badge.
When clicking the badge i get a more-info Dialog that shows me only the changes of the amount of Open windows at a Timeline. It would be Great if i could Show instead of the default more-info Dialog a list with all windows and their states. Something like the group-more-info Dialog Looks like.
Is there an Solution for what i want to do? Isnt this a normal use Case?
To answer your original question, you could probably set the specific windows as ‘attributes’ to the sensor your script is creating. I’d think it would just be a dictionary/hash of the window sensor ids and whether they’re open or not.
I’m not sure if there’s another/prettier way to do that.
Could you explain your approach a little bit further? I am quite new to hass and still Learning a lot.
Here is One of my Counting scripts, here for lights. Where could i Add attributes and how to Count and display them in the badge and them how to Show all relevant entities?:
indent preformatted text by 4 spaces
{% for state in states
if ( 'light' in state.entity_id
and state.domain in ['light','switch']
and state.state == 'on' ) -%}
{% if loop.last -%}
{{ loop.index }}
{%- endif %}
{% else %}
0
{%- endfor %}