432 lines
11 KiB
YAML
432 lines
11 KiB
YAML
- id: kids_lamps_on_sunset
|
|
alias: "Kids Lamps - On at sunset (full white)"
|
|
trigger:
|
|
- platform: sun
|
|
event: sunset
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.mpho_lamp
|
|
- light.hloni_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp_kelvin: 6500
|
|
transition: 5
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: kids_lamps_warm_20_30
|
|
alias: "Kids Lamps - Warm at 20:30"
|
|
trigger:
|
|
- platform: time
|
|
at: "20:30:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.mpho_lamp
|
|
- light.hloni_lamp
|
|
data:
|
|
brightness_pct: 40
|
|
color_temp_kelvin: 2200
|
|
transition: 30
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: kids_lamps_hloni_off_22_00
|
|
alias: "Kids Lamps - Hloni off at 22:00"
|
|
trigger:
|
|
- platform: time
|
|
at: "22:00:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.hloni_lamp
|
|
data:
|
|
transition: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: kids_lamps_mpho_dim_02_00
|
|
alias: "Kids Lamps - Mpho dim to 5% at 02:00"
|
|
trigger:
|
|
- platform: time
|
|
at: "02:00:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.mpho_lamp
|
|
data:
|
|
brightness_pct: 5
|
|
color_temp_kelvin: 2200
|
|
transition: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: kids_lamps_mpho_off_sunrise
|
|
alias: "Kids Lamps - Mpho off at sunrise"
|
|
trigger:
|
|
- platform: sun
|
|
event: sunrise
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.mpho_lamp
|
|
data:
|
|
transition: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: brian_lamp_on_sunset
|
|
alias: "Brian Lamp - On at sunset (full white)"
|
|
trigger:
|
|
- platform: sun
|
|
event: sunset
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.brian_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp_kelvin: 6500
|
|
transition: 5
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: brian_lamp_off_20_30
|
|
alias: "Brian Lamp - Off at 20:30"
|
|
trigger:
|
|
- platform: time
|
|
at: "20:30:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.brian_lamp
|
|
data:
|
|
transition: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_on_sunset
|
|
alias: "Moirah Lamp - On at sunset (full white)"
|
|
trigger:
|
|
- platform: sun
|
|
event: sunset
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp_kelvin: 6500
|
|
transition: 5
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_dim_20_30
|
|
alias: "Moirah Lamp - Dim to 50% at 20:30"
|
|
trigger:
|
|
- platform: time
|
|
at: "20:30:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 50
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_dim_21_00
|
|
alias: "Moirah Lamp - Dim to 15% at 21:00"
|
|
trigger:
|
|
- platform: time
|
|
at: "21:00:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 15
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_dim_22_00
|
|
alias: "Moirah Lamp - Dim to 5% at 22:00"
|
|
trigger:
|
|
- platform: time
|
|
at: "22:00:00"
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 5
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_off_sunrise
|
|
alias: "Moirah Lamp - Off at sunrise"
|
|
trigger:
|
|
- platform: sun
|
|
event: sunrise
|
|
action:
|
|
- repeat:
|
|
count: 3
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
transition: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ repeat.index < 3 }}"
|
|
then:
|
|
- delay: "00:01:00"
|
|
mode: single
|
|
|
|
- id: moirah_lamp_enforce_schedule
|
|
alias: "Moirah Lamp - Enforce schedule while available"
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
- platform: time_pattern
|
|
minutes: "/5"
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '20:30:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp_kelvin: 6500
|
|
transition: 5
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '21:00:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 50
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '22:00:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 15
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: sun
|
|
before: sunrise
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 5
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
default:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
transition: 1
|
|
mode: single
|
|
|
|
|
|
- id: moirah_lamp_sync_schedule
|
|
alias: "Moirah Lamp - Sync to schedule when available"
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
- platform: state
|
|
entity_id: light.moirah_lamp
|
|
from: "unavailable"
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '20:30:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp_kelvin: 6500
|
|
transition: 5
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '21:00:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 50
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: template
|
|
value_template: "{{ now().strftime('%H:%M:%S') < '22:00:00' }}"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 15
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: sun
|
|
before: sunrise
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
brightness_pct: 5
|
|
color_temp_kelvin: 2000
|
|
transition: 30
|
|
default:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.moirah_lamp
|
|
data:
|
|
transition: 1
|
|
mode: single
|
|
|
|
|
|
- id: main_bedroom_plug_on_04_00_for_45_min
|
|
alias: "Main Bedroom Plug - On at 04:00 for 45 minutes"
|
|
initial_state: false
|
|
trigger:
|
|
- platform: time
|
|
at: "04:00:00"
|
|
action:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.main_bedroom_plug
|
|
- delay: "00:45:00"
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.main_bedroom_plug
|
|
mode: single
|