Could someone should me how to put these to Automations in one? I use several ON and OFF automations because for some reason it doesn’t work a 100 % when i try to put it in one.
This is one of my automations (two exactly :p)
The ON one.
alias: 01_Hal - Motion AAN
description: ""
trigger:
- type: motion
platform: device
device_id: 0344c938b84bc3274da0590fb434651a
entity_id: fa0bf10cd5da20b5826af1e202ba25c0
domain: binary_sensor
id: Motion-detected
condition: []
action:
- if:
- condition: trigger
id: Motion-detected
- condition: and
conditions:
- condition: device
type: is_off
device_id: 1eb269cd591b1fc7f387bee6c06f03a0
entity_id: 85fe4bd8a5c1bde28c6a6574ffe42d60
domain: light
then:
- type: turn_on
device_id: 1eb269cd591b1fc7f387bee6c06f03a0
entity_id: 85fe4bd8a5c1bde28c6a6574ffe42d60
domain: light
brightness_pct: 80
else: []
mode: restart
The OFF one
alias: 01_Hal - Motion UIT
description: ""
trigger:
- type: no_motion
platform: device
device_id: 0344c938b84bc3274da0590fb434651a
entity_id: fa0bf10cd5da20b5826af1e202ba25c0
domain: binary_sensor
id: Motion-detected
for:
hours: 0
minutes: 2
seconds: 0
condition: []
action:
- if:
- condition: trigger
id: Motion-detected
then:
- type: turn_off
device_id: 1eb269cd591b1fc7f387bee6c06f03a0
entity_id: 85fe4bd8a5c1bde28c6a6574ffe42d60
domain: light
else: []
mode: restart