This template sensor:
- platform: template
sensors:
alarm_status:
friendly_name: "Triggered Alarms"
value_template: >-
{% if is_state('binary_sensor.master_motion', 'on') %}
Bedroom Motion!
{% else %}
clear
{% endif %}
{% if is_state('binary_sensor.office_motion', 'on') %}
Office Motion!
{% else %}
clear
{% endif %}
Generates
sensor.alarm_status = clear clear
or
= Bedroom Motion! Office Motion!
but I can’t get this automation to fire:
- alias: Security - Motion Alarm
trigger:
- platform: state
entity_id: sensor.alarm_status
from: 'clear'
to: 'Bedroom Motion!'
- platform: state
entity_id: sensor.alarm_status
from: 'clear'
to: 'Office Motion!'
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
If I change the template sensor to just one entity, then it works fine. Does that mean the trigger doesn’t understand the state from: 'clear'
since the state of the sensor.alarm_status
is actually clear clear
?
I hope it makes sense. Thanks!