92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
- alias: 'Gardiner - alle lidt nede arbejdsdag'
|
|
trigger:
|
|
- platform: time
|
|
at: '07:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.arbejdsdag
|
|
state: 'on'
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.alle_lidt_nede
|
|
|
|
- alias: 'Gardiner - alle lidt nede ikke arbejdsdag'
|
|
trigger:
|
|
- platform: time
|
|
at: '09:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.arbejdsdag
|
|
state: 'off'
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.alle_lidt_nede
|
|
|
|
- alias: 'Gardiner - morgen arbejdsdag'
|
|
trigger:
|
|
- platform: time
|
|
at: '06:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.arbejdsdag
|
|
state: 'on'
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.morgen
|
|
|
|
- alias: 'Gardiner - morgen ikke arbejdsdag'
|
|
trigger:
|
|
- platform: time
|
|
at: '07:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.arbejdsdag
|
|
state: 'off'
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.morgen
|
|
|
|
- alias: 'Gardiner - alt ned ved solnedgang (tidligst 18, senest 21)'
|
|
trigger:
|
|
- platform: sun
|
|
event: sunset
|
|
id: solnedgang
|
|
- platform: time
|
|
at: '18:00:00'
|
|
id: kl18
|
|
- platform: time
|
|
at: '21:00:00'
|
|
id: kl21
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
# Solnedgang mellem 18 og 21 -> kør ved solnedgang
|
|
- condition: and
|
|
conditions:
|
|
- condition: trigger
|
|
id: solnedgang
|
|
- condition: time
|
|
after: '18:00:00'
|
|
before: '21:00:00'
|
|
# Solen allerede gået ned kl 18 -> kør kl 18
|
|
- condition: and
|
|
conditions:
|
|
- condition: trigger
|
|
id: kl18
|
|
- condition: sun
|
|
after: sunset
|
|
# Solen ikke gået ned kl 21 endnu -> kør kl 21
|
|
- condition: and
|
|
conditions:
|
|
- condition: trigger
|
|
id: kl21
|
|
- condition: sun
|
|
before: sunset
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.n22_alt_ned |