Hi,
I have an Aqara door sensor (magnetic) that switches on the light when the door opens and switches off when closed. A timer switches off the light after 5 minutes when the door is left open.
I made the automation that toggles the light based on the sensor state, and another automation that switches off the light after 5 minutes is the door is left open.
The problem I have is that the automation triggers every hour circa and switches on the light if the door is open, I guess because the Aqara sensor is sending maybe a status check, but not sure about it.
I am new to automation and learning, so I think something is worn in my automation, can you guys help me find the problem?
alias: Closet lights
description:
trigger:
- platform: state
entity_id: binary_sensor.openclose_32
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.openclose_32
state: 'on'
sequence:
- type: turn_on
device_id: c7b365cafcaa11eab3a0056b040f18c8
entity_id: light.dimmable_light_40
domain: light
brightness_pct: 100
- conditions:
- condition: state
entity_id: binary_sensor.openclose_32
state: 'off'
sequence:
- type: turn_off
device_id: c7b365cafcaa11eab3a0056b040f18c8
entity_id: light.dimmable_light_40
domain: light
default: []
mode: single