Wakeup lights fading in is now a variable
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: a0432e373b...4c357d5b73
@ -321,7 +321,9 @@ script:
|
|||||||
entity_id: light.emma_bedroom_light
|
entity_id: light.emma_bedroom_light
|
||||||
data:
|
data:
|
||||||
brightness_pct: "{{ brightness }}"
|
brightness_pct: "{{ brightness }}"
|
||||||
transition: 300
|
transition: >
|
||||||
|
{% from 'time.jinja' import timer_duration %}
|
||||||
|
{{ timer_duration('input_number.wakeup_lights_fade_night') }}
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: light.hallway_overhead
|
entity_id: light.hallway_overhead
|
||||||
@ -347,10 +349,20 @@ script:
|
|||||||
entity_id: light.emma_bedroom_light
|
entity_id: light.emma_bedroom_light
|
||||||
data:
|
data:
|
||||||
brightness_pct: "{{ brightness }}"
|
brightness_pct: "{{ brightness }}"
|
||||||
transition: 60
|
transition: >
|
||||||
|
{% from 'time.jinja' import timer_duration %}
|
||||||
|
{{ timer_duration('input_number.wakeup_lights_fade_day') }}
|
||||||
# Climate/White Noise
|
# Climate/White Noise
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.early_night_mode
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
- delay:
|
- delay:
|
||||||
minutes: 5
|
minutes: 5
|
||||||
|
else:
|
||||||
|
- delay:
|
||||||
|
minutes: "{{ states('input_boolean.wakeup_lights_fade_night') }}"
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.white_noise_emma_bedroom
|
entity_id: input_boolean.white_noise_emma_bedroom
|
||||||
|
@ -72,6 +72,20 @@ input_number:
|
|||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: minutes
|
unit_of_measurement: minutes
|
||||||
icon: mdi:timer
|
icon: mdi:timer
|
||||||
|
wakeup_lights_fade_day:
|
||||||
|
name: Wakeup Lights Fade Day
|
||||||
|
min: 0
|
||||||
|
max: 15
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: minutes
|
||||||
|
icon: mdi:timer
|
||||||
|
wakeup_lights_fade_night:
|
||||||
|
name: Wakeup Lights Fade Night
|
||||||
|
min: 0
|
||||||
|
max: 15
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: minutes
|
||||||
|
icon: mdi:timer
|
||||||
|
|
||||||
input_select:
|
input_select:
|
||||||
living_room_scenes:
|
living_room_scenes:
|
||||||
|
@ -82,6 +82,8 @@ script:
|
|||||||
alias: 'Master Bedroom Wakeup'
|
alias: 'Master Bedroom Wakeup'
|
||||||
mode: restart
|
mode: restart
|
||||||
sequence:
|
sequence:
|
||||||
|
- variables:
|
||||||
|
brightness: "{{ state_attr('switch.adaptive_lighting_master_bedroom','brightness_pct') }}"
|
||||||
- service: button.press
|
- service: button.press
|
||||||
target:
|
target:
|
||||||
entity_id: button.master_bedroom_day_mode
|
entity_id: button.master_bedroom_day_mode
|
||||||
@ -104,6 +106,52 @@ script:
|
|||||||
{% set weather = states('weather.iron_nerd_weather_station') %}
|
{% set weather = states('weather.iron_nerd_weather_station') %}
|
||||||
{{ weather in ['cloudy','partlycloudy','rainy','snowy','hail','lightning','lightning-rainy','pouring','snowy-rainy'] }}
|
{{ weather in ['cloudy','partlycloudy','rainy','snowy','hail','lightning','lightning-rainy','pouring','snowy-rainy'] }}
|
||||||
then:
|
then:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.early_night_mode
|
||||||
|
state: 'on'
|
||||||
|
sequence:
|
||||||
|
- service: switch.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: switch.adaptive_lighting_master_bedroom
|
||||||
|
- delay:
|
||||||
|
seconds: 1
|
||||||
|
- service: light.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: light.master_bedroom_lights
|
||||||
|
data:
|
||||||
|
brightness_pct: "{{ brightness }}"
|
||||||
|
transition: >
|
||||||
|
{% from 'time.jinja' import timer_duration %}
|
||||||
|
{{ timer_duration('input_number.wakeup_lights_fade_night') }}
|
||||||
|
- delay:
|
||||||
|
minutes: "{{ states('input_number.wakeup_lights_fade_night') }}"
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.master_bedroom_scenes
|
||||||
|
data:
|
||||||
|
option: Adaptive
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.early_night_mode
|
||||||
|
state: 'off'
|
||||||
|
sequence:
|
||||||
|
- service: switch.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: switch.adaptive_lighting_master_bedroom
|
||||||
|
- delay:
|
||||||
|
seconds: 1
|
||||||
|
- service: light.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: light.master_bedroom_lights
|
||||||
|
data:
|
||||||
|
brightness_pct: "{{ brightness }}"
|
||||||
|
transition: >
|
||||||
|
{% from 'time.jinja' import timer_duration %}
|
||||||
|
{{ timer_duration('input_number.wakeup_lights_fade_day') }}
|
||||||
|
- delay:
|
||||||
|
minutes: "{{ states('input_number.wakeup_lights_fade_day') }}"
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.master_bedroom_scenes
|
entity_id: input_select.master_bedroom_scenes
|
||||||
|
Reference in New Issue
Block a user