#Thanks scottg4898258 for the hint I have
1 messages ยท Page 1 of 1 (latest)
FYI, with the magic of #templates-archived you can have a single automation that lists 20 entities in the same trigger, and it'll tell you which one caused the automation to start
- service: notify.petunia
data:
message: "The {{ trigger.to_state.name }} window is open, you may want to close it"
You can also use #templates-archived to walk a group and tell you which members are on (open)
sound exactly what I am looking for ๐
{{
expand(states.binary_sensor.bad_eg, states.binary_sensor.bad_og, states.binary_sensor.esszimmer)
|selectattr('state', 'eq', 'on')
|map(attribute='name')
|join(',')
}}
Yup, and you can do that with groups
{{ expand('group.my_exterior_doors')|selectattr('state', 'eq', 'on')|map(attribute='name')|list|join(', ') }}
I did this and it works quite fine to see what windows are open, but I somehow fail to reduce it just to the last one so I can send the automation
*send the message
The #templates-archived channel can likely help with that, you can find out the one that most recently changed state
I used to do that, but resorted to "brute force"
Oh thats really nice of you sharing this
That is going to be step learning curve for me ๐
Thanks a lot @lofty creek and @midnight pumice for your time and sharing insights
I'll be honest, most of my templates are carefully stolen from posts in the #templates-archived channel, or on the forum
There's some really smart people over there who do mind blowing stuff with templates - I'm just a hack by comparison ๐
๐ but you are sharing your knowledge and thats all that counts ๐