Hello! I am a little bit struggling with script which would check if any window is open and if it is - send me a message with friendly name of the entity (or names if there are several open windows)
So, here is the basic part of the script:
'1536739215145':
alias: Check if windows are open while leaving
sequence:
- condition: state
entity_id: binary_sensor.door_window_sensor_158d0002bfc936
state: 'off'
And now I need to check my group.all_windows and find out which ones are open
I have a light group named “group.allhouse” and a switch group named group.allhouse_switch. I have made an automation for HA to warn me if any switch or light is open. I have tried your code with changes but it gives error. Where am I wrong ?
service: notify.telegrambot
data:
title: Open Lights
message: Bugün {{ states|selectattr('entity_id', 'in', state_attr('group.allhouse ', 'entity_id'))|selectattr('state', 'equalto', 'on')|map(attribute='name')|join(', ')}}