I can’t figure out the below, seems silly…
I built an integration between UniFi Cameras that when a person or car is sensed on driveway it sends a command to turn on certain house lights.
This is only supposed to happen after dark, then I put in a 10 minute timer and if it’s after 10pm I want those same lights to turn off.
Then I added what I thought was an OR branch rush if it’s after 1201AM the next day (cause the motion can happen any time after midnight too) to also turn off… But they are not… I’m clearly misinterpreting the branching:
Blockquote
alias: Doorbell Camera Detected Person at Night
description: “”
triggers:
- type: turned_on
device_id: 40543053751b6ac81de96b3bbe9a94b2
entity_id: 76a46c26a754c234b460e4ad684817ca
domain: binary_sensor
trigger: device
conditions: - condition: sun
before: sunrise
before_offset: “-900”
after: sunset
after_offset: “1860”
actions: - type: turn_on
device_id: a993afffc869ebd12ca823972923daec
entity_id: cd2da8f7f3e2bcae34efea207470a238
domain: switch - type: turn_on
device_id: 0b844b0a7729a1e558f04a7de9dee01e
entity_id: 7ae4af596b97c41da6adc6a4d943a93f
domain: switch - type: turn_on
device_id: 77435b7615646a71d33cae6ce22c1f01
entity_id: bf58957b8db4b2b5028eec16e5e71e88
domain: switch - type: turn_on
device_id: 98d8314400c713d483817f5ea4e9f4d5
entity_id: 9329c28b53d76d67f872f26ec0a78cee
domain: switch - delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0 - choose:
- conditions:
- condition: time
after: “22:00:00”
weekday:- sun
- mon
- tue
- wed
- thu
- fri
- sat
- condition: or
conditions:- condition: time
after: “00:00:00”
weekday:- sun
- mon
- tue
- wed
- fri
- thu
- sat
sequence:
- condition: time
- type: turn_off
device_id: 0b844b0a7729a1e558f04a7de9dee01e
entity_id: 7ae4af596b97c41da6adc6a4d943a93f
domain: switch - type: turn_off
device_id: a993afffc869ebd12ca823972923daec
entity_id: cd2da8f7f3e2bcae34efea207470a238
domain: switch
enabled: true - type: turn_off
device_id: 77435b7615646a71d33cae6ce22c1f01
entity_id: bf58957b8db4b2b5028eec16e5e71e88
domain: switch - type: turn_off
device_id: 98d8314400c713d483817f5ea4e9f4d5
entity_id: 9329c28b53d76d67f872f26ec0a78cee
- condition: time
- conditions:
