Hope someone can help me, struggling with this for some time now.
I have 2 Zigbee motion sensors (Aqara and Ikea). I have 2 automations, each of them activating lights in the room where the motion sensor is located. Works perfectly.
Now trying to send an alert when I’m away (having an input_select variable with a specific value) when one of those motion sensors is triggered.
Having only one of the sensors in the trigger works fine. Putting both of them in an or condition does not trigger anything.
Upgraded to 2021.4.6 : in the trace no trigger activation is seen. The lights turn on however, so motion is detected and handled by the other automation.
(Working) Automation to turn lights on (for one sensor):
id: '1587231385775'
alias: MotionGarage
description: ''
trigger:
- entity_id: binary_sensor.0x00158d000464108b_occupancy
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data: {}
entity_id: switch.sw_tas_2
service: switch.turn_on
- data: {}
entity_id: switch.sw_tas_3
service: switch.turn_on
(non-working) Automation for alarm:
id: '1612474631160'
alias: Alarm
description: 'Stuur alarm '
trigger:
- platform: state
entity_id: binary_sensor.0x00158d000464108b_occupancy
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.0x90fd9ffffe35cd33_occupancy
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_select.alarm_state
state: Aan
- condition: or
conditions:
- condition: state
entity_id: input_select.alarm_state
state: Auto_Aan
action:
- service: notify.mobile_app_iphone_marco
data:
message: 'Beweging gedetecteerd om {{ now().strftime("%H:%M:%S") }}'
mode: single
I used the automation tool to create the automations.
Help is appreciated,
Marco