d0e3a6c3e5
- grupper.yaml: fjern light.indkorsel_plug fra Indkørsel og Udendørslamper grupper - lysindkorsel.yaml: tilføj switch.stik_indkorsel turn_on/off ved alle 6 handlinger - presence_simulation.yaml: tilføj switch.stik_indkorsel i morgen/aften sekvenser - andreas_kommer_hjem: tilføj switch.stik_indkorsel turn_on/off
123 lines
3.1 KiB
YAML
123 lines
3.1 KiB
YAML
## 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: numeric_state
|
|
entity_id: sensor.indkorsel_sensor_illuminance
|
|
below: 90
|
|
# - condition: state # from sunset until sunrise
|
|
# entity_id: sun.sun
|
|
# state: 'below_horizon'
|
|
action:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.indkorsel_bright
|
|
- service: switch.turn_on
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|
|
- alias: 'Sluk lys indkørsel når der er lys nok'
|
|
trigger:
|
|
platform: numeric_state
|
|
entity_id: sensor.indkorsel_sensor_illuminance
|
|
above: 90
|
|
for:
|
|
minutes: 3
|
|
# platform: sun
|
|
# event: sunrise
|
|
action:
|
|
- service: light.turn_off
|
|
data:
|
|
entity_id: light.indkorsel_2
|
|
- service: switch.turn_off
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|
|
- alias: 'Tænd lys indkørsel aften'
|
|
trigger:
|
|
platform: sun
|
|
event: sunset
|
|
condition:
|
|
- condition: time
|
|
after: '08:00:00'
|
|
before: '22:00:00'
|
|
action:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.indkorsel_bright
|
|
- service: switch.turn_on
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|
|
- alias: 'Sluk lys indkørsel aften'
|
|
trigger:
|
|
platform: time
|
|
at: "22:00:00"
|
|
action:
|
|
- service: light.turn_off
|
|
data:
|
|
entity_id: light.indkorsel_2
|
|
- service: switch.turn_off
|
|
data:
|
|
entity_id: switch.stik_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: time
|
|
after: '15:00:10'
|
|
before: '09:54:00'
|
|
- condition: numeric_state
|
|
entity_id: sensor.indkorsel_sensor_illuminance
|
|
below: 80
|
|
# for:
|
|
# minutes: 3
|
|
# - condition: state
|
|
# entity_id: sun.sun
|
|
# state: below_horizon
|
|
action:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.indkorsel_bright
|
|
- service: switch.turn_on
|
|
data:
|
|
entity_id: switch.stik_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: 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_2
|
|
- service: switch.turn_off
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|
|
|