Hi, I’m looking for examples on the uses of the add constraints and add output properties. I’m trying to recreate the following yaml automation, but haven’t been able to make it work.
- alias: 'Trigger the alarm if in armed away'
trigger:
- platform: state
entity_id:
- binary_sensor.front_door
- binary_sensor.yard_door
- binary_sensor.garage_door
- binary_sensor.window_living_room_3_sensor
- binary_sensor.window_living_room_4_sensor
- binary_sensor.andrews_bedroom_window_sensor
- binary_sensor.entrance_pir_sensor_motion
- binary_sensor.living_room_motion_sensor_sensor
to: 'on'
- platform: state
entity_id:
- binary_sensor.visonic_mct340_e_0b000c64_1_1280
- binary_sensor.visonic_mct340_e_0b0011fb_1_1280
- binary_sensor.visonic_mct340_e_0b2a7984_1_1280
to: 'open'
condition:
- condition: state
entity_id: alarm_control_panel.ha_alarm
state: armed_away
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.ha_alarm
Basically, if the alarm is set to arm_away and any of those sensors change from off to on or closed to open trigger the alarm siren.