47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
- alias: 'Lys ved garage'
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.indkorsel_sensor_motion
|
|
to: 'on'
|
|
condition:
|
|
- condition: numeric_state
|
|
entity_id: sensor.indkorsel_sensor_illuminance
|
|
below: 90
|
|
# - condition: time
|
|
# before: '23:00:00'
|
|
|
|
|
|
# - condition: state
|
|
# entity_id: sun.sun
|
|
# state: below_horizon
|
|
action:
|
|
- service: homeassistant.turn_on
|
|
entity_id:
|
|
- light.drivhus
|
|
- light.paradis
|
|
- condition: template
|
|
value_template: "{{ now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 }}"
|
|
- service: homeassistant.turn_on
|
|
entity_id: light.extended_color_light_1
|
|
|
|
- alias: 'Sluk lys ved garage'
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.indkorsel_sensor_motion
|
|
to: 'off'
|
|
for:
|
|
minutes: 10
|
|
action:
|
|
- service: homeassistant.turn_off
|
|
data:
|
|
entity_id:
|
|
- light.drivhus
|
|
- light.paradis
|
|
- condition: template
|
|
value_template: "{{ now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 }}"
|
|
- service: homeassistant.turn_off
|
|
entity_id: light.extended_color_light_1
|
|
|
|
|
|
|