mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
blue_room to boys_room
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
alias: Nursery Awake Button
|
||||
id: automation_nursery_awake_button
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_button.nursery_awake
|
||||
|
||||
condition: []
|
||||
|
||||
action:
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
option: Auto
|
||||
target:
|
||||
entity_id: input_select.nursery_mode
|
||||
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
option: "Off"
|
||||
target:
|
||||
entity_id: input_select.nursery_wled
|
||||
|
||||
- action: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- switch.black_bed_force_occupancy
|
||||
|
||||
- action: input_boolean.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
@@ -0,0 +1,62 @@
|
||||
alias: Nursery Bedtime Button
|
||||
id: automation_nursery_bedtime_button
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_button.nursery_bedtime
|
||||
|
||||
condition: []
|
||||
|
||||
action:
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
option: Nightlight
|
||||
target:
|
||||
entity_id: input_select.nursery_mode
|
||||
|
||||
# - action: input_select.select_option
|
||||
# data:
|
||||
# option: Running Rainbow
|
||||
# target:
|
||||
# entity_id: input_select.nursery_wled
|
||||
|
||||
# - action: automation.trigger
|
||||
# target:
|
||||
# entity_id: automation.nursery_wled_changed
|
||||
|
||||
#- condition:
|
||||
- alias: "Do not restart the music if it is already playing"
|
||||
condition: not
|
||||
conditions:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
state: "playing"
|
||||
|
||||
- action: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.4
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
|
||||
#- action: script.goodnight_kids_youtube_music
|
||||
- action: media_player.shuffle_set
|
||||
data:
|
||||
shuffle: false
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
|
||||
- action: media_player.repeat_set
|
||||
data:
|
||||
repeat: all
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
|
||||
- action: music_assistant.play_media
|
||||
data:
|
||||
media_id: library://playlist/5
|
||||
media_type: playlist
|
||||
enqueue: replace
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
@@ -0,0 +1,35 @@
|
||||
alias: Continue Nursery White Noise
|
||||
id: automation_continue_nursery_white_noise
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.girls_room_hub
|
||||
to: "off"
|
||||
for: "00:00:02"
|
||||
- platform: state
|
||||
entity_id: media_player.girls_room_hub
|
||||
to: "idle"
|
||||
for: "00:00:02"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
#- action: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.master_bedroom_mode
|
||||
# option: 'Off'
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.google_home
|
||||
option: "Nursery"
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.ambient_sound
|
||||
option: "Thunderstorm"
|
||||
- action: input_number.set_value
|
||||
data:
|
||||
entity_id: input_number.volume_ambientsounds
|
||||
value: "0.6"
|
||||
- action: script.ambientsounds
|
||||
@@ -0,0 +1,200 @@
|
||||
alias: Nursery Dimmer LEDs
|
||||
id: automation_nursery_dimmer_leds
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
|
||||
- platform: state
|
||||
entity_id: light.nursery_hue
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
# condition:
|
||||
# - "{{ is_state('sensor.nursery_dimmer_node_status','alive') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- alias: "Light off"
|
||||
condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "3"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "3"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 78"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 78
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "3"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "3"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 104"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 104
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "4"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "4"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 130"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 130
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "5"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "5"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 156"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 156
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "6"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "6"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 182"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 182
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "7"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "7"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 208"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 208
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "8"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "8"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 234"
|
||||
condition: numeric_state
|
||||
entity_id: light.nursery_hue
|
||||
attribute: brightness
|
||||
below: 234
|
||||
sequence:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "9"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "9"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
default:
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "19"
|
||||
value: "10"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
- action: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: "21"
|
||||
value: "10"
|
||||
target:
|
||||
device_id: 89e0dee60d7bdf2aeb22b3438914aba4
|
||||
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
@@ -0,0 +1,44 @@
|
||||
alias: Nursery Into Bed
|
||||
id: automation_nursery_into_bed
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: "on"
|
||||
for: "00:00:10"
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- 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_select.nursery_mode
|
||||
state: "Nightlight"
|
||||
- condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
@@ -0,0 +1,168 @@
|
||||
alias: Nursery Light Cycle
|
||||
id: automation_nursery_light_cycle
|
||||
trigger:
|
||||
- id: light_cycle_on
|
||||
platform: state
|
||||
entity_id: input_boolean.nursery_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
|
||||
|
||||
condition: "{{ is_state('input_boolean.nursery_light_cycle','on') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_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.nursery_cycle_same
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.nursery_hue
|
||||
data:
|
||||
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.nursery_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' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.nursery_color_1
|
||||
data:
|
||||
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.nursery_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' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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
|
||||
data:
|
||||
brightness: '{{ states("input_number.nursery_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.nursery_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.nursery_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' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.nursery_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.nursery_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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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' %}
|
||||
{% 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 }}'
|
||||
|
||||
until:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: "off"
|
||||
|
||||
- action: automation.trigger
|
||||
entity_id: automation.nursery_lights_to_on
|
||||
@@ -0,0 +1,75 @@
|
||||
alias: Nursery Lights to Off
|
||||
id: automation_nursery_lights_to_off
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.nursery_mode
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.nursery_naturally_lit
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
#- platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: "on"
|
||||
|
||||
- alias: "Nursery light cycle not on"
|
||||
condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: "off"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: "Off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: "off"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.lighting_automations
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: "Off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: "off"
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: "Manual"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: 5
|
||||
target:
|
||||
entity_id: scene.nursery_hue_off
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
sequence:
|
||||
- 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
|
||||
@@ -0,0 +1,195 @@
|
||||
alias: Nursery Lights to On
|
||||
id: automation_nursery_lights_to_on
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: mode_change
|
||||
entity_id:
|
||||
- input_select.nursery_mode
|
||||
- input_select.automatic_light_profile
|
||||
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.nursery_naturally_lit
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: occupied
|
||||
entity_id: binary_sensor.nursery_occupied
|
||||
to: "on"
|
||||
|
||||
# - platform: state
|
||||
# id: motion
|
||||
# entity_id: group.nursery_motion
|
||||
# to: "on"
|
||||
|
||||
condition:
|
||||
- alias: "Home is occupied"
|
||||
condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
|
||||
- alias: "Nursery light cycle not on"
|
||||
condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: "off"
|
||||
|
||||
- alias: "Check if light should turn on"
|
||||
condition: or
|
||||
conditions:
|
||||
- alias: "Guest mode is on"
|
||||
condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
|
||||
- alias: "Motion or occupancy were detected in a dim room"
|
||||
condition: and
|
||||
conditions:
|
||||
- alias: "Light level below trigger amount"
|
||||
condition: state
|
||||
entity_id: binary_sensor.nursery_naturally_lit
|
||||
state: "off"
|
||||
|
||||
- alias: "Motion or occupancy were detected"
|
||||
condition: or
|
||||
conditions:
|
||||
- alias: "Motion was detected"
|
||||
condition: trigger
|
||||
id: "motion"
|
||||
- alias: "Occupancy was detected"
|
||||
condition: trigger
|
||||
id: "occupied"
|
||||
- alias: "A scene changed and the lights are already on"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: "mode_change"
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: "on"
|
||||
|
||||
variables:
|
||||
switch_name: light.nursery_dimmer_light
|
||||
light_name: nursery_hue
|
||||
mode_name: input_select.nursery_mode
|
||||
automatic_profile: input_select.automatic_light_profile
|
||||
action:
|
||||
- alias: "Make sure Z-Wave switch is turned on"
|
||||
action: homeassistant.turn_on
|
||||
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.nursery_mode
|
||||
state: Manual
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.nursery_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
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.nursery_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.nursery_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.nursery_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.nursery_mode
|
||||
state: Auto
|
||||
- alias: "Lights are off"
|
||||
condition: state
|
||||
entity_id: light.nursery_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"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: "on"
|
||||
- alias: "Room set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.nursery_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 Nursery Mode scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.nursery_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 Nursery Mode scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are off"
|
||||
condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- delay: 1
|
||||
@@ -0,0 +1,72 @@
|
||||
alias: "Nursery Not Occupied"
|
||||
id: automation_nursery_not_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- binary_sensor.nursery_occupied
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
|
||||
# - platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_off_manually
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.white_bed_occupied
|
||||
- binary_sensor.black_bed_occupied
|
||||
state:
|
||||
- "off"
|
||||
- "unavailable"
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: "on"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_person_occupancy
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_occupied
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: "Manual"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: Nursery Occupied
|
||||
id: automation_nursery_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.nursery_occupied
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: "off"
|
||||
|
||||
action:
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
@@ -0,0 +1,162 @@
|
||||
alias: Nursery Out of Bed
|
||||
id: automation_nursery_out_of_bed
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- trigger: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- trigger: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- trigger: state
|
||||
entity_id: binary_sensor.nursery_door
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- alias: "Do we want to be alerted?"
|
||||
condition: state
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
state: "on"
|
||||
|
||||
- alias: "Is the home occupied or in guest mode?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
|
||||
- alias: "Are any of the kids considered home?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
|
||||
- alias: "Is at a time of day when the kids should be sleeping?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: "on"
|
||||
|
||||
- alias: "Is Nursery Light Cycle turned off?"
|
||||
condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: "off"
|
||||
|
||||
- alias: "Are the kids asleep?"
|
||||
condition: state
|
||||
entity_id: input_boolean.kids_asleep
|
||||
state: "on"
|
||||
|
||||
- alias: "Is an adult awake?"
|
||||
condition: state
|
||||
entity_id: binary_sensor.adults_asleep
|
||||
state: "off"
|
||||
|
||||
variables:
|
||||
computer_area: "{{ states('binary_sensor.computer_area_person_occupancy') }}"
|
||||
front_room: "{{ states('binary_sensor.front_room_person_occupancy') }}"
|
||||
entryway: "{{ states('input_boolean.entryway_occupied') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: script.blink_garage_lights
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.computer_area_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- delay: "00:10:00"
|
||||
|
||||
- action: media_player.turn_off
|
||||
entity_id: media_player.front_room_hub, media_player.computer_area_hub
|
||||
|
||||
# - alias: "Flash some lights"
|
||||
# repeat:
|
||||
# count: 6
|
||||
# sequence:
|
||||
# - delay: 1
|
||||
# - action: light.toggle
|
||||
# target:
|
||||
# entity_id:
|
||||
# - light.entryway_hue
|
||||
# - light.computer_area_hue
|
||||
# - light.front_room_hue
|
||||
#- delay: '00:00:02'
|
||||
|
||||
# - alias: "Fix computer area lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.computer_area_lights_to_{{ computer_area }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
|
||||
# - alias: "Fix front room lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.front_room_lights_to_{{ front_room }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
|
||||
# - alias: "Fix entryway lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.entryway_lights_to_{{ entryway }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
@@ -0,0 +1,11 @@
|
||||
alias: Nursery White Noise Off
|
||||
id: automation_nursery_white_noise_off
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
to: "off"
|
||||
|
||||
action:
|
||||
- action: media_player.turn_off
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
@@ -0,0 +1,47 @@
|
||||
alias: Nursery White Noise On
|
||||
id: automation_nursery_white_noise_on
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
state: "playing"
|
||||
sequence:
|
||||
- action: media_player.media_stop
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
|
||||
- action: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.25
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
|
||||
#- action: script.goodnight_kids_youtube_music
|
||||
|
||||
- action: media_player.shuffle_set
|
||||
metadata: {}
|
||||
data:
|
||||
shuffle: false
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
- action: media_player.repeat_set
|
||||
metadata: {}
|
||||
data:
|
||||
repeat: "all"
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
- action: music_assistant.play_media
|
||||
metadata: {}
|
||||
data:
|
||||
media_id: library://track/101
|
||||
media_type: track
|
||||
enqueue: replace
|
||||
target:
|
||||
entity_id: media_player.ma_girls_room_hub
|
||||
Reference in New Issue
Block a user