Hi,
I tried really hard but can’t figure it out. I try to do the following. I have written a script which arms my alarm system and one which disarms the alarm system:
alarm_arm:
alias: Alarm-Arm
mode: single
sequence:
- data:
code: xxxx
entity_id: alarm_control_panel.security
entity_id: alarm_control_panel.security
service: alarm_control_panel.alarm_arm_away
icon: mdi:shield-lock
alarm_disarm:
alias: Alarm-Disarm
icon: mdi:shield-home
mode: single
sequence:
- data:
entity_id: alarm_control_panel.security
entity_id: alarm_control_panel.security
service: alarm_control_panel.alarm_disarm
I trigger them via a button in Lovelace. Works great so far. I also created a group which includes all my window sensors. This group either has the status Off or On depending on if one of the windows is open or closed. Also works great. Now I would like to include some magic in the above arm script which does the following:
If Group = On
Then
send some notifications etc. that the windows have to closed
terminate the script
Else
arm the alarm system with the working code above
I would really appreciate some help here or some building blocks for the code. Thank you.