I have 2 automations, one is saying when door sensor is closed, then switch on something. and another one the opposite, if door is open then there off something. Can I combinee this to single automation ?
alias: Windows 1 Close
description: ""
triggers:
- type: not_opened
domain: binary_sensor
trigger: device
conditions: []
actions:
- type: turn_on
domain: light
mode: single
alias: Windows 1 Open
description: ""
triggers:
- type: opened
domain: binary_sensor
trigger: device
conditions: []
actions:
- type: turn_off
domain: light
mode: single