mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
blueprint:
|
|
name: Light on set temperature
|
|
domain: automation
|
|
input:
|
|
light:
|
|
day_temp:
|
|
default: 350
|
|
evening_temp:
|
|
default: 400
|
|
night_temp:
|
|
default: 500
|
|
|
|
trigger:
|
|
platform: state
|
|
entity_id: !input light
|
|
to: "on"
|
|
|
|
mode: parallel
|
|
|
|
condition:
|
|
condition: state
|
|
entity_id: sensor.house_mode
|
|
state: "day"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: sun
|
|
before: sunset
|
|
sequence:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
color_temp: !input day_temp
|
|
|
|
- conditions:
|
|
and:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: not
|
|
conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
after_offset: "+03:00:00"
|
|
sequence:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
color_temp: !input evening_temp
|
|
|
|
- conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
after_offset: "+03:00:00"
|
|
- condition: sun
|
|
before: sunrise
|
|
sequence:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
color_temp: !input night_temp
|