mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
alias: Cam03 on Computer Area Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam03
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam03_sub on Computer Area Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam03_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam08 on Computer Area Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam08 on Front Room Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam13 on Computer Area Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp://192.168.1.7:8554/rtsp_cam13_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam13 on Front Room Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp://192.168.1.7:8554/rtsp_cam13_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam19 on Computer Area Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp://192.168.1.7:8554/rtsp_cam19_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Cam19 on Front Room Hub
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp://192.168.1.7:8554/rtsp_cam19_sub
|
||||
extra:
|
||||
mode: webrtc
|
||||
@@ -0,0 +1,17 @@
|
||||
alias: Create temporary camera link
|
||||
sequence:
|
||||
- variables:
|
||||
link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}"
|
||||
|
||||
- service: webrtc.create_link
|
||||
data:
|
||||
link_id: "{{ link_id }}" # create a random or permanent link ID
|
||||
# url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0
|
||||
# entity: camera.sonoff # you can use camera entity_id or url
|
||||
url: rtsp://192.168.1.7:8554/rtsp_cam03_sub
|
||||
open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default)
|
||||
time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default)
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
message: '<a href="/webrtc/embed?url={{ link_id }}" target="_blank">Open Camera</a>'
|
||||
@@ -0,0 +1,56 @@
|
||||
alias: Computer Area Light Cycle
|
||||
fields:
|
||||
colorset:
|
||||
description: The set of colors to loop through
|
||||
example: 'gemtones'
|
||||
brightness:
|
||||
description: The brightness that the lights should be set to
|
||||
example: '100'
|
||||
transition:
|
||||
description: The transition time, in seconds
|
||||
example: '10'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.computer_area_hue
|
||||
brightness: '{{ states("input_number.computer_area_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.computer_area_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.computer_area_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.computer_area_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.computer_area_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.computer_area_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.computer_area_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.computer_area_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_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.computer_area_light_cycle_transition") | int }}'
|
||||
# Wait until the loop_lights script has finished running
|
||||
- wait_template: "{{ is_state('script.computer_area_loop_lights', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.computer_area_loop_lights
|
||||
@@ -0,0 +1,6 @@
|
||||
alias: Computer Area Loop Lights
|
||||
sequence:
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.computer_area_light_cycle', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.computer_area_light_cycle
|
||||
@@ -0,0 +1,7 @@
|
||||
alias: Control Light With Lux
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: '{{ lightname }}'
|
||||
brightness: '{{ brightness }}'
|
||||
transition: 5
|
||||
@@ -0,0 +1,139 @@
|
||||
alias: Front Room Light Cycle
|
||||
fields:
|
||||
colorset:
|
||||
description: The set of colors to loop through
|
||||
example: 'gemtones'
|
||||
brightness:
|
||||
description: The brightness that the lights should be set to
|
||||
example: '100'
|
||||
transition:
|
||||
description: The transition time, in seconds
|
||||
example: '10'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.front_room_cycle_same
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.front_room_hue
|
||||
brightness: '{{ states("input_number.front_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.front_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.front_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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 }}
|
||||
default:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.front_room_splash_left
|
||||
brightness: '{{ states("input_number.front_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.front_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.front_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.front_room_splash_right
|
||||
brightness: '{{ states("input_number.front_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.front_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.front_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.front_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_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.front_room_light_cycle_transition") | int }}'
|
||||
# Wait until the loop_lights script has finished running
|
||||
- wait_template: "{{ is_state('script.front_room_loop_lights', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.front_room_loop_lights
|
||||
@@ -0,0 +1,6 @@
|
||||
alias: Front Room Loop Lights
|
||||
sequence:
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.front_room_light_cycle', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.front_room_light_cycle
|
||||
@@ -0,0 +1,21 @@
|
||||
alias: Blink Garage Lights
|
||||
sequence:
|
||||
- alias: "Manually flash the garage lights"
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.garage_overhead
|
||||
- delay: '00:00:01'
|
||||
- alias: "Manually flash the garage lights"
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.garage_overhead
|
||||
- delay: '00:00:01'
|
||||
- alias: "Manually flash the garage lights"
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.garage_overhead
|
||||
- delay: '00:00:01'
|
||||
- alias: "Manually flash the garage lights"
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.garage_overhead
|
||||
@@ -0,0 +1,253 @@
|
||||
alias: Great Room Light Cycle
|
||||
fields:
|
||||
colorset:
|
||||
description: The set of colors to loop through
|
||||
example: 'gemtones'
|
||||
brightness:
|
||||
description: The brightness that the lights should be set to
|
||||
example: '100'
|
||||
transition:
|
||||
description: The transition time, in seconds
|
||||
example: '10'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.great_room_cycle_same
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.downstairs
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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 }}
|
||||
default:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.basement_1
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.basement_2
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.basement_3
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.basement_4
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.basement_5
|
||||
brightness: '{{ states("input_number.great_room_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.great_room_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.great_room_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.great_room_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_room_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_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.great_room_light_cycle_transition") | int }}'
|
||||
# Wait until the loop_lights script has finished running
|
||||
- wait_template: "{{ is_state('script.great_room_loop_lights', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.great_room_loop_lights
|
||||
@@ -0,0 +1,6 @@
|
||||
alias: Great Room Loop Lights
|
||||
sequence:
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.great_room_light_cycle', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.great_room_light_cycle
|
||||
@@ -0,0 +1,91 @@
|
||||
mode: parallel
|
||||
alias: Grocy Say Chores
|
||||
|
||||
sequence:
|
||||
- variables:
|
||||
speaker: "{{speaker}}"
|
||||
closing_line: >
|
||||
{% if room is defined %}
|
||||
Nothing needs to be done in the {{ room }}
|
||||
{% elif person is defined %}
|
||||
{{ person }} doesn't need to do anything
|
||||
{% else %}
|
||||
Nothing pressing needs to be done
|
||||
{% endif %}
|
||||
object_name: >
|
||||
{% if room is defined %}
|
||||
{{ (room | lower).replace(' ','_')~"_" }}
|
||||
{% elif person is defined %}
|
||||
{{ (person | lower).replace(' ','_')~"_" }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
room_name: >
|
||||
{% if room is defined %}
|
||||
{% if room == "All" %}{%else%}{{ (room | lower).replace(' ','_')~"_" }}{%endif%}
|
||||
{% endif %}
|
||||
person_name: >
|
||||
{% if person is defined %}
|
||||
{{ (person | lower).replace(' ','_')~"_" }}
|
||||
{% endif %}
|
||||
|
||||
- alias: "Say next three chores"
|
||||
service: tts.google_translate_say
|
||||
data:
|
||||
entity_id: "{{speaker}}"
|
||||
message: >-
|
||||
{% if not is_state('sensor.'~object_name~'chore_one',"None") -%}
|
||||
First you should {{ states('sensor.'~object_name~'chore_one') }}.
|
||||
{% if not is_state('sensor.'~object_name~'chore_two',"None") -%}
|
||||
After that, you can {{ states('sensor.'~object_name~'chore_two') }}
|
||||
{% if not is_state('sensor.'~object_name~'chore_three',"None") -%}
|
||||
Finally, you can always {{ states('sensor.'~object_name~'chore_three') }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
{%- else -%}
|
||||
{{ closing_line }}
|
||||
{% endif -%}
|
||||
|
||||
fields:
|
||||
room:
|
||||
description: Choose room to hear chores associate with the selected room (takes prescedence over person)
|
||||
example: Blue Room
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- Blue Room
|
||||
- Computer Area
|
||||
- Dining Room
|
||||
- Entryway
|
||||
- Front Room
|
||||
- Furnace Room
|
||||
- Garage
|
||||
- Kitchen
|
||||
- Great Room
|
||||
- Mancave
|
||||
- Master Bathroom
|
||||
- Master Bedroom
|
||||
- Nursery
|
||||
- Utility Room
|
||||
- Other
|
||||
|
||||
person:
|
||||
description: Choose person to hear chores associate with that person (if a room is not chosen)
|
||||
example: Daddy
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- Daddy
|
||||
- Chickadee
|
||||
- Marshall
|
||||
- Tess
|
||||
- Emmett
|
||||
- Bridget
|
||||
- Ebin
|
||||
- Other
|
||||
|
||||
speaker:
|
||||
description: Speaker to announce chores on
|
||||
example: media_player.announcements
|
||||
selector:
|
||||
entity:
|
||||
domain: media_player
|
||||
@@ -0,0 +1,3 @@
|
||||
alias: Restart Home Assistant
|
||||
sequence:
|
||||
- service: homeassistant.restart
|
||||
@@ -0,0 +1,34 @@
|
||||
alias: House alert
|
||||
sequence:
|
||||
- service: media_player.turn_on
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
volume_level: 0.5
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
media_content_id: http://192.168.1.11:8123/local/audio/alarms/Alarm_Clock.mp3
|
||||
media_content_type: music
|
||||
- delay: '00:00:10'
|
||||
# Wait for it to stop playing (5 second audio clip)
|
||||
- wait_template: "{{ is_state('media_player.master_bedroom_clock','idle') }}"
|
||||
timeout: '00:00:06'
|
||||
continue_on_timeout: 'true'
|
||||
# Send an audio alert
|
||||
- service: tts.google_translate_say
|
||||
data_template:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
message: >-
|
||||
The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
|
||||
- delay: '00:00:02'
|
||||
# Wait for it to stop playing (2 minute timeout)
|
||||
- wait_template: "{{ is_state('media_player.master_bedroom_clock','idle') }}"
|
||||
timeout: '00:02:00'
|
||||
continue_on_timeout: 'true'
|
||||
# Turn off the media players
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
@@ -0,0 +1,320 @@
|
||||
---
|
||||
# Calculation References:
|
||||
# https://nathanfiscus.github.io/inovelli-notification-calc/
|
||||
# https://community.inovelli.com/t/home-assistant-2nd-gen-switch-rgb-working/168/62
|
||||
# https://docs.google.com/spreadsheets/d/1bEpujdvBPZY9Fl61PZLUWuHanD2VAkRORFZ5D9xjLzA/edit?usp=sharing
|
||||
#
|
||||
# Changes:
|
||||
# July 22, 2020: Incorporating changes from Kevin Schlichter.
|
||||
# https://github.com/kschlichter/Home-Assistant-Inovelli-Red-Dimmer-Switch
|
||||
#
|
||||
# September 17, 2020: There are some massive improvements to my version of this code. Here are the highlights:
|
||||
# 1. Choose - using the recently added choose: feature a separate call has been created for the Z-wave and OZW
|
||||
# versions of the service call.
|
||||
# 2. Variables - using 0.115’s new variables: feature the variables sent each service call only have to be
|
||||
# calculated once.
|
||||
# 3. Supported Features - I realized that I could probably tell the difference between modules using the
|
||||
# “supported_features” attribute of each switch. For example my dimmer’s supported features is “33”.
|
||||
#
|
||||
# September 18, 2020: Added "model" parameter with options of dimmer, switch, combo_light, combo_fan. This replaces
|
||||
# supported_features as the combo fan/light switch also had the same supported_features value.
|
||||
#
|
||||
# February 24, 2021: Added support for Z-Wave JS in place of OpenZwave (ozw).
|
||||
# The ozw code is remarked out for those that still need it.
|
||||
#
|
||||
# February 27, 2021:
|
||||
# 1. Added zwave_integration at top of "variables:" section to allow users to define which integration is
|
||||
# installed ("zwave", "ozw", "zwave_js"). I just don't see a simple way to auto-detect this.
|
||||
# 2. Added a comment describing the "model" variable.
|
||||
# 3. Replaced personal "script.debug" service call with universal "persistent_notification.create".
|
||||
# Unremarking these lines could help you troubleshoot why something isn't working as expected.
|
||||
# 4. Updated broken spreadsheet link with public copy stored in my Google Docs account.
|
||||
# Thanks for the heads up Kevin Schlichter!
|
||||
#
|
||||
# March 26, 2021
|
||||
# 1. Added fields to help users experimenting in the Services Developer Tool.
|
||||
#
|
||||
# April 3, 2021
|
||||
# Incorporated @firstof9's changes:
|
||||
# 1. Set execution mode to "parallel" to all this script to potentially run on more than one devices simultaneously.
|
||||
# 2. Implement ZWave JS's new zwave_js.bulk_set_partial_config_parameters command.
|
||||
# Source: https://gist.github.com/firstof9/b88d072a81c54b314fe7ddb901fc5c29
|
||||
#
|
||||
mode: parallel
|
||||
variables:
|
||||
# REQUIRED to be one of these options: "zwave", "ozw", "zwave_js"
|
||||
# Advanced: If you'd like to have your device list filtered in the Services Developer Tool,
|
||||
# then unremark out "integration: zwave_js" under the fields section, and change the integration
|
||||
# name to match.
|
||||
zwave_integration: "zwave_js"
|
||||
|
||||
# * Strongly recommended -> Use the passed model type ("dimmer", "switch", "combo_light") when present.
|
||||
# * If not present, then attempt to identify the type using the "product_name" attribute (which is only
|
||||
# unfortunately only available in the original zwave integration).
|
||||
# * Finally, assume the model type is "dimmer".
|
||||
model: |
|
||||
{% if model is string %}
|
||||
{{ model }}
|
||||
{%- elif state_attr(entity_id, 'product_name') is string %}
|
||||
{%- if 'LZW31' in state_attr(entity_id, 'product_name') %}
|
||||
dimmer
|
||||
{%- elif 'LZW36' in state_attr(entity_id, 'product_name') %}
|
||||
combo_light
|
||||
{%- else %}
|
||||
switch
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
dimmer
|
||||
{%- endif %}
|
||||
parameters:
|
||||
dimmer: 16
|
||||
combo_light: 24
|
||||
combo_fan: 25
|
||||
switch: 8
|
||||
node_id: '{{ state_attr(entity_id,"node_id") }}'
|
||||
color: |
|
||||
{%- if color is not number %}
|
||||
{{ color|default("Yellow")|title }}
|
||||
{%- else %}
|
||||
{{ color|int }}
|
||||
{% endif %}
|
||||
# 1-10
|
||||
level: "{{ level|default(4)|int }}"
|
||||
duration: '{{ duration|default("Indefinitely")|title }}'
|
||||
effect: '{{ effect|default("Blink")|title }}'
|
||||
colors:
|
||||
"Off": 0
|
||||
"Red": 1
|
||||
"Orange": 21
|
||||
"Yellow": 42
|
||||
"Green": 85
|
||||
"Cyan": 127
|
||||
"Teal": 145
|
||||
"Blue": 170
|
||||
"Purple": 195
|
||||
"Light Pink": 220
|
||||
"Pink": 234
|
||||
durations:
|
||||
"Off": 0
|
||||
"1 Second": 1
|
||||
"2 Seconds": 2
|
||||
"3 Seconds": 3
|
||||
"4 Seconds": 4
|
||||
"5 Seconds": 5
|
||||
"6 Seconds": 6
|
||||
"7 Seconds": 7
|
||||
"8 Seconds": 8
|
||||
"9 Seconds": 9
|
||||
"10 Seconds": 10
|
||||
"15 Seconds": 15
|
||||
"20 Seconds": 20
|
||||
"25 Seconds": 25
|
||||
"30 Seconds": 30
|
||||
"35 Seconds": 35
|
||||
"40 Seconds": 40
|
||||
"45 Seconds": 45
|
||||
"50 Seconds": 50
|
||||
"55 Seconds": 55
|
||||
"60 Seconds": 60
|
||||
"2 Minutes": 62
|
||||
"3 Minutes": 63
|
||||
"4 Minutes": 64
|
||||
"10 Minutes": 70
|
||||
"15 Minutes": 75
|
||||
"30 Minutes": 90
|
||||
"45 Minutes": 105
|
||||
"1 Hour": 120
|
||||
"2 Hours": 122
|
||||
"Indefinitely": 255
|
||||
effects_dimmer:
|
||||
"Off": 0
|
||||
"Solid": 1
|
||||
"Chase": 2
|
||||
"Fast Blink": 3
|
||||
"Slow Blink": 4
|
||||
"Blink": 4
|
||||
"Pulse": 5
|
||||
"Breath": 5
|
||||
effects_switch:
|
||||
"Off": 0
|
||||
"Solid": 1
|
||||
"Fast Blink": 2
|
||||
"Slow Blink": 3
|
||||
"Blink": 3
|
||||
"Pulse": 4
|
||||
"Breath": 4
|
||||
sequence:
|
||||
# Preform the Inovelli math.
|
||||
- variables:
|
||||
parameter: "{{ parameters[model|lower] }}"
|
||||
color: "{{ colors[color|title]|int }}"
|
||||
duration: "{{ durations[duration|title] }}"
|
||||
effect: |
|
||||
{% if model == "switch" %}
|
||||
{{- effects_switch[effect|title] }}
|
||||
{%- else %}
|
||||
{{- effects_dimmer[effect|title] }}
|
||||
{% endif %}
|
||||
inovelli_math: |
|
||||
{%- if effect|int > 0 %}
|
||||
{{ color|int + (level|int * 256) + (duration|int * 65536) + (effect|int * 16777216) }}
|
||||
{%- else %}
|
||||
0
|
||||
{% endif %}
|
||||
# Unremark to provide an notification with troubleshooting information.
|
||||
# - service: persistent_notification.create
|
||||
# data:
|
||||
# title: "DEBUG: script.inovelli_led"
|
||||
# notification_id: "inovelli_led"
|
||||
# message: |
|
||||
# zwave_integration: {{ zwave_integration }}
|
||||
# model: {{ model }}
|
||||
# color: '{{ color|title }}'
|
||||
# level: '{{ level }}'
|
||||
# duration: '{{ duration|title }}'
|
||||
# effect: '{{ effect|title }}'
|
||||
# node_id: '{{ node_id }}'
|
||||
# parameter: '{{ parameter }}'
|
||||
# value: '{{ inovelli_math }}'
|
||||
|
||||
- choose:
|
||||
# The Z-Wave JS integration requires this service call.
|
||||
- conditions:
|
||||
- '{{ zwave_integration == "zwave_js" }}'
|
||||
sequence:
|
||||
# Clear the previous effect.
|
||||
- service: zwave_js.bulk_set_partial_config_parameters
|
||||
target:
|
||||
entity_id: "{{ entity_id }}"
|
||||
data:
|
||||
parameter: "{{ parameter }}"
|
||||
value: 0
|
||||
|
||||
# Start the new effect.
|
||||
- service: zwave_js.bulk_set_partial_config_parameters
|
||||
target:
|
||||
entity_id: "{{ entity_id }}"
|
||||
data:
|
||||
parameter: "{{ parameter }}"
|
||||
value: "{{ inovelli_math }}"
|
||||
|
||||
# # The OZW integration requires this service call.
|
||||
# - conditions:
|
||||
# - '{{ zwave_integration == "ozw" }}'
|
||||
# sequence:
|
||||
# # Clear the previous effect.
|
||||
# - service: ozw.set_config_parameter
|
||||
# data:
|
||||
# node_id: "{{ node_id }}"
|
||||
# parameter: "{{ parameter }}"
|
||||
# value: 0
|
||||
|
||||
# # Start the new effect.
|
||||
# - service: ozw.set_config_parameter
|
||||
# data:
|
||||
# node_id: "{{ node_id }}"
|
||||
# parameter: "{{ parameter }}"
|
||||
# value: "{{ inovelli_math }}"
|
||||
|
||||
# # The Z-wave integration requires this service call.
|
||||
# default:
|
||||
# # Clear the previous effect.
|
||||
# - service: zwave.set_config_parameter
|
||||
# data:
|
||||
# node_id: "{{ node_id }}"
|
||||
# parameter: "{{ parameter }}"
|
||||
# size: 4
|
||||
# value: 0
|
||||
|
||||
# # Start the new effect.
|
||||
# - service: zwave.set_config_parameter
|
||||
# data:
|
||||
# node_id: "{{ node_id }}"
|
||||
# parameter: "{{ parameter }}"
|
||||
# size: 4
|
||||
# value: "{{ inovelli_math }}"
|
||||
|
||||
fields:
|
||||
entity_id:
|
||||
description: Light or switch which represents
|
||||
example: light.red_series_dimmer
|
||||
selector:
|
||||
entity:
|
||||
#integration: zwave_js
|
||||
model:
|
||||
description: 'Device type: dimmer (default), switch, combo_light'
|
||||
example: dimmer
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- dimmer
|
||||
- switch
|
||||
- combo_light
|
||||
color:
|
||||
description: 'Choose a color.'
|
||||
example: purple
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- "Off"
|
||||
- Red
|
||||
- Orange
|
||||
- Yellow
|
||||
- Green
|
||||
- Cyan
|
||||
- Teal
|
||||
- Blue
|
||||
- Purple
|
||||
- Light Pink
|
||||
- Pink
|
||||
effect:
|
||||
description: 'Choose an effect.'
|
||||
example: blink
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- "Off"
|
||||
- Solid
|
||||
- Chase
|
||||
- Fast Blink
|
||||
- Slow Blink
|
||||
- Blink
|
||||
- Pulse
|
||||
- Breath
|
||||
duration:
|
||||
description: 'How long should the effect run?'
|
||||
example: 10 seconds
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- "Off"
|
||||
- 1 Second
|
||||
- 2 Seconds
|
||||
- 3 Seconds
|
||||
- 4 Seconds
|
||||
- 5 Seconds
|
||||
- 6 Seconds
|
||||
- 7 Seconds
|
||||
- 8 Seconds
|
||||
- 9 Seconds
|
||||
- 10 Seconds
|
||||
- 15 Seconds
|
||||
- 20 Seconds
|
||||
- 25 Seconds
|
||||
- 30 Seconds
|
||||
- 35 Seconds
|
||||
- 40 Seconds
|
||||
- 45 Seconds
|
||||
- 50 Seconds
|
||||
- 55 Seconds
|
||||
- 60 Seconds
|
||||
- 2 Minutes
|
||||
- 3 Minutes
|
||||
- 4 Minutes
|
||||
- 10 Minutes
|
||||
- 15 Minutes
|
||||
- 30 Minutes
|
||||
- 45 Minutes
|
||||
- 1 Hour
|
||||
- 2 Hours
|
||||
- Indefinitely
|
||||
@@ -0,0 +1,108 @@
|
||||
# Calculation References:
|
||||
# https://nathanfiscus.github.io/inovelli-notification-calc/
|
||||
# https://community.inovelli.com/t/home-assistant-2nd-gen-switch-rgb-working/168/62
|
||||
# https://docs.google.com/spreadsheets/u/1/d/1SGJrJHCUtz8AzznWL_mLCTJjjr2U0IpltcUkRr7N_6M/edit?usp=sharing
|
||||
description: 'Set color on Inovelli LED dimmer'
|
||||
mode: queued
|
||||
|
||||
fields:
|
||||
entity_id:
|
||||
description: The entity to change
|
||||
example: input_number.master_bedroom_light_led
|
||||
color:
|
||||
description: The color to set the LED (Red, Orange, Green, Blue, Pink, Yellow(Default), Cyan, Purple)
|
||||
example: Purple
|
||||
duration:
|
||||
description: 'How long the effect should last (1 Second, 15 Minutes, 2 Hours, Indefinitely(Default))'
|
||||
example: '"30 Seconds"'
|
||||
effect:
|
||||
description: 'The effect to use (Off, Solid, Chase(Default), Fast Blink, Slow Blink, Pulse)'
|
||||
example: Chase
|
||||
level:
|
||||
description: Brightness level (1-10, Default is 4)
|
||||
example: 4
|
||||
value:
|
||||
description: A pre-calculated Inovelli LED value
|
||||
example: 33490140
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
data_template:
|
||||
entity_id: "{{ entity_id }}"
|
||||
value: >
|
||||
{%- set value = value|default(0) | int %}
|
||||
{# Skip the calculations for effect = "off". #}
|
||||
{% if effect|title == "Off" %}
|
||||
0
|
||||
{# Skip the calculations if a value is already given #}
|
||||
{% elif value | int > 0 %}
|
||||
{{ value | int }}
|
||||
{% else %}
|
||||
{# Set default values if any needed values are missing. #}
|
||||
{% set color = color|default("Yellow") %}
|
||||
{% set level = level|default(4) | int %}{# 1-10 #}
|
||||
{% set duration = duration|default("60 Seconds") %}
|
||||
{% set effect = effect|default("Pulse") %}
|
||||
{# Let's make things easy by using descriptive text instead of hard to understand numbers. #}
|
||||
{% set colors = {
|
||||
"Red": 1,
|
||||
"Orange": 21,
|
||||
"Green": 85,
|
||||
"Blue": 170,
|
||||
"Pink": 234,
|
||||
"Yellow": 42,
|
||||
"Cyan": 127,
|
||||
"Purple": 195
|
||||
} %}
|
||||
{% set durations = {
|
||||
"1 Second": 1,
|
||||
"2 Seconds": 2,
|
||||
"3 Seconds": 3,
|
||||
"4 Seconds": 4,
|
||||
"5 Seconds": 5,
|
||||
"6 Seconds": 6,
|
||||
"7 Seconds": 7,
|
||||
"8 Seconds": 8,
|
||||
"9 Seconds": 9,
|
||||
"10 Seconds": 10,
|
||||
"15 Seconds": 15,
|
||||
"20 Seconds": 20,
|
||||
"25 Seconds": 25,
|
||||
"30 Seconds": 30,
|
||||
"35 Seconds": 35,
|
||||
"40 Seconds": 40,
|
||||
"45 Seconds": 45,
|
||||
"50 Seconds": 50,
|
||||
"55 Seconds": 55,
|
||||
"60 Seconds": 60,
|
||||
"2 Minutes": 62,
|
||||
"3 Minutes": 63,
|
||||
"4 Minutes": 64,
|
||||
"15 Minutes": 75,
|
||||
"30 Minutes": 90,
|
||||
"45 Minutes": 105,
|
||||
"1 Hour": 120,
|
||||
"2 Hours": 122,
|
||||
"Indefinitely": 255
|
||||
} %}
|
||||
{% set effects = {
|
||||
"Off": 0,
|
||||
"Solid": 1,
|
||||
"Chase": 2,
|
||||
"Fast Blink": 3,
|
||||
"Slow Blink": 4,
|
||||
"Blink": 4,
|
||||
"Pulse": 5,
|
||||
"Breath": 5
|
||||
} %}
|
||||
{# Preform the Inovelli mind bending mathmatics automatically for us! :) #}
|
||||
{#{ colors[color|title] + (level * 256) + (durations[duration|title] * 65536) + (effects[effect|title] * 16777216) }#}
|
||||
{% set value = (colors[color|title] + (level * 256) + (durations[duration|title] * 65536) + (effects[effect|title] * 16777216)) %}
|
||||
{{ value }}
|
||||
{% endif %}
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Inovelli LED Number
|
||||
entity_id: script.inovelli_led_number
|
||||
message: >
|
||||
{{ states("sensor.date_time_iso") }} Inovelli LED ran with the following options: {{ entity_id }} {{ led }} {{ color }} {{ duration }} {{ effect }} {{ level }} and generated {{ states("input_number.master_bedroom_light_led") | int }}
|
||||
@@ -0,0 +1,13 @@
|
||||
fields:
|
||||
entity_id:
|
||||
description: The entity to change
|
||||
example: zwave.master_bedroom_dimmer
|
||||
led:
|
||||
description: 'Which LED to adjust (Light(Default), Fan)'
|
||||
example: "Light" # Set to "false" to adjust the fan LED
|
||||
sequence:
|
||||
- service: script.inovelli_led
|
||||
data_template:
|
||||
entity_id: "{{ entity_id }}"
|
||||
led: "{{ led }}"
|
||||
effect: "Off"
|
||||
@@ -0,0 +1,142 @@
|
||||
---
|
||||
# Incorporates default LED color + dimmer brightness.
|
||||
# Originally in a script by Kevin Schlichter https://github.com/kschlichter/Home-Assistant-Inovelli-Red-Dimmer-Switch
|
||||
variables:
|
||||
# REQUIRED to be one of these options: "zwave", "ozw", "zwave_js"
|
||||
zwave_integration: "zwave_js"
|
||||
|
||||
# * Strongly recommended -> Use the passed model type ("dimmer", "switch", "combo_light") when present.
|
||||
# * If not present, then attempt to identify the type using the "product_name" attribute (which is only
|
||||
# unfortunately only available in the original zwave integration).
|
||||
# * Finally, assume the model type is "dimmer".
|
||||
model: |
|
||||
{% if model is string %}
|
||||
{{ model }}
|
||||
{%- elif state_attr(entity_id, 'product_name') is string %}
|
||||
{%- if 'LZW31' in state_attr(entity_id, 'product_name') %}
|
||||
dimmer
|
||||
{%- elif 'LZW36' in state_attr(entity_id, 'product_name') %}
|
||||
combo_light
|
||||
{%- else %}
|
||||
switch
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
dimmer
|
||||
{%- endif %}
|
||||
node_id: '{{ state_attr(entity_id,"node_id") }}'
|
||||
color: '{{ color|default("Blue") }}'
|
||||
level_on: '{{ level_on|default("10") }}'
|
||||
level_off: '{{ level_off|default("3") }}'
|
||||
parameters:
|
||||
dimmer:
|
||||
color: 13
|
||||
level_on: 14
|
||||
level_off: 15
|
||||
combo_light:
|
||||
color: 18
|
||||
level_on: 19
|
||||
level_off: 22
|
||||
combo_fan:
|
||||
color: 20
|
||||
level_on: 21
|
||||
level_off: 23
|
||||
switch:
|
||||
color: 5
|
||||
level_on: 6
|
||||
level_off: 7
|
||||
colors:
|
||||
"Off": 0
|
||||
"Red": 1
|
||||
"Orange": 21
|
||||
"Yellow": 42
|
||||
"Green": 85
|
||||
"Cyan": 127
|
||||
"Teal": 145
|
||||
"Blue": 170
|
||||
"Purple": 195
|
||||
"Light Pink": 220
|
||||
"Pink": 234
|
||||
sequence:
|
||||
- variables:
|
||||
color: '{{ colors[color|title] }}'
|
||||
color_parameter: '{{ parameters[model]["color"] }}'
|
||||
level_on_parameter: '{{ parameters[model]["level_on"] }}'
|
||||
level_off_parameter: '{{ parameters[model]["level_off"] }}'
|
||||
|
||||
# - service: script.debug
|
||||
# data:
|
||||
# id: 02
|
||||
# message: |
|
||||
# node_id: '{{ node_id }}'
|
||||
# parameter: '{{ parameters[model]["color"] }}'
|
||||
# color: '{{ color }}'
|
||||
# level_on: '{{ level_on }}'
|
||||
# level_off: '{{ level_off }}'
|
||||
|
||||
- choose:
|
||||
# The Z-Wave JS integration requires this service call.
|
||||
- conditions:
|
||||
- '{{ zwave_integration == "zwave_js" }}'
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
target:
|
||||
entity_id: '{{ entity_id }}'
|
||||
data:
|
||||
parameter: '{{ color_parameter }}'
|
||||
value: '{{ color }}'
|
||||
|
||||
- service: zwave_js.set_config_parameter
|
||||
target:
|
||||
entity_id: '{{ entity_id }}'
|
||||
data:
|
||||
parameter: '{{ level_on_parameter }}'
|
||||
value: '{{ level_on }}'
|
||||
|
||||
# - service: ozw.set_config_parameter
|
||||
- service: zwave_js.set_config_parameter
|
||||
target:
|
||||
entity_id: '{{ entity_id }}'
|
||||
data:
|
||||
parameter: '{{ level_off_parameter }}'
|
||||
value: '{{ level_off }}'
|
||||
|
||||
fields:
|
||||
entity_id:
|
||||
description: Light or switch which represents
|
||||
example: light.red_series_dimmer
|
||||
selector:
|
||||
entity:
|
||||
#integration: zwave_js
|
||||
model:
|
||||
description: 'Device type: dimmer (default), switch, combo_light, combo_fan'
|
||||
example: dimmer
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- dimmer
|
||||
- switch
|
||||
- combo_light
|
||||
- combo_fan
|
||||
color:
|
||||
description: 'Choose a color.'
|
||||
example: purple
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- "Off"
|
||||
- Red
|
||||
- Orange
|
||||
- Yellow
|
||||
- Green
|
||||
- Cyan
|
||||
- Teal
|
||||
- Blue
|
||||
- Purple
|
||||
- Light Pink
|
||||
- Pink
|
||||
level_on:
|
||||
description: LED Brightness when on
|
||||
example: 10
|
||||
level_off:
|
||||
description: LED Brightness when off
|
||||
example: 3
|
||||
@@ -0,0 +1,177 @@
|
||||
alias: Master Bedroom Light Cycle
|
||||
fields:
|
||||
colorset:
|
||||
description: The set of colors to loop through
|
||||
example: 'gemtones'
|
||||
brightness:
|
||||
description: The brightness that the lights should be set to
|
||||
example: '100'
|
||||
transition:
|
||||
description: The transition time, in seconds
|
||||
example: '10'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_cycle_same
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_hue
|
||||
brightness: '{{ states("input_number.master_bedroom_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.master_bedroom_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.master_bedroom_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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 }}
|
||||
default:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_1
|
||||
brightness: '{{ states("input_number.master_bedroom_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.master_bedroom_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.master_bedroom_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_2
|
||||
brightness: '{{ states("input_number.master_bedroom_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.master_bedroom_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.master_bedroom_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_3
|
||||
brightness: '{{ states("input_number.master_bedroom_light_cycle_brightness") | int }}'
|
||||
transition: '{{ states("input_number.master_bedroom_light_cycle_transition") | int }}'
|
||||
profile: >
|
||||
{% if states('input_select.master_bedroom_color_set') == 'Basic' %}
|
||||
{% set colors = ['white','black','red','orange','yellow','green','blue','purple','pink','brown','gray'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Color Wheel' %}
|
||||
{% set colors = ['red','orange','amber','yellow','chartreuse','green','teal','blue','violet','purple','magenta'] %}
|
||||
{% elif states('input_select.master_bedroom_color_set') == 'Rainbow' %}
|
||||
{% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_color_set') == 'Gem Tones' %}
|
||||
{% set colors = ['amethyst','citrine','emerald','jade','lapis_lazuli','malachite','rose_quartz','ruby','sapphire','smokey_topaz'] %}
|
||||
{% elif states('input_select.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_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.master_bedroom_light_cycle_transition") | int }}'
|
||||
# Wait until the loop_lights script has finished running
|
||||
- wait_template: "{{ is_state('script.master_bedroom_loop_lights', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.master_bedroom_loop_lights
|
||||
@@ -0,0 +1,6 @@
|
||||
alias: Master Bedroom Loop Lights
|
||||
sequence:
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.master_bedroom_light_cycle', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.master_bedroom_light_cycle
|
||||
@@ -0,0 +1,33 @@
|
||||
alias: Wake Up the Master Bedroom
|
||||
mode: single
|
||||
icon: mdi:alarm
|
||||
sequence:
|
||||
- repeat:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- variables:
|
||||
volume: "{{ 0.5 + (repeat.index * 0.05) }}"
|
||||
- service: script.make_clever_announcement
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/time_to_wake_up.mp3
|
||||
volume: "{{iif(volume>1,1,volume)}}"
|
||||
- service: script.make_clever_announcement
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
media_content_id: media-source://media_source/local/Sounds/alarms/Alarm_Clock.mp3
|
||||
volume: "{{iif(volume>1,1,volume)}}"
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 5
|
||||
seconds: 0
|
||||
milliseconds: 0
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Auto
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
@@ -0,0 +1,64 @@
|
||||
alias: Notification Action Script
|
||||
sequence:
|
||||
# inside a automation actions or script sequence
|
||||
- alias: "Set up variables for the actions"
|
||||
variables:
|
||||
# Including an id in the action allows us to identify this script run
|
||||
# and not accidentally trigger for other notification actions
|
||||
action_open: "{{ 'OPEN_' ~ context.id }}"
|
||||
action_close: "{{ 'CLOSE_' ~ context.id }}"
|
||||
- alias: "Ask to close or open the garage"
|
||||
choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: cover.garage_door
|
||||
state: 'closed'
|
||||
sequence:
|
||||
service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: "The garage is closed. Do you want to adjust this?"
|
||||
data:
|
||||
actions:
|
||||
- action: "{{ action_open }}"
|
||||
title: Open
|
||||
- action: "{{ action_close }}"
|
||||
title: Close
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: cover.garage_door
|
||||
state: 'open'
|
||||
sequence:
|
||||
service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: "The garage is open. Do you want to adjust this?"
|
||||
data:
|
||||
actions:
|
||||
- action: "{{ action_open }}"
|
||||
title: Open
|
||||
- action: "{{ action_close }}"
|
||||
title: Close
|
||||
|
||||
- alias: "Wait for a response"
|
||||
wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
# waiting for the specific action avoids accidentally continuing
|
||||
# for another script/automation's notification action
|
||||
action: "{{ action_open }}"
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "{{ action_close }}"
|
||||
- alias: "Perform the action"
|
||||
choose:
|
||||
- conditions: "{{ wait.trigger.event.data.action == action_open }}"
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id: cover.garage_door
|
||||
- conditions: "{{ wait.trigger.event.data.action == action_close }}"
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.garage_door
|
||||
@@ -0,0 +1,10 @@
|
||||
alias: Notify Alert
|
||||
sequence:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
title: "Wake up!"
|
||||
message: "The house is on fire and the cat's stuck in the dryer!"
|
||||
data:
|
||||
ttl: 0
|
||||
priority: high
|
||||
channel: alarm_stream
|
||||
@@ -0,0 +1,8 @@
|
||||
alias: Notify With Icon
|
||||
sequence:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
title: "Cellphone icon"
|
||||
message: "This will show a cellphone icon in the status bar"
|
||||
data:
|
||||
notification_icon: "mdi:cellphone"
|
||||
@@ -0,0 +1,13 @@
|
||||
alias: Notify with Pic
|
||||
sequence:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
title: Test
|
||||
message: "This is a test message with an image."
|
||||
data:
|
||||
image: >
|
||||
{%- set image = "https://automation.clintweaver.com" + state_attr("camera.frigate_cam19","entity_picture") %}
|
||||
{{ image }}
|
||||
# image: >
|
||||
# {%- set image = "http://192.168.1.11:8123" + state_attr("camera.frigate_cam08","entity_picture") %}
|
||||
# {{ image }}
|
||||
@@ -0,0 +1,139 @@
|
||||
alias: Nursery Light Cycle
|
||||
fields:
|
||||
colorset:
|
||||
description: The set of colors to loop through
|
||||
example: 'gemtones'
|
||||
brightness:
|
||||
description: The brightness that the lights should be set to
|
||||
example: '100'
|
||||
transition:
|
||||
description: The transition time, in seconds
|
||||
example: '10'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_cycle_same
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.nursery_hue
|
||||
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 }}
|
||||
default:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.nursery_color_1
|
||||
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 }}
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.nursery_color_2
|
||||
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 }}'
|
||||
# Wait until the loop_lights script has finished running
|
||||
- wait_template: "{{ is_state('script.nursery_loop_lights', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.nursery_loop_lights
|
||||
@@ -0,0 +1,6 @@
|
||||
alias: Nursery Loop Lights
|
||||
sequence:
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.nursery_light_cycle', 'off') }}"
|
||||
- service: script.turn_on
|
||||
entity_id: script.nursery_light_cycle
|
||||
@@ -0,0 +1,21 @@
|
||||
alias: All Kids Youtube Music
|
||||
mode: single
|
||||
icon: mdi:music
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
source: nursery_hub
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.shuffle_set
|
||||
data:
|
||||
shuffle: true
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.repeat_set
|
||||
data:
|
||||
repeat: all
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.ytube_music_player
|
||||
media_content_id: RDCLAK5uy_mH5mS2pbI9c743F2Xoi7WxRVBbw7k3hPE
|
||||
media_content_type: playlist
|
||||
@@ -0,0 +1,22 @@
|
||||
alias: Bridget travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_bridget
|
||||
value: >-
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.bridget_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.bridget_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.bridget_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('binary_sensor.have_custody', 'off') %}
|
||||
Off week
|
||||
{% elif is_state('input_boolean.clint_work_from_home', 'on') %}
|
||||
At Childcare
|
||||
{% else %}
|
||||
Somewhere
|
||||
{% endif %}
|
||||
@@ -0,0 +1,22 @@
|
||||
alias: Clint travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_clint
|
||||
value: >-
|
||||
{% if is_state('input_boolean.clint_home', 'on') %}
|
||||
{% if is_state('input_boolean.clint_is_awake','off') %}
|
||||
sleeping
|
||||
{% elif is_state('input_boolean.clint_in_bed','on') %}
|
||||
in bed
|
||||
{% else %}
|
||||
{{ states("input_select.clint_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('device_tracker.pixel_7', 'home') and is_state('input_boolean.clint_home', 'off') %}
|
||||
near home ({{ states('input_select.clint_status_dropdown') }})
|
||||
{% elif not is_state('device_tracker.pixel_7', 'not_home') %}
|
||||
at {{ states('device_tracker.pixel_7') }}
|
||||
{% else %}
|
||||
somewhere
|
||||
{% endif %}
|
||||
@@ -0,0 +1,9 @@
|
||||
alias: Clint traveltime
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Clint Traveltime
|
||||
entity_id: script.clint_traveltime
|
||||
message: >
|
||||
{{ states("sensor.date_time_iso") }} Updated travel time for Clint
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Take Meds
|
||||
sequence:
|
||||
- alias: "Check the input_booleans and react accordingly"
|
||||
choose:
|
||||
- conditions:
|
||||
- alias: "Morning meds needed"
|
||||
condition: state
|
||||
entity_id: input_boolean.clint_needs_am_meds
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off AM meds"
|
||||
service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.clint_needs_am_meds
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/taking_morning_meds.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
- conditions:
|
||||
- alias: "Afternoon meds needed"
|
||||
condition: state
|
||||
entity_id: input_boolean.clint_needs_pm_meds
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off PM meds"
|
||||
service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.clint_needs_pm_meds
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/taking_afternoon_meds.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
default:
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/meds_not_needed.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: Ebin travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_ebin
|
||||
value: >-
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.ebin_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.ebin_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('group.person_ebin', 'home') and is_state('input_boolean.ebin_home', 'off') %}
|
||||
Near home ({{ states('input_select.ebin_status_dropdown') }})
|
||||
{% else %}
|
||||
Away
|
||||
{% endif %}
|
||||
@@ -0,0 +1,22 @@
|
||||
alias: Emmett travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_emmett
|
||||
value: >-
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
{% if is_state('input_boolean.emmett_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.emmett_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.emmett_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('binary_sensor.have_custody', 'off') %}
|
||||
Off week
|
||||
{% elif is_state('input_boolean.clint_work_from_home', 'on') %}
|
||||
At Childcare
|
||||
{% else %}
|
||||
Somewhere
|
||||
{% endif %}
|
||||
@@ -0,0 +1,21 @@
|
||||
alias: Goodnight Kids Youtube Music
|
||||
mode: single
|
||||
icon: mdi:music
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
source: nursery_hub
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.shuffle_set
|
||||
data:
|
||||
shuffle: false
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.repeat_set
|
||||
data:
|
||||
repeat: all
|
||||
entity_id: media_player.ytube_music_player
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.ytube_music_player
|
||||
media_content_id: PLtfKVM9o2_5ag5qC9nHxl7tKBvGRnh2HM
|
||||
media_content_type: playlist
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: Guest travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_guest
|
||||
value: >-
|
||||
{% if is_state('input_boolean.guest_home', 'on') %}
|
||||
{% if is_state('input_boolean.guest_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.guest_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.guest_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Away
|
||||
{% endif %}
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: Kristy travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_kristy
|
||||
value: >-
|
||||
{% if is_state('input_boolean.kristy_home', 'on') %}
|
||||
{% if is_state('input_boolean.kristy_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.kristy_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.kristy_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('group.person_kristy', 'home') and is_state('input_boolean.kristy_home', 'off') %}
|
||||
Near home ({{ states('input_select.kristy_status_dropdown') }})
|
||||
{% else %}
|
||||
Away
|
||||
{% endif %}
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: Marshall travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_marshall
|
||||
value: >-
|
||||
{% if is_state('input_boolean.marshall_home', 'on') %}
|
||||
{% if is_state('input_boolean.marshall_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.marshall_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.marshall_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('group.person_marshall', 'home') and is_state('input_boolean.marshall_home', 'off') %}
|
||||
Near home ({{ states('input_select.marshall_status_dropdown') }})
|
||||
{% else %}
|
||||
Away
|
||||
{% endif %}
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: Tess travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_tess
|
||||
value: >-
|
||||
{% if is_state('input_boolean.tess_home', 'on') %}
|
||||
{% if is_state('input_boolean.tess_is_awake','off') %}
|
||||
Sleeping
|
||||
{% elif is_state('input_boolean.tess_in_bed','on') %}
|
||||
In bed
|
||||
{% else %}
|
||||
{{ states("input_select.tess_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('group.person_tess', 'home') and is_state('input_boolean.tess_home', 'off') %}
|
||||
Near home ({{ states('input_select.tess_status_dropdown') }})
|
||||
{% else %}
|
||||
Away
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user