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,35 @@
|
||||
alias: Continue White Noise
|
||||
id: automation_continue_white_noise
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: "off"
|
||||
for: "00:00:02"
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: "idle"
|
||||
for: "00:00:02"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.master_bedroom_mode
|
||||
# option: 'Off'
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.google_home
|
||||
option: 'Master Bedroom'
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.ambient_sound
|
||||
option: 'Thunderstorm'
|
||||
- service: input_number.set_value
|
||||
data:
|
||||
entity_id: input_number.volume_ambientsounds
|
||||
value: '0.3'
|
||||
- service: script.ambientsounds
|
||||
@@ -0,0 +1,55 @@
|
||||
alias: Master Bedroom Asleep
|
||||
id: automation_master_bedroom_asleep
|
||||
initial_state: 'off'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
to: "wireless"
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bedroom_person_occupancy
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:05'
|
||||
|
||||
condition:
|
||||
- alias: "Adult Home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "After 10:00PM and before 4:00AM"
|
||||
condition: time
|
||||
after: '21:00:00'
|
||||
before: '04:00:00'
|
||||
|
||||
- alias: "Clint's phone charging or someone on master bed"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
state: 'wireless'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
|
||||
|
||||
- alias: "The room is currently awake"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
alias: Master Bedroom Awake
|
||||
id: automation_master_bedroom_awake
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
|
||||
condition:
|
||||
- alias: "Adult Home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "Before 10:00PM and after 4:00AM"
|
||||
condition: time
|
||||
before: '21:00:00'
|
||||
after: '04:00:00'
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'off'
|
||||
|
||||
- alias: "The boolean is currently on"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Auto
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
@@ -0,0 +1,198 @@
|
||||
alias: Master Bedroom Dimmer LEDs
|
||||
id: automation_master_bedroom_dimmer_leds
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
|
||||
- platform: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- alias: "Light off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '3'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '3'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 78"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 78
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '3'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '3'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 104"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 104
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '4'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '4'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 130"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 130
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '5'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '5'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 156"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 156
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '6'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '6'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 182"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 182
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '7'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '7'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 208"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 208
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '8'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '8'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
- conditions:
|
||||
- alias: "Light brightness below 234"
|
||||
condition: numeric_state
|
||||
entity_id: light.master_bedroom_hue
|
||||
attribute: brightness
|
||||
below: 234
|
||||
sequence:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '9'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '9'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
default:
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '19'
|
||||
value: '10'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
- service: zwave_js.set_config_parameter
|
||||
data:
|
||||
parameter: '21'
|
||||
value: '10'
|
||||
target:
|
||||
device_id: 201b960a4203135c454f9acb3f035021
|
||||
|
||||
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
@@ -0,0 +1,59 @@
|
||||
alias: Master Bedroom Humidifier
|
||||
id: automation_master_bedroom_humidifier
|
||||
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
id: low_humidity
|
||||
entity_id: sensor.master_bedroom_multisensor_humidity
|
||||
below: input_number.master_bedroom_humidifier_on
|
||||
|
||||
- platform: numeric_state
|
||||
id: high_humidity
|
||||
entity_id: sensor.master_bedroom_multisensor_humidity
|
||||
above: input_number.master_bedroom_humidifier_off
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- alias: "Humidity too high via trigger"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: high_humidity
|
||||
sequence:
|
||||
- service: fan.turn_off
|
||||
target:
|
||||
entity_id: fan.master_bedroom
|
||||
|
||||
- alias: "Humidity too high via manual run"
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.master_bedroom_multisensor_humidity
|
||||
above: input_number.master_bedroom_humidifier_off
|
||||
sequence:
|
||||
- service: fan.turn_off
|
||||
target:
|
||||
entity_id: fan.master_bedroom
|
||||
|
||||
- alias: "Humidity too low via trigger"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: low_humidity
|
||||
sequence:
|
||||
|
||||
- service: fan.turn_on
|
||||
data:
|
||||
percentage: 33
|
||||
target:
|
||||
entity_id: fan.master_bedroom
|
||||
|
||||
- alias: "Humidity too low via manual run"
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.master_bedroom_multisensor_humidity
|
||||
below: input_number.master_bedroom_humidifier_on
|
||||
sequence:
|
||||
|
||||
- service: fan.turn_on
|
||||
data:
|
||||
percentage: 33
|
||||
target:
|
||||
entity_id: fan.master_bedroom
|
||||
@@ -0,0 +1,209 @@
|
||||
alias: Master Bedroom Light Cycle
|
||||
id: automation_master_bedroom_light_cycle
|
||||
trigger:
|
||||
- id: light_cycle_on
|
||||
platform: state
|
||||
entity_id: input_boolean.master_bedroom_light_cycle
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
- id: setting_change
|
||||
platform: state
|
||||
entity_id:
|
||||
- input_number.master_bedroom_light_cycle_transition
|
||||
- input_select.master_bedroom_color_set
|
||||
- input_boolean.master_bedroom_cycle_same
|
||||
|
||||
condition: "{{ is_state('input_boolean.master_bedroom_light_cycle','on') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_light_cycle
|
||||
state: 'on'
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions: # If all lights should be the same color and the projector is off, reference the Hue group for all the lights
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_cycle_same
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.master_bedroom_ceiling_hue
|
||||
data:
|
||||
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 }}
|
||||
|
||||
- conditions: # If all lights should be different colors, start referencing the individual lights that don't obscure the TV
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_cycle_same
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.master_bedroom_1
|
||||
data:
|
||||
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
|
||||
target:
|
||||
entity_id: light.master_bedroom_2
|
||||
data:
|
||||
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
|
||||
target:
|
||||
entity_id: light.master_bedroom_3
|
||||
data:
|
||||
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 }}'
|
||||
|
||||
until:
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_light_cycle
|
||||
state: 'off'
|
||||
|
||||
- service: automation.trigger
|
||||
entity_id: automation.master_bedroom_lights_to_on
|
||||
@@ -0,0 +1,92 @@
|
||||
alias: Master Bedroom Lights to Off
|
||||
id: automation_master_bedroom_lights_to_off
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
to: 'off'
|
||||
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.entryway_naturally_lit
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
#- platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
|
||||
|
||||
- alias: "Master Bedroom light cycle not on"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_light_cycle
|
||||
state: "off"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: light.master_bedroom_1
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: light.master_bedroom_2
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: light.master_bedroom_3
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Nightlight'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.lighting_automations
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: 'off'
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: 5
|
||||
target:
|
||||
entity_id: scene.master_bedroom_hue_off
|
||||
default:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- light.master_bedroom_1
|
||||
- light.master_bedroom_2
|
||||
- light.master_bedroom_3
|
||||
- light.accent
|
||||
- light.master_bedroom_accent
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
alias: Master Bedroom Lights to On
|
||||
id: automation_master_bedroom_lights_to_on
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: mode_change
|
||||
entity_id:
|
||||
- input_select.master_bedroom_mode
|
||||
- input_select.automatic_light_profile
|
||||
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.master_bedroom_naturally_lit
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: occupied
|
||||
entity_id: binary_sensor.master_bedroom_occupied
|
||||
to: "on"
|
||||
|
||||
# - platform: state
|
||||
# id: motion
|
||||
# entity_id: group.master_bedroom_motion
|
||||
# to: "on"
|
||||
|
||||
condition:
|
||||
- alias: "Home is occupied"
|
||||
condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
|
||||
- alias: "Master Bedroom light cycle not on"
|
||||
condition: state
|
||||
entity_id: input_boolean.front_room_light_cycle
|
||||
state: "off"
|
||||
|
||||
- alias: "Check if light should turn on"
|
||||
condition: or
|
||||
conditions:
|
||||
|
||||
- alias: "Guest mode is on"
|
||||
condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
|
||||
- alias: "Motion or occupancy were detected in a dim room"
|
||||
condition: and
|
||||
conditions:
|
||||
- alias: "Light level below trigger amount"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bedroom_naturally_lit
|
||||
state: 'off'
|
||||
|
||||
- alias: "Motion or occupancy were detected"
|
||||
condition: or
|
||||
conditions:
|
||||
- alias: "Motion was detected"
|
||||
condition: trigger
|
||||
id: "motion"
|
||||
- alias: "Occupancy was detected"
|
||||
condition: trigger
|
||||
id: "occupied"
|
||||
- alias: "A scene changed and the lights are already on"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: "mode_change"
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: "on"
|
||||
|
||||
variables:
|
||||
switch_name: light.master_bedroom_dimmer_light
|
||||
light_name: master_bedroom_hue
|
||||
mode_name: input_select.master_bedroom_mode
|
||||
automatic_profile: input_select.automatic_light_profile
|
||||
|
||||
action:
|
||||
- alias: "Make sure Z-Wave switch is turned on"
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: "{{ switch_name }}"
|
||||
- choose:
|
||||
- alias: "If the room is set to manual, just turn the lights on"
|
||||
conditions:
|
||||
- alias: "Room set to manual"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Manual
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.master_bedroom_hue
|
||||
|
||||
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
- alias: "Automatic light profile set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.automatic_light_profile
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Master Bedroom Mode scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
- alias: "Room set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- delay: 1
|
||||
@@ -0,0 +1,70 @@
|
||||
alias: 'Master Bedroom Not Occupied'
|
||||
id: automation_master_bedroom_not_occupied
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- binary_sensor.master_bedroom_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
|
||||
# - platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_off_manually
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.master_bed_occupied
|
||||
state:
|
||||
- 'off'
|
||||
- 'unavailable'
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: 'on'
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bedroom_person_occupancy
|
||||
state: 'off'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bedroom_occupied
|
||||
state: 'off'
|
||||
for:
|
||||
minutes: 5
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: 'Master Bedroom Occupied'
|
||||
id: automation_master_bedroom_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.master_bedroom_occupied
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
@@ -0,0 +1,161 @@
|
||||
alias: Master Bedroom Status
|
||||
id: automation_master_bedroom_status
|
||||
|
||||
trigger:
|
||||
- id: master_bed_not_occupied
|
||||
platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
|
||||
- id: phone_charging
|
||||
platform: state
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
to: "wireless"
|
||||
|
||||
- id: master_bed_person_occupancy
|
||||
platform: state
|
||||
entity_id: binary_sensor.master_bedroom_person_occupancy
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
|
||||
- id: master_bed_occupied
|
||||
platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:05'
|
||||
|
||||
condition:
|
||||
- alias: Okay to turn off or on
|
||||
condition: or
|
||||
conditions:
|
||||
- alias: "Is the room awake?"
|
||||
condition: and
|
||||
conditions:
|
||||
- alias: "The room is currently asleep"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'on'
|
||||
|
||||
- alias: "An adult is home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "It is before 10:00PM and after 4:00AM"
|
||||
condition: time
|
||||
before: '22:00:00'
|
||||
after: '04:00:00'
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'off'
|
||||
|
||||
- alias: "Is the room asleep?"
|
||||
condition: and
|
||||
conditions:
|
||||
- alias: "The room is currently awake"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'off'
|
||||
|
||||
- alias: "Adult Home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "After 10:00PM and before 4:00AM"
|
||||
condition: time
|
||||
after: '22:00:00'
|
||||
before: '04:00:00'
|
||||
|
||||
- alias: "Someone on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- alias: "The room is currently asleep"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'on'
|
||||
|
||||
- alias: "An adult is home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "It is before 10:00PM and after 4:00AM"
|
||||
condition: time
|
||||
before: '22:00:00'
|
||||
after: '04:00:00'
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
|
||||
- conditions:
|
||||
- alias: "The room is currently awake"
|
||||
condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'off'
|
||||
|
||||
- alias: "Adult Home"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
- alias: "After 10:00PM and before 4:00AM"
|
||||
condition: time
|
||||
after: '22:00:00'
|
||||
before: '04:00:00'
|
||||
|
||||
- alias: "Someone on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Auto
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
|
||||
# From Master Bedroom Asleep
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
@@ -0,0 +1,12 @@
|
||||
alias: Master Bedroom White Noise Off
|
||||
id: automation_master_bedroom_white_noise_off
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
to: "off"
|
||||
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
alias: Master Bedroom White Noise On
|
||||
id: automation_master_bedroom_white_noise_on
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.master_bedroom_mode
|
||||
# option: 'Off'
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.3
|
||||
target:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
data:
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$@12740
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: Thunderstorm
|
||||
thumbnail: >-
|
||||
http://192.168.1.10:50002/transcoder/jpegtnscaler.cgi/folderart/12740.jpg
|
||||
media_class: music
|
||||
children_media_class: null
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://dlna_dms
|
||||
- media_content_type: object.container
|
||||
media_content_id: media-source://dlna_dms/dream_media/:21
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$16644
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$16648
|
||||
default:
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
data:
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$@12740
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: Thunderstorm
|
||||
thumbnail: >-
|
||||
http://192.168.1.10:50002/transcoder/jpegtnscaler.cgi/folderart/12740.jpg
|
||||
media_class: music
|
||||
children_media_class: null
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://dlna_dms
|
||||
- media_content_type: object.container
|
||||
media_content_id: media-source://dlna_dms/dream_media/:21
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$16644
|
||||
- media_content_type: object.container.storageFolder
|
||||
media_content_id: media-source://dlna_dms/dream_media/:22$16648
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
alias: Random Master Bed Strip
|
||||
id: automation_random_master_bed_strip
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ is_state('light.master_bedroom_hue', 'on') and is_state('input_select.master_bedroom_mode', 'Nightlight') }}"
|
||||
id: 'master_bedroom_nightlight'
|
||||
- platform: template
|
||||
value_template: "{{ is_state('light.master_bedroom_hue', 'on') and is_state('input_select.master_bedroom_mode', 'Auto') and is_state('input_select.automatic_light_profile', 'Nightlight') }}"
|
||||
id: 'automatic_light_profile_nightlight'
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: master_bedroom_nightlight
|
||||
- condition: trigger
|
||||
id: automatic_light_profile_nightlight
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.master_bedroom_accent
|
||||
data:
|
||||
effect: candle
|
||||
brightness_pct: 50
|
||||
default:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.master_bedroom_accent
|
||||
Reference in New Issue
Block a user