Home-AssistantConfig/config/packages/triggers/self_destruct.yaml

66 lines
1.8 KiB
YAML
Executable File

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
input_boolean.self_destruct:
friendly_name: 'Self Destruct'
icon: mdi:skull
hidden: False
#-------------------------------------------
input_boolean:
self_destruct:
name: Self Destruct
initial: off
#-------------------------------------------
##############################################################################
### Pretend to blow up the house..
##############################################################################
automation:
- alias: 'Self Destruct sequence'
trigger:
- platform: state
entity_id: input_boolean.self_destruct
to: 'on'
action:
- service: media_player.turn_on
entity_id: media_player.livingroomCC
- service: switch.turn_on
entity_id: switch.lr_amp
- delay: '00:00:05'
- service: media_player.volume_set
entity_id:
- media_player.livingroomCC
data:
volume_level: 0.22
- service: media_player.play_media
entity_id:
- media_player.livingroomCC
- media_player.entry_alarm_panel
- media_player.bedroom_alarm_panel
data_template:
media_content_id: >
"https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/speechcons/self_destruct.mp3"
media_content_type: audio/mp4
- service: light.turn_on
entity_id: all
data:
flash: long
- service: switch.turn_off
entity_id: all
- service: light.turn_off
entity_id: all
- service: input_boolean.turn_off
entity_id:
- input_boolean.self_destruct