This commit is contained in:
2022-01-19 07:17:26 +01:00
parent 93dca5e8b4
commit 3be704e23c
18 changed files with 831 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
## Skal være tændt fra solnedgang og til kl 22
## og fra 6-solopgang
## derudover: hvis solen er under horisonten, så tænd i 5 minutter ved bevægelse
- alias: 'Tænd lys indkørsel morgen'
trigger:
platform: time
at: "06:00:00"
condition:
- condition: state # from sunset until sunrise
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_on
data:
entity_id: light.indkorsel
- alias: 'Sluk lys indkørsel morgen'
trigger:
platform: sun
event: sunrise
action:
- service: light.turn_off
data:
entity_id: light.indkorsel
- alias: 'Tænd lys indkørsel aften'
trigger:
platform: sun
event: sunset
condition:
- condition: time
before: '22:00:00'
action:
- service: light.turn_on
data:
entity_id: light.indkorsel
- alias: 'Sluk lys indkørsel aften'
trigger:
platform: time
at: "22:00:00"
action:
- service: light.turn_off
data:
entity_id: light.indkorsel
- alias: 'Tænd lys indkørsel ved bevægelse'
trigger:
platform: state
entity_id: binary_sensor.indkorsel_sensor_motion
to: 'on'
condition:
- condition: time
after: '22:00:10'
before: '05:54:00'
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: light.turn_on
data:
entity_id: light.indkorsel
- alias: 'Sluk lys indkørsel 15 min efter bevægelse'
trigger:
platform: state
entity_id: binary_sensor.indkorsel_sensor_motion
to: 'off'
for:
minutes: 15
condition:
- condition: time
after: '22:00:10'
before: '05:54:00'
- condition: state
entity_id: sun.sun
state: below_horizon
action:
service: light.turn_off
data:
entity_id: light.indkorsel