nursery to girls room... finally

This commit is contained in:
CeeWeasel
2025-12-03 23:21:30 -05:00
parent 921c3df342
commit 78cd67a560
129 changed files with 2715 additions and 2677 deletions
@@ -27,9 +27,9 @@ condition:
- condition: state
entity_id: input_boolean.ebin_home
state: "on"
# - condition: state
# entity_id: input_boolean.nursery_light_cycle
# state: "off"
- condition: state
entity_id: input_boolean.boys_room_light_cycle
state: "off"
- condition: state
entity_id: input_select.boys_room_mode
state: "Nightlight"
@@ -0,0 +1,168 @@
alias: Boys Room Light Cycle
id: efcf9f08-4174-480a-8480-9b240a0e9e4f
trigger:
- id: light_cycle_on
platform: state
entity_id: input_boolean.boys_room_light_cycle
from: "off"
to: "on"
- id: setting_change
platform: state
entity_id:
- input_number.boys_room_light_cycle_transition
- input_select.boys_room_color_set
- input_boolean.boys_room_cycle_same
condition: "{{ is_state('input_boolean.boys_room_light_cycle','on') }}"
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.boys_room_light_cycle
state: "on"
sequence:
- repeat:
sequence:
- choose:
- conditions: # If all lights should be the same color and the projector is off, reference the Hue group for all the lights
- condition: state
entity_id: input_boolean.boys_room_cycle_same
state: "on"
sequence:
- action: light.turn_on
target:
entity_id: light.boys_room_hue
data:
brightness: '{{ states("input_number.boys_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.boys_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.boys_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.boys_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.boys_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.boys_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.boys_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.boys_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.boys_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.boys_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.boys_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.boys_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.boys_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.boys_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.boys_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.boys_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.boys_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- conditions: # If all lights should be different colors, start referencing the individual lights that don't obscure the TV
- condition: state
entity_id: input_boolean.boys_room_cycle_same
state: "off"
sequence:
- action: light.turn_on
target:
entity_id: light.boys_room_color_1
data:
brightness: '{{ states("input_number.boys_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.boys_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.boys_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.boys_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.boys_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.boys_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.boys_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.boys_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.boys_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.boys_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.boys_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.boys_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.boys_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.boys_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.boys_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.boys_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.boys_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- action: light.turn_on
target:
entity_id: light.boys_room_color_2
data:
brightness: '{{ states("input_number.boys_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.boys_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.boys_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.boys_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.boys_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.boys_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.boys_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.boys_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.boys_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.boys_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.boys_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.boys_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.boys_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.boys_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.boys_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.boys_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.boys_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- delay:
seconds: '{{ states("input_number.boys_room_light_cycle_transition") | int }}'
until:
- condition: state
entity_id: input_boolean.boys_room_light_cycle
state: "off"
- action: automation.trigger
entity_id: automation.boys_room_lights_to_on
@@ -60,9 +60,9 @@ condition:
entity_id: binary_sensor.early_morning
state: "on"
- alias: "Is Nursery Light Cycle turned off?"
- alias: "Is Boys Room Light Cycle turned off?"
condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- alias: "Are the kids asleep?"
@@ -5,7 +5,7 @@ trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.nursery_camera_on_hub
entity_id: timer.girls_room_camera_on_hub
action:
action: media_player.turn_off
data:
@@ -1,31 +0,0 @@
alias: Baby Monitor off Front Room TV
id: automation_baby_monitor_off_front_room_tv
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.nursery_camera_on_tv
- platform: state
entity_id: media_player.front_room_tv
attribute: source
from: "IP Camera Viewer - Pro"
action:
- choose:
- conditions:
- condition: not
conditions:
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: "IP Camera Viewer - Pro"
sequence:
- action: timer.cancel
data:
entity_id: timer.nursery_camera_on_tv
default:
action: media_player.turn_off
data:
entity_id: media_player.front_room_tv
@@ -38,7 +38,7 @@ action:
- choose:
- conditions:
- condition: state
entity_id: timer.nursery_camera_on_hub
entity_id: timer.girls_room_camera_on_hub
state: "idle"
sequence:
- action: media_player.volume_set
@@ -50,10 +50,10 @@ action:
target:
entity_id: media_player.front_room_hub
data:
media_content_id: camera-casting-yml/nursery-camera
media_content_id: camera-casting-yml/girls_room-camera
media_content_type: lovelace
metadata:
title: Nursery Camera
title: Girls Room Camera
thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
media_class: app
children_media_class: null
@@ -66,4 +66,4 @@ action:
- action: timer.start
data:
entity_id: timer.nursery_camera_on_hub
entity_id: timer.girls_room_camera_on_hub
@@ -1,94 +0,0 @@
alias: Baby Monitor on TV
id: automation_baby_monitor_on_tv
trigger:
- platform: state
entity_id: binary_sensor.black_bed_occupied
to: "off"
for: "00:00:03"
- platform: state
entity_id: binary_sensor.white_bed_occupied
to: "off"
for: "00:00:03"
condition:
- condition: state
entity_id: input_boolean.home_occupied
state: "on"
- condition: state
entity_id: input_boolean.front_room_occupied
state: "on"
- condition: or
conditions:
- condition: state
entity_id: media_player.front_room_tv
state: "off"
- condition: state
entity_id: media_player.front_room_tv
state: "standby"
- condition: state
entity_id: input_boolean.computer_area_occupied
state: "off"
- condition: state
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: "off"
- condition: state
entity_id: binary_sensor.master_bedroom_occupied
state: "off"
- condition: state
entity_id: input_boolean.master_bedroom_occupied
state: "off"
- condition: state
entity_id: input_boolean.master_bedroom_asleep
state: "off"
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: "on"
- condition: state
entity_id: input_boolean.emmett_in_bed
state: "on"
- condition: and
conditions:
- condition: state
entity_id: input_boolean.bridget_home
state: "on"
- condition: state
entity_id: input_boolean.bridget_in_bed
state: "on"
- condition: and
conditions:
- condition: state
entity_id: input_boolean.ebin_home
state: "on"
- condition: state
entity_id: input_boolean.ebin_in_bed
state: "on"
- condition: not
conditions:
- condition: state
entity_id: media_player.front_room_tv
state: playing
- condition: state
entity_id: media_player.front_room_tv
state: paused
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: "IP Camera Viewer - Pro"
action:
- choose:
- conditions:
- condition: state
entity_id: timer.nursery_camera_on_hub
state: "idle"
sequence:
- action: rest_command.nursery_on_roku_1
- action: timer.start
data:
entity_id: timer.nursery_camera_on_tv
@@ -1,9 +1,9 @@
alias: Nursery Awake Button
id: automation_nursery_awake_button
alias: Girls Room Awake Button
id: automation_girls_room_awake_button
trigger:
- platform: state
entity_id: input_button.nursery_awake
entity_id: input_button.girls_room_awake
condition: []
@@ -12,13 +12,13 @@ action:
data:
option: Auto
target:
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
- action: input_select.select_option
data:
option: "Off"
target:
entity_id: input_select.nursery_wled
entity_id: input_select.girls_room_wled
- action: switch.turn_off
target:
@@ -1,9 +1,9 @@
alias: Nursery Bedtime Button
id: automation_nursery_bedtime_button
alias: Girls Room Bedtime Button
id: automation_girls_room_bedtime_button
trigger:
- platform: state
entity_id: input_button.nursery_bedtime
entity_id: input_button.girls_room_bedtime
condition: []
@@ -12,17 +12,17 @@ action:
data:
option: Nightlight
target:
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
# - action: input_select.select_option
# data:
# option: Running Rainbow
# target:
# entity_id: input_select.nursery_wled
# entity_id: input_select.girls_room_wled
# - action: automation.trigger
# target:
# entity_id: automation.nursery_wled_changed
# entity_id: automation.girls_room_wled_changed
#- condition:
- alias: "Do not restart the music if it is already playing"
@@ -1,29 +1,29 @@
alias: Nursery Dimmer LEDs
id: automation_nursery_dimmer_leds
alias: Girls Room Dimmer LEDs
id: automation_girls_room_dimmer_leds
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
trigger:
- platform: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
- platform: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
- platform: homeassistant
event: start
# condition:
# - "{{ is_state('sensor.nursery_dimmer_node_status','alive') }}"
# - "{{ is_state('sensor.girls_room_dimmer_node_status','alive') }}"
action:
- choose:
- conditions:
- alias: "Light off"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "off"
sequence:
- action: zwave_js.set_config_parameter
@@ -42,7 +42,7 @@ action:
- conditions:
- alias: "Light brightness below 78"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 78
sequence:
@@ -62,7 +62,7 @@ action:
- conditions:
- alias: "Light brightness below 104"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 104
sequence:
@@ -82,7 +82,7 @@ action:
- conditions:
- alias: "Light brightness below 130"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 130
sequence:
@@ -102,7 +102,7 @@ action:
- conditions:
- alias: "Light brightness below 156"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 156
sequence:
@@ -122,7 +122,7 @@ action:
- conditions:
- alias: "Light brightness below 182"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 182
sequence:
@@ -142,7 +142,7 @@ action:
- conditions:
- alias: "Light brightness below 208"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 208
sequence:
@@ -162,7 +162,7 @@ action:
- conditions:
- alias: "Light brightness below 234"
condition: numeric_state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
attribute: brightness
below: 234
sequence:
@@ -1,5 +1,5 @@
alias: Nursery Into Bed
id: automation_nursery_into_bed
alias: Girls Room Into Bed
id: automation_girls_room_into_bed
trigger:
- platform: state
@@ -27,13 +27,13 @@ condition:
entity_id: input_boolean.ebin_home
state: "on"
- condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: "Nightlight"
- condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
action:
@@ -1,26 +1,26 @@
alias: Nursery Light Cycle
id: automation_nursery_light_cycle
alias: Girls Room Light Cycle
id: e5174fca-7170-4348-87dc-a27d4a2bdb9c
trigger:
- id: light_cycle_on
platform: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
from: "off"
to: "on"
- id: setting_change
platform: state
entity_id:
- input_number.nursery_light_cycle_transition
- input_select.nursery_color_set
- input_boolean.nursery_cycle_same
- input_number.girls_room_light_cycle_transition
- input_select.girls_room_color_set
- input_boolean.girls_room_cycle_same
condition: "{{ is_state('input_boolean.nursery_light_cycle','on') }}"
condition: "{{ is_state('input_boolean.girls_room_light_cycle','on') }}"
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "on"
sequence:
- repeat:
@@ -28,141 +28,141 @@ action:
- choose:
- conditions: # If all lights should be the same color and the projector is off, reference the Hue group for all the lights
- condition: state
entity_id: input_boolean.nursery_cycle_same
entity_id: input_boolean.girls_room_cycle_same
state: "on"
sequence:
- action: light.turn_on
target:
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
data:
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
brightness: '{{ states("input_number.girls_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.girls_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.nursery_color_set') == 'Basic' %}
{% if states('input_select.girls_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.nursery_color_set') == 'Color Wheel' %}
{% elif states('input_select.girls_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
{% elif states('input_select.girls_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.nursery_color_set') == 'Flourescent' %}
{% elif states('input_select.girls_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.nursery_color_set') == 'Silver Swirl' %}
{% elif states('input_select.girls_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.nursery_color_set') == 'Gem Tones' %}
{% elif states('input_select.girls_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.nursery_color_set') == 'Reds' %}
{% elif states('input_select.girls_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.nursery_color_set') == 'Oranges' %}
{% elif states('input_select.girls_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.nursery_color_set') == 'Yellows' %}
{% elif states('input_select.girls_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.nursery_color_set') == 'Greens' %}
{% elif states('input_select.girls_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.nursery_color_set') == 'Cyans' %}
{% elif states('input_select.girls_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.nursery_color_set') == 'Blues' %}
{% elif states('input_select.girls_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.nursery_color_set') == 'Purples' %}
{% elif states('input_select.girls_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.nursery_color_set') == 'Magentas' %}
{% elif states('input_select.girls_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.nursery_color_set') == 'Grays' %}
{% elif states('input_select.girls_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- conditions: # If all lights should be different colors, start referencing the individual lights that don't obscure the TV
- condition: state
entity_id: input_boolean.nursery_cycle_same
entity_id: input_boolean.girls_room_cycle_same
state: "off"
sequence:
- action: light.turn_on
target:
entity_id: light.nursery_color_1
entity_id: light.girls_room_color_1
data:
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
brightness: '{{ states("input_number.girls_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.girls_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.nursery_color_set') == 'Basic' %}
{% if states('input_select.girls_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.nursery_color_set') == 'Color Wheel' %}
{% elif states('input_select.girls_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
{% elif states('input_select.girls_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.nursery_color_set') == 'Flourescent' %}
{% elif states('input_select.girls_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.nursery_color_set') == 'Silver Swirl' %}
{% elif states('input_select.girls_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.nursery_color_set') == 'Gem Tones' %}
{% elif states('input_select.girls_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.nursery_color_set') == 'Reds' %}
{% elif states('input_select.girls_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.nursery_color_set') == 'Oranges' %}
{% elif states('input_select.girls_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.nursery_color_set') == 'Yellows' %}
{% elif states('input_select.girls_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.nursery_color_set') == 'Greens' %}
{% elif states('input_select.girls_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.nursery_color_set') == 'Cyans' %}
{% elif states('input_select.girls_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.nursery_color_set') == 'Blues' %}
{% elif states('input_select.girls_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.nursery_color_set') == 'Purples' %}
{% elif states('input_select.girls_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.nursery_color_set') == 'Magentas' %}
{% elif states('input_select.girls_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.nursery_color_set') == 'Grays' %}
{% elif states('input_select.girls_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- action: light.turn_on
target:
entity_id: light.nursery_color_2
entity_id: light.girls_room_color_2
data:
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
brightness: '{{ states("input_number.girls_room_light_cycle_brightness") | int }}'
transition: '{{ states("input_number.girls_room_light_cycle_transition") | int }}'
profile: >
{% if states('input_select.nursery_color_set') == 'Basic' %}
{% if states('input_select.girls_room_color_set') == 'Basic' %}
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
{% elif states('input_select.nursery_color_set') == 'Color Wheel' %}
{% elif states('input_select.girls_room_color_set') == 'Color Wheel' %}
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
{% elif states('input_select.girls_room_color_set') == 'Rainbow' %}
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
{% elif states('input_select.nursery_color_set') == 'Flourescent' %}
{% elif states('input_select.girls_room_color_set') == 'Flourescent' %}
{% set colors = ['radical_red','wild_watermelon','outrageous_orange','atomic_tangerine','neon_carrot','sunglow','laser_lemon','unmellow_yellow','electric_lime','screamin_green','magic_mint','blizzard_blue','shocking_pink','razzle_dazzle_rose','hot_magenta','purple_pizzazz'] %}
{% elif states('input_select.nursery_color_set') == 'Silver Swirl' %}
{% elif states('input_select.girls_room_color_set') == 'Silver Swirl' %}
{% set colors = ['aztec_gold','burnished_brown','cerulean_frost','cinnamon_satin','copper_penny','cosmic_cobalt','glossy_grape','granite_gray','green_sheen','lilac_luster','misty_moss','mystic_maroon','pearly_purple','pewter_blue','polished_pine','quick_silver','rose_dust','rusty_red','shadow_blue','shiny_shamrock','steel_teal','sugar_plum','twilight_lavender','wintergreen_dream'] %}
{% elif states('input_select.nursery_color_set') == 'Gem Tones' %}
{% elif states('input_select.girls_room_color_set') == 'Gem Tones' %}
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
{% elif states('input_select.nursery_color_set') == 'Reds' %}
{% elif states('input_select.girls_room_color_set') == 'Reds' %}
{% set colors = ['auburn','baby_pink','barn_red','burgundy','burnt_umber','cadmium_red','cardinal','chesnut','chili_red','congo_pink','coral_pink','desire','fire_engine_red','imperial_red','new_york_pink','paradise_pink','pastel_pink','pigment_red','rust','salmon_pink','tango_pink','turkey_red','vanilla_ice','wine'] %}
{% elif states('input_select.nursery_color_set') == 'Oranges' %}
{% elif states('input_select.girls_room_color_set') == 'Oranges' %}
{% set colors = ['beaver','cadmium_orange','carrot_orange','champagne','chocolate','cocoa_brown','desert_sand','flame','gamboge','international_orange','kobicha','lion','marigold','orange_peel','persian_orange','persimmon','peru','portland_orange','pumpkin','russet','safety_orange','sandy_brown','tan','taupe','tawny','tea_rose','wood_brown'] %}
{% elif states('input_select.nursery_color_set') == 'Yellows' %}
{% elif states('input_select.girls_room_color_set') == 'Yellows' %}
{% set colors = ['amber','beige','buff','citrine','cream','cyber_yellow','ecru','harvest_gold','jasmine','jonquil','khaki','lemon','mellow_yellow','mikado_yellow','mustard','naples_yellow','old_gold','process_yellow','royal_yellow','safety_yellow','saffron','school_bus_yellow','straw','vanilla'] %}
{% elif states('input_select.nursery_color_set') == 'Greens' %}
{% elif states('input_select.girls_room_color_set') == 'Greens' %}
{% set colors = ['army_green','artichoke','asparagus','avacado','bottle_green','bright_mint','celadon','emerald','fern_green','forest_green','harlequin','hunter_green','india_green','islamic_green','jade','kelly_green','laurel_green','malachite','mantis','mint_green','moss_green','neon_green','olive','pakistan_green','paris_green','rifle_green','russian_green','sea_green','shamrock_green','slytherin_green'] %}
{% elif states('input_select.nursery_color_set') == 'Cyans' %}
{% elif states('input_select.girls_room_color_set') == 'Cyans' %}
{% set colors = ['aqua','aquamarine','brunswick_green','celadon_green','celeste','cerulean','charleston_green','dark_cyan','electric_blue','feldgrau','gray_green','midnight_green','morning_blue','myrtle_green','persian_green','robin_egg_blue','sky_blue','teal','teal_blue','turquoise','verdigris','viridian'] %}
{% elif states('input_select.nursery_color_set') == 'Blues' %}
{% elif states('input_select.girls_room_color_set') == 'Blues' %}
{% set colors = ['azure','baby_blue','blue_gray','capri','cornflower','egyptian_blue','glaucous','independence','indigo','indigo_dye','liberty','light_blue','midnight_blue','navy_blue','periwinkle','powder_blue','resolution_blue','sapphire','space_cadet','steel_blue','ultramarine'] %}
{% elif states('input_select.nursery_color_set') == 'Purples' %}
{% elif states('input_select.girls_room_color_set') == 'Purples' %}
{% set colors = ['byzantium','dark_purple','electric_indigo','eminence','heliotrope','indigo','indigo_dye','mardi_gras','mauve','medium_purple','orchid','pansy_purple','phlox','purpureus','thistle','tropical_indigo','tyrian_purple','royal_purple'] %}
{% elif states('input_select.nursery_color_set') == 'Magentas' %}
{% elif states('input_select.girls_room_color_set') == 'Magentas' %}
{% set colors = ['amaranth','antique_fuchsia','baby_pink','cameo_pink','carnation_pink','charm_pink','china_pink','cotton_candy','dark_magenta','fandango','french_fuchsia','french_pink','fuchsia_rose','magenta_haze','mimi_pink','persian_pink','piggy_pink','pink','pink_lace','pink_lavender','plum','queen_pink','rose','rose_quartz','shocking_pink','silver_pink','sky_magenta','super_pink'] %}
{% elif states('input_select.nursery_color_set') == 'Grays' %}
{% elif states('input_select.girls_room_color_set') == 'Grays' %}
{% set colors = ['ash_gray','battleship_gray','cadet_gray','charcoal','dim_gray','gunmetal','jet','marengo','nickel','platinum','rocket_metallic','silver','slate_gray'] %}
{% endif %}
{{ colors|random }}
- delay:
seconds: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
seconds: '{{ states("input_number.girls_room_light_cycle_transition") | int }}'
until:
- condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- action: automation.trigger
entity_id: automation.nursery_lights_to_on
entity_id: automation.girls_room_lights_to_on
@@ -1,18 +1,18 @@
alias: Nursery Lights to Off
id: automation_nursery_lights_to_off
alias: Girls Room Lights to Off
id: e4926a27-2022-4d48-875e-f368e6472749
mode: restart
trigger:
- platform: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
- platform: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
to: "off"
- platform: state
id: light_level
entity_id: binary_sensor.nursery_naturally_lit
entity_id: binary_sensor.girls_room_naturally_lit
from: "off"
to: "on"
@@ -21,21 +21,21 @@ trigger:
condition:
- condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
- alias: "Nursery light cycle not on"
- alias: "Girls Room light cycle not on"
condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- condition: or
conditions:
- condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: "Off"
- condition: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
state: "off"
action:
@@ -47,22 +47,22 @@ action:
- condition: or
conditions:
- condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: "Off"
- condition: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
state: "off"
- condition: not
conditions:
- condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: "Manual"
sequence:
- action: scene.turn_on
data:
transition: 5
target:
entity_id: scene.nursery_hue_off
entity_id: scene.girls_room_hue_off
- choose:
- conditions:
- condition: state
@@ -72,4 +72,4 @@ action:
- alias: "Turn off z-wave switch since all lights are off"
action: homeassistant.turn_off
target:
entity_id: light.nursery_color_1, light.nursery_color_2
entity_id: light.girls_room_color_1, light.girls_room_color_2
@@ -1,5 +1,5 @@
alias: Nursery Lights to On
id: automation_nursery_lights_to_on
alias: Girls Room Lights to On
id: automation_girls_room_lights_to_on
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
@@ -8,20 +8,20 @@ trigger:
- platform: state
id: mode_change
entity_id:
- input_select.nursery_mode
- input_select.girls_room_mode
- input_select.automatic_light_profile
- platform: state
id: light_level
entity_id: binary_sensor.nursery_naturally_lit
entity_id: binary_sensor.girls_room_naturally_lit
from: "on"
to: "off"
- platform: state
id: occupied
entity_id:
- input_boolean.nursery_occupied
- binary_sensor.nursery_occupied
- input_boolean.girls_room_occupied
- binary_sensor.girls_room_occupied
to: "on"
condition:
@@ -30,9 +30,9 @@ condition:
entity_id: input_boolean.home_occupied
state: "on"
- alias: "Nursery light cycle not on"
- alias: "Girls Room light cycle not on"
condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- alias: "Check if light should turn on"
@@ -48,7 +48,7 @@ condition:
conditions:
- alias: "Light level below trigger amount"
condition: state
entity_id: binary_sensor.nursery_naturally_lit
entity_id: binary_sensor.girls_room_naturally_lit
state: "off"
- alias: "Motion or occupancy were detected"
@@ -66,13 +66,13 @@ condition:
- condition: trigger
id: "mode_change"
- condition: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
state: "on"
variables:
switch_name: light.nursery_dimmer_light
light_name: nursery_hue
mode_name: input_select.nursery_mode
switch_name: girls_room_fan_light_switch_light
light_name: girls_room_hue
mode_name: input_select.girls_room_mode
automatic_profile: input_select.automatic_light_profile
action:
- alias: "Make sure Z-Wave switch is turned on"
@@ -84,22 +84,22 @@ action:
conditions:
- alias: "Room set to manual"
condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: Manual
sequence:
- action: light.turn_on
target:
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
- alias: "Automatic light profile set to Nightlight"
condition: state
@@ -116,11 +116,11 @@ action:
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
sequence:
- action: scene.turn_on
@@ -133,26 +133,26 @@ action:
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: Auto
- alias: "Lights are off"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "off"
sequence:
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Nursery Mode scene with a short transition"
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Girls Room Mode scene with a short transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
- alias: "Room set to Nightlight"
condition: state
entity_id: input_select.nursery_mode
entity_id: input_select.girls_room_mode
state: Nightlight
sequence:
- action: scene.turn_on
@@ -161,11 +161,11 @@ action:
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Nursery Mode scene with a transition"
- alias: "If the room is not set to auto and the lights are on, change to the Girls Room Mode scene with a transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "on"
sequence:
- action: scene.turn_on
@@ -174,11 +174,11 @@ action:
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Nursery Mode scene without a transition"
- alias: "If the room is not set to auto and the lights are on, change to the Girls Room Mode scene without a transition"
conditions:
- alias: "Room not manual or auto and lights are off"
condition: state
entity_id: light.nursery_hue
entity_id: light.girls_room_hue
state: "off"
sequence:
- action: scene.turn_on
@@ -1,5 +1,5 @@
alias: "Nursery Not Occupied"
id: automation_nursery_not_occupied
alias: "Girls Room Not Occupied"
id: automation_girls_room_not_occupied
mode: restart
trigger:
@@ -11,7 +11,7 @@ trigger:
- platform: state
entity_id:
- input_boolean.home_occupied
- binary_sensor.nursery_occupied
- binary_sensor.girls_room_occupied
to: "off"
for: "00:05:00"
@@ -31,7 +31,7 @@ condition:
- "unavailable"
- condition: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
state: "on"
- condition: or
@@ -42,12 +42,12 @@ condition:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.nursery_person_occupancy
entity_id: binary_sensor.girls_room_person_occupancy
state: "off"
for:
minutes: 5
- condition: state
entity_id: binary_sensor.nursery_occupied
entity_id: binary_sensor.girls_room_occupied
state: "off"
for:
minutes: 5
@@ -60,7 +60,7 @@ action:
state: "off"
sequence:
- action: homeassistant.turn_off
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
- conditions:
- condition: not
conditions:
@@ -69,4 +69,4 @@ action:
state: "Manual"
sequence:
- action: homeassistant.turn_off
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
@@ -1,18 +1,18 @@
alias: Nursery Occupied
id: automation_nursery_occupied
alias: Girls Room Occupied
id: automation_girls_room_occupied
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.nursery_occupied
- binary_sensor.girls_room_occupied
to: "on"
condition:
- condition: state
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
state: "off"
action:
- action: input_boolean.turn_on
entity_id: input_boolean.nursery_occupied
entity_id: input_boolean.girls_room_occupied
@@ -1,5 +1,5 @@
alias: Nursery Out of Bed
id: automation_nursery_out_of_bed
alias: Girls Room Out of Bed
id: automation_girls_room_out_of_bed
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
@@ -16,7 +16,7 @@ trigger:
to: "off"
for: "00:00:05"
- trigger: state
entity_id: binary_sensor.nursery_door
entity_id: binary_sensor.girls_room_door
from: "off"
to: "on"
@@ -65,9 +65,9 @@ condition:
entity_id: binary_sensor.early_morning
state: "on"
- alias: "Is Nursery Light Cycle turned off?"
- alias: "Is Girls Room Light Cycle turned off?"
condition: state
entity_id: input_boolean.nursery_light_cycle
entity_id: input_boolean.girls_room_light_cycle
state: "off"
- alias: "Are the kids asleep?"
@@ -1,5 +1,5 @@
alias: Nursery White Noise Off
id: automation_nursery_white_noise_off
alias: Girls Room White Noise Off
id: automation_girls_room_white_noise_off
trigger:
- platform: state
@@ -1,5 +1,5 @@
alias: Nursery White Noise On
id: automation_nursery_white_noise_on
alias: Girls Room White Noise On
id: automation_girls_room_white_noise_on
trigger:
- platform: state
@@ -52,6 +52,6 @@ action:
# - action: input_select.select_option
# target:
# entity_id: input_select.nursery_mode
# entity_id: input_select.girls_room_mode
# data:
# option: "Nightlight"
@@ -21,7 +21,7 @@ action:
sequence:
- action: fan.turn_off
target:
entity_id: fan.master_bedroom
entity_id: fan.master_bedroom_fan_light_switch_fan
- alias: "Humidity too high via manual run"
conditions:
@@ -31,7 +31,7 @@ action:
sequence:
- action: fan.turn_off
target:
entity_id: fan.master_bedroom
entity_id: fan.master_bedroom_fan_light_switch_fan
- alias: "Humidity too low via trigger"
conditions:
@@ -42,7 +42,7 @@ action:
data:
percentage: 33
target:
entity_id: fan.master_bedroom
entity_id: fan.master_bedroom_fan_light_switch_fan
- alias: "Humidity too low via manual run"
conditions:
@@ -54,4 +54,4 @@ action:
data:
percentage: 33
target:
entity_id: fan.master_bedroom
entity_id: fan.master_bedroom_fan_light_switch_fan
@@ -14,8 +14,8 @@ trigger:
- platform: state
id: light_level
entity_id: binary_sensor.master_bedroom_naturally_lit
from: 'on'
to: 'off'
from: "on"
to: "off"
- platform: state
entity_id: input_boolean.master_bedroom_occupied
@@ -45,7 +45,6 @@ condition:
- alias: "Check if light should turn on"
condition: or
conditions:
- alias: "Guest mode is on"
condition: state
entity_id: input_boolean.guest_mode
@@ -57,7 +56,7 @@ condition:
- alias: "Light level below trigger amount"
condition: state
entity_id: binary_sensor.master_bedroom_naturally_lit
state: 'off'
state: "off"
- alias: "Motion or occupancy were detected"
condition: or
@@ -78,7 +77,7 @@ condition:
state: "on"
variables:
switch_name: light.master_bedroom_dimmer_light
switch_name: light.master_bedroom_fan_light_switch_light
light_name: master_bedroom_hue
mode_name: input_select.master_bedroom_mode
automatic_profile: input_select.automatic_light_profile
@@ -89,109 +88,109 @@ action:
target:
entity_id: "{{ switch_name }}"
- choose:
- alias: "If the room is set to manual, just turn the lights on"
conditions:
- alias: "Room set to manual"
condition: state
entity_id: input_select.master_bedroom_mode
state: Manual
sequence:
- action: light.turn_on
target:
- alias: "If the room is set to manual, just turn the lights on"
conditions:
- alias: "Room set to manual"
condition: state
entity_id: input_select.master_bedroom_mode
state: Manual
sequence:
- action: light.turn_on
target:
entity_id: light.master_bedroom_hue
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: "on"
- alias: "Automatic light profile set to Nightlight"
condition: state
entity_id: input_select.automatic_light_profile
state: Nightlight
sequence:
- action: scene.turn_on
data:
transition: 10
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: 'on'
- alias: "Automatic light profile set to Nightlight"
condition: state
entity_id: input_select.automatic_light_profile
state: Nightlight
sequence:
- action: scene.turn_on
data:
transition: 10
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: "on"
sequence:
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: 'on'
sequence:
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are off"
condition: state
entity_id: light.master_bedroom_hue
state: "off"
sequence:
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
conditions:
- alias: "Room set to auto"
condition: state
entity_id: input_select.master_bedroom_mode
state: Auto
- alias: "Lights are off"
condition: state
entity_id: light.master_bedroom_hue
state: 'off'
sequence:
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Master Bedroom Mode scene with a short transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: "on"
- alias: "Room set to Nightlight"
condition: state
entity_id: input_select.master_bedroom_mode
state: Nightlight
sequence:
- action: scene.turn_on
data:
transition: 10
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Master Bedroom Mode scene with a short transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: 'on'
- alias: "Room set to Nightlight"
condition: state
entity_id: input_select.master_bedroom_mode
state: Nightlight
sequence:
- action: scene.turn_on
data:
transition: 10
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene with a transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: "on"
sequence:
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene with a transition"
conditions:
- alias: "Room not manual or auto and lights are on"
condition: state
entity_id: light.master_bedroom_hue
state: 'on'
sequence:
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene without a transition"
conditions:
- alias: "Room not manual or auto and lights are off"
condition: state
entity_id: light.master_bedroom_hue
state: "off"
sequence:
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene without a transition"
conditions:
- alias: "Room not manual or auto and lights are off"
condition: state
entity_id: light.master_bedroom_hue
state: 'off'
sequence:
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
- delay: 1
- delay: 1