diff --git a/packages/holidays.yaml b/packages/holidays.yaml index f32defe..7bc6a41 100644 --- a/packages/holidays.yaml +++ b/packages/holidays.yaml @@ -49,6 +49,8 @@ input_boolean: this_is_halloween: name: This is Halloween + haunted_sounds: + name: Haunted Sounds automation: - id: refresh_holioday_sensors @@ -82,6 +84,28 @@ automation: - service: script.turn_on entity_id: script.this_is_halloween + - id: haunted_sounds_on + alias: Haunted Sounds On + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.haunted_sounds + to: 'on' + action: + - service: script.turn_on + entity_id: script.haunted_sounds + + - id: haunted_sounds_off + alias: Haunted Sounds Off + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.haunted_sounds + to: 'off' + action: + - service: script.turn_off + entity_id: script.haunted_sounds + - id: this_is_halloween_off alias: This is Halloween Off initial_state: true @@ -112,4 +136,63 @@ automation: {%- endif -%} action: - service: input_boolean.turn_on - entity_id: input_boolean.this_is_halloween \ No newline at end of file + entity_id: input_boolean.this_is_halloween + + - id: operation_haunted_house + alias: Operation Haunted House + initial_state: true + trigger: + - platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.halloween_show', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" + condition: + - condition: state + entity_id: calendar.holidays_in_united_states + state: "on" + - condition: template + value_template: > + {%- set event=states.calendar.holidays_in_united_states.attributes.message %} + {%- if event == 'Halloween' %} + true + {%- endif -%} + action: + - service: script.turn_on + entity_id: input_boolean.haunted_sounds + +script: + + haunted_sounds: + sequence: + - delay: 00:05:00 + - service: shell_command.haunted_scream + - delay: 00:07:06 + - service: shell_command.haunted_leotta + - delay: 00:02:36 + - service: shell_command.haunted_raven + - delay: 00:04:03 + - service: shell_command.haunted_harp + - delay: 00:01:40 + - service: shell_command.haunted_door + - delay: 00:03:33 + - service: shell_command.haunted_howling + - delay: 00:04:03 + - service: shell_command.haunted_laugh2 + - delay: 00:03:56 + - service: shell_command.haunted_seance_horn + - delay: 00:08:00 + - service: shell_command.haunted_piano + - delay: 00:03:10 + - service: shell_command.haunted_clock + - delay: 00:07:33 + - service: shell_command.haunted_ballroom + - delay: 00:03:18 + - service: shell_command.haunted_door2 + - delay: 00:05:00 + - service: shell_command.haunted_bells + - delay: 00:02:18 + - service: shell_command.haunted_laugh + - delay: 00:06:36 + - service: shell_command.haunted_chains + + + + \ No newline at end of file