Current setup:
- I have an Aqara motion sensor in my stairwell that turns on the basement lights on detection
- I have an Aqara FP1 in the main basement room that detects if anyone is present
- Both sensors are in a sensor group
- My office is to the left and has no motion sensors and is not in the FP1 detection zone
Objective:
Situation 1: When I come down the stairs I want the lights to come on. When someone is in the main room I want the lights to stay on (or off if they use the switch to turn off the lights).
Situation 2: When I come down the stairs I want the lights to come on. I go to my office and I want the lights to go turn off.
Here’s what I have which does turn the light on but regardless of the FP1 detection (or lack thereof) never turns the lights off. I’m trying to reset the FP1 state, then wait a minute to detect presence, then turn off the light if no one is in the room.
alias: Aqara Basement Presence
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.aqara_basement_presence_group
to: "on"
condition: []
action:
- service: script.ht_lights_on_2
data: {}
- device_id: 508e159cc75e7220dce8c832d8c92559
domain: select
entity_id: select.0x54ef441000712289_reset_nopresence_status
type: select_first
- if:
- condition: state
entity_id: binary_sensor.0x54ef441000712289_presence
state: "off"
for:
hours: 0
minutes: 1
seconds: 0
then:
- service: script.ht_lights_off
data: {}
else: []
mode: single
This might be easier in Node-RED if I knew how to use Node-RED.