I have this automation :
- id: 'LuceTerrazzoONPortaSala'
alias: Luce Terrazzo ON PortaSala
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d0001bf93b7
to: 'on'
condition:
condition: or
conditions:
- condition: sun
after: sunset
after_offset : "-00:30:00"
- condition: sun
before: sunrise
before_offset : "00:30:00"
action:
- service: light.turn_on
data:
entity_id: light.luce_terrazzo
brightness: 254
color_temp: 300
Basically is “turn on the terrace light, full white on, during the night hours if I open the door”
I need to add this condition : “but don’t do it if the other door sensor is ON”.
So, I need (NIGHT_HOUR_1 OR NIGHT_HOUR_2) AND (DOOR SENSOR IS OFF)
Can someone help me with the syntax, please?