mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-11-07 18:08:04 +00:00
Starting to build out Holiday color programs
This commit is contained in:
38
script/monthly_colors_scene.yaml
Executable file
38
script/monthly_colors_scene.yaml
Executable file
@@ -0,0 +1,38 @@
|
||||
######################################################################################################
|
||||
###Script to turn on scene for the appropriate month for the front of the house but only when the sun is down.
|
||||
# action:
|
||||
# - service: script.monthly_color_scene
|
||||
#
|
||||
# scenes should be named month_[01-12]_colors (month_06_colors)
|
||||
######################################################################################################
|
||||
|
||||
monthly_color_scene:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: input_boolean.alert_mode
|
||||
state: 'off'
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: "Launching Scene:"
|
||||
message: >
|
||||
"scene.month_
|
||||
{%- if now().strftime("%m%d")|int > 202 and now().strftime("%m%d")|int < 206 -%}
|
||||
valentines_day
|
||||
{%- else -%}
|
||||
{{ states('sensor.date').split('-')[1] }}
|
||||
{%- endif -%}_colors"
|
||||
|
||||
- service: scene.turn_on
|
||||
data_template:
|
||||
entity_id: >
|
||||
"scene.month_
|
||||
{%- if now().strftime("%m%d")|int > 202 and now().strftime("%m%d")|int < 206 -%}
|
||||
valentines_day
|
||||
{%- else -%}
|
||||
{{ states('sensor.date').split('-')[1] }}
|
||||
{%- endif -%}_colors"
|
||||
|
||||
Reference in New Issue
Block a user