Hello, I need some help with an automation.
I want to use my philips hue motion sensor to activate my alarm and my lights when the alarm is disarmed.
The only problem is that I don’ t want that the light to trigger when motion is detected when my alarm is not disarmed.
I already did some research but it didn’ t word.
I hope someone can help me.
My code is:
alias: sensor
description: ""
trigger:
- type: motion
platform: device
device_id: 2d2e502bcfde53422eb14011f63c1375
entity_id: binary_sensor.sensor_lucas_motion
domain: binary_sensor
condition:
- condition: state
entity_id: alarm_control_panel.alarmo
attribute: arm_mode
state: disarmed
for:
hours: 0
minutes: 0
seconds: 0
enabled: true
action:
- service: scene.turn_on
target:
entity_id: scene.slaapkamer_lucas_helder
metadata: {}
enabled: true
mode: single