Moving to using local Blue audio jack instead of chrome cast for main audio

This commit is contained in:
Jeffrey Stone 2021-11-11 22:10:34 -05:00
parent 7c709c1856
commit 846a5e538c
8 changed files with 362 additions and 213 deletions

View File

@ -160,7 +160,6 @@
initial_state: true
- id: driveway_motion_lighting
alias: Driveway Motion Lighting
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.aarlo_motion_driveway
@ -179,6 +178,8 @@
minutes: 1
- service: script.turn_on
entity_id: script.driveway_off
initial_state: true
mode: single
- id: show_time_over
alias: Show Time over
initial_state: true
@ -408,11 +409,11 @@
seconds: 15
- service: media_player.volume_set
data:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
volume_level: 0.99
- service: media_player.play_media
target:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
data:
media_content_id: /media/sounds/tornado_alarm.mp3
media_content_type: music
@ -420,7 +421,7 @@
seconds: 110
- service: media_player.play_media
target:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
data:
media_content_id: /media/sounds/tornado_alarm.mp3
media_content_type: music
@ -431,7 +432,7 @@
sequence:
- service: media_player.media_stop
target:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
default: []
mode: restart
- id: '1626618008890'
@ -448,7 +449,8 @@
- service: script.text_notify
data:
who: all_ios
message: The Garden has received {{ states('sensor.previous_rainfall') | round(2) }} inches of rain in the last 48 hours.
message: The Garden has received {{ states('sensor.previous_rainfall') | round(2)
}} inches of rain in the last 48 hours.
mode: single
- id: '1627078744808'
alias: buy more xlm
@ -582,7 +584,7 @@
entity_id: script.haunted_house
- service: media_player.media_stop
target:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
default: []
initial_state: true
mode: single
@ -658,9 +660,6 @@
entity_id: input_select.remote_system_status
data:
option: unknown
- service: notify.mobile_app_jeffrey_ha_app
data:
message: Remote System is Down!!
mode: single
- id: '1629581648846'
alias: Remote System Alert
@ -716,5 +715,92 @@
action:
- service: notify.mobile_app_jeffrey_ha_app
data:
message: Webhook Got Touched!
message: '{{ trigger.json.message }}'
- service: '{{ trigger.json.service }}'
data:
entity_id: '{{ trigger.json.entity }}'
mode: single
- id: '1630181709370'
alias: ifttt webhook
description: ''
trigger:
- platform: webhook
webhook_id: ifttt_webhook
condition: []
action:
- service: notify.mobile_app_jeffrey_ha_app
data:
message: 'A New Note: {{ trigger.json.message }}'
mode: single
- id: '1630186526302'
alias: Daily Agenda
description: ''
trigger:
- platform: webhook
webhook_id: daily_agenda
condition: []
action:
- service: mqtt.publish
data:
topic: house/daily/events
payload: '{{ trigger.json.events | truncate(250, False) | replace("anchoragehouse677@gmail.com","")
}}'
retain: true
mode: single
- id: honiture_q6
alias: Honiture Q6
description: ''
trigger:
- platform: state
entity_id: input_boolean.q6s2
id: q6s2_on
from: 'off'
to: 'on'
- platform: state
entity_id: input_boolean.q6s2
id: q6s2_off
from: 'on'
to: 'off'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: q6s2_on
sequence:
- service: media_player.play_media
target:
device_id: edb192da8c7f80c32410147961257fae
data:
media_content_id: q six s two go to work
media_content_type: routine
- conditions:
- condition: trigger
id: q6s2_off
sequence:
- service: media_player.play_media
target:
device_id: edb192da8c7f80c32410147961257fae
data:
media_content_id: q six s two go home
media_content_type: routine
default: []
mode: single
- id: '1636680118730'
alias: Turn of Skylar's Humidifer
description: ''
trigger:
- platform: state
entity_id: humidifier.diffuser_skylars_bedroom
to: 'on'
for:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
condition: []
action:
- service: humidifier.turn_off
target:
entity_id: humidifier.diffuser_skylars_bedroom
mode: single

View File

@ -70,18 +70,6 @@ automation:
- service: input_boolean.turn_off
entity_id: input_boolean.audible_notifications
# - id: cb0063e4-1dfe-4537-8b9e-4f64b2eba35d
# initial_state: true
# alias: Skylar Nightly Announcements
# trigger:
# platform: template
# value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
# action:
# - service: script.turn_on
# entity_id: script.skylar_nightly_briefing
- id: 1d8f396a-f6ec-460d-97e3-d11900418f95
alias: Good Morning Report
initial_state: true
@ -195,18 +183,18 @@ automation:
who: "all_ios"
message: It's almost time to head for school.
- alias: Lightning Detected Demo
trigger:
- platform: state
entity_id: sensor.lightning_warning
to: 'Unsafe'
action:
- service: script.status_annc
data:
who: '{{ states.sensor.room_presence.state }}'
call_greeting: 1
call_time_is: 1
call_lighting_warning: 1
# - alias: Lightning Detected Demo
# trigger:
# - platform: state
# entity_id: sensor.lightning_warning
# to: 'Unsafe'
# action:
# - service: script.status_annc
# data:
# who: '{{ states.sensor.room_presence.state }}'
# call_greeting: 1
# call_time_is: 1
# call_lighting_warning: 1
script:
reset_annc_switches:
@ -293,7 +281,7 @@ script:
sequence:
- service: script.speech_engine_simplified
data:
who: media_player.ha_speaker
who: media_player.ha_blue
message: >
I know a Haiku. This one is called,
{{ [

View File

@ -14,8 +14,8 @@
# For more info on Media Players visit https://www.home-assistant.io/integrations/media_player/
# MODIFY this section as needed or comment it out completely if not needed.
# media_player:
# - platform: yamaha
# host: 192.168.7.152
# - platform: yamaha
# host: 192.168.7.152
################################
# Media extractor is used for playing youtube audio. For more info ->https://www.home-assistant.io/integrations/media_extractor/
@ -36,6 +36,7 @@ script:
#
# - service: script.local_audio
# data:
# speaker: main
# volume: .5
# media: /media/local_audio.mp3
#
@ -51,18 +52,22 @@ script:
state: Home
# Update the media player with the one you want to use
- service: media_player.turn_on
entity_id: media_player.ha_speaker
data:
entity_id: >
{{ speaker }}
# This sets the voume via a parameter when the script is called, and should be a value between .1 and 1.0
- service: media_player.volume_set
data:
entity_id: media_player.ha_speaker
entity_id: >
{{ speaker }}
volume_level: >
{{ volume }}
- delay: 00:00:05
# This tells it to play the media and is set when the script is called.
- service: media_player.play_media
entity_id: media_player.ha_speaker
data:
entity_id: >
{{ speaker }}
media_content_type: "music"
media_content_id: >
{{ media }}
@ -78,6 +83,7 @@ script:
#
# - service: script.youtube_audio
# data:
# speaker: main
# volume: .5
# media: https://www.youtube.com/watch?v=pVeX4C9B1Lk
#
@ -93,18 +99,23 @@ script:
state: Home
# Update the media player with the one you want to use
- service: media_player.turn_on
entity_id: media_player.ha_speaker
data:
entity_id: >
{{ speaker }}
# This sets the voume via a parameter when the script is called, and should be a value between .1 and 1.0
- service: media_player.volume_set
data_template:
entity_id: media_player.ha_speaker
data:
entity_id: >
{{ speaker }}
volume_level: >
{{ volume }}
# This tells it to play the media and is set when the script is called.
# This tells it to play the media and is set when the script is called.
# media_content_type: video/Youtube
- service: media_extractor.play_media
entity_id: media_player.ha_speaker
data_template:
media_content_type: video/youtube
data:
entity_id: >
{{ speaker }}
media_content_type: music
media_content_id: >
{{ media }}
@ -184,7 +195,44 @@ automation:
main
{% endif %}
retain: true
- id: e1cb287a-0423-11eb-adc1-0242ac120002
alias: Notification Volume Dim
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.audible_notifications
to: 'off'
action:
- service: media_player.volume_set
data:
entity_id:
- media_player.kitchen_display
- media_player.kitchen_echo
- media_player.upstairs_speaker
- media_player.croft_speaker
volume_level: .3
- id: e1cb27bc-0423-11eb-adc1-0242ac120002
alias: Notification Volume Normal
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.audible_notifications
to: 'on'
action:
- service: media_player.volume_set
data:
entity_id:
- media_player.kitchen_display
- media_player.kitchen_echo
- media_player.upstairs_speaker
- media_player.croft_speaker
- media_player.ha_blue
- media_player.living_room_echo
- media_player.master_bedroom_speaker
- media_player.skylars_bedroom_speaker
volume_level: .5
sensor:

View File

@ -29,15 +29,15 @@ automation:
state: 'on'
action:
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
- wait_template: "{{ not is_state('media_player.ha_blue', 'playing') }}"
- service: media_player.volume_set
data:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
volume_level: 0.22
- service: media_player.play_media
data:
entity_id: >
media_player.ha_speaker
media_player.ha_blue
media_content_id: >
{% if now().strftime("%M")|int == 30 %}
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/cuckoo-clock-01.wav

View File

@ -131,7 +131,8 @@ automation:
action:
- service: script.youtube_audio
data_template:
media: "http://192.168.7.40/audio/MK_MainStreet_Loop.mp3"
speaker: media_player.ha_blue
media: /media/disney/MK_MainStreet_Loop.mp3
volume: .4
- id: mk_loop_off
alias: MK Loop Off
@ -142,7 +143,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -157,7 +158,8 @@ automation:
action:
- service: script.youtube_audio
data_template:
media: "http://192.168.7.40/frontierland_loop.mp3"
speaker: media_player.ha_blue
media: /media/disney/frontierland_loop.mp3
volume: .4
- id: frontier_loop_off
alias: Frontier Loop Off
@ -168,7 +170,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -183,7 +185,8 @@ automation:
action:
- service: script.youtube_audio
data_template:
media: "http://192.168.7.40/adventureland_loop.mp3"
speaker: media_player.ha_blue
media: /media/disney/adventureland_loop.mp3
volume: .4
- id: adventure_loop_off
alias: Adventure Loop Off
@ -194,7 +197,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -209,7 +212,8 @@ automation:
action:
- service: script.youtube_audio
data_template:
media: "http://192.168.7.40/epcot_entrance_loop.mp3"
speaker: media_player.ha_blue
media: /media/disney/epcot_entrance_loop.mp3
volume: .4
- id: epcotentrance_loop_off
alias: Epcot Entrance Loop Off
@ -220,7 +224,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -236,6 +240,7 @@ automation:
action:
- service: script.youtube_audio
data_template:
speaker: media_player.ha_blue
media: "https://www.youtube.com/watch?v=19-ooWL5R8w"
volume: .4
- id: pixar_pier_loop_off
@ -247,7 +252,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -262,7 +267,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/tiki_room_audio.mp3"
speaker: media_player.ha_blue
media: /media/disney/tiki_room_audio.mp3
volume: .5
- id: tiki_room_off
alias: Tiki Room Off
@ -273,7 +279,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -288,7 +294,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/illuminations.mp3"
speaker: media_player.ha_blue
media: /media/disney/illuminations.mp3
volume: .5
- id: illuminations_off
alias: Illuminations Off
@ -299,7 +306,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -315,7 +322,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/Happily_Ever_After_Audio.mp3"
speaker: media_player.ha_blue
media: /media/disney/Happily_Ever_After_Audio.mp3
volume: .5
- id: happy_ever_after_show_off
alias: Happy Ever After Show Off
@ -326,7 +334,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -341,7 +349,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/holidaywishes.mp3"
speaker: media_player.ha_blue
media: /media/disney/holidaywishes.mp3
volume: .5
- id: holiday_wishes_show_off
@ -353,7 +362,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
- service: script.turn_off
@ -383,7 +392,7 @@ automation:
initial_state: true
trigger:
- platform: state
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
to: 'playing'
condition:
- condition: state
@ -406,8 +415,9 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/spaceship_earth_ride.mp3"
volume: .6
speaker: media_player.ha_blue
media: /media/disney/spaceship_earth_ride.mp3
volume: .4
- id: spaceship_earth_off
alias: Spaceship Earth Off
initial_state: true
@ -417,7 +427,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -432,7 +442,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/boo_to_you_audio.mp3"
speaker: media_player.ha_blue
media: /media/disney/boo_to_you_audio.mp3
volume: .5
- id: boo_to_you_show_off
alias: Boo To You Show Off
@ -443,7 +454,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -458,7 +469,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/holidaywishes.mp3"
speaker: media_player.ha_blue
media: /media/disney/holidaywishes.mp3
volume: .5
- id: holiday_wishes_off
@ -470,7 +482,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -485,12 +497,13 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/ML_Welcome_Show.mp3"
speaker: media_player.ha_blue
media: /media/disney/ML_Welcome_Show.mp3
volume: .5
- delay:
minutes: 8
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
- service: input_boolean.turn_off
@ -504,7 +517,7 @@ automation:
# to: 'off'
# action:
# - service: media_player.media_stop
# entity_id: media_player.ha_speaker
# entity_id: media_player.ha_blue
# - service: script.turn_off
# entity_id: script.youtube_audio
@ -519,6 +532,7 @@ automation:
action:
- service: script.youtube_audio
data_template:
speaker: media_player.ha_blue
media: "https://www.youtube.com/watch?v=Ki-dZlHtdBk"
volume: .5
- id: trolly_audio_show_off
@ -530,7 +544,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -545,7 +559,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/Pandora_Area_Loop.mp3"
speaker: media_player.ha_blue
media: /media/disney/Pandora_Area_Loop.mp3
volume: .4
- id: pandora_audio_off
alias: Pandora Audio Off
@ -556,7 +571,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -572,7 +587,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/WDW_Resort_TV.mp3"
speaker: media_player.ha_blue
media: /media/disney/WDW_Resort_TV.mp3
volume: .4
- id: resort_room_audio_off
alias: Resort Room Off
@ -583,7 +599,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -599,7 +615,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/The_American_Adventure.mp3"
speaker: media_player.ha_blue
media: /media/disney/The_American_Adventure.mp3
volume: .7
- id: american_adventure_off
alias: American Adventure Off
@ -610,7 +627,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -625,7 +642,8 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/thelegendofsleepyhallow-readalong.mp3"
speaker: media_player.ha_blue
media: /media/disney/thelegendofsleepyhallow-readalong.mp3
volume: .4
- id: sleepy_hollow_readalong_off
alias: Sleepy Hollow Readalong Off
@ -636,7 +654,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -651,8 +669,9 @@ automation:
action:
- service: script.local_audio
data_template:
media: "http://192.168.7.40/move_it_shake_dance_audio.mp3"
volume: .6
speaker: media_player.ha_blue
media: /media/disney/move_it_shake_dance_audio.mp3
volume: .4
- id: move_dance_off
alias: Move It Shake It Off
initial_state: true
@ -662,7 +681,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -685,7 +704,7 @@ automation:
to: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
@ -760,7 +779,7 @@ script:
kill_this_ride:
sequence:
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.youtube_audio
- service: script.turn_off
@ -777,11 +796,11 @@ script:
entity_id: sensor.family_status
state: Home
- service: media_player.turn_on
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: media_player.play_media
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
data:
media_content_id: http://192.168.7.40/wishes_5_min.mp3
media_content_id: /media/disney/wishes_5_min.mp3
media_content_type: "music"
- delay: 00:03:00
- service: scene.turn_on
@ -858,10 +877,10 @@ script:
entity_id: sensor.family_status
state: Home
- service: media_player.turn_on
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.youtube_audio
data_template:
media: "http://192.168.7.40/haunted_guest_welcome.mp3"
media: /media/disney/haunted_guest_welcome.mp3
volume: .5
# Random Disney Park Music
@ -869,6 +888,7 @@ script:
sequence:
- service: script.youtube_audio
data_template:
speaker: media_player.ha_blue
volume: .4
media: >
{{- ["http://192.168.7.40/Liberty_square_audio.mp3",
@ -893,6 +913,7 @@ script:
sequence:
- service: script.youtube_audio
data_template:
speaker: media_player.ha_blue
volume: .4
media: >
{{- [

View File

@ -75,8 +75,8 @@ automation:
at: input_datetime.halloween_show
action:
- service: input_boolean.turn_on
entity_id: input_boolean.this_is_halloween
- delay: '01:00:00'
entity_id: input_boolean.this_is_halloween
- delay: '02:00:00'
- service: input_boolean.turn_off
entity_id: input_boolean.this_is_halloween
@ -105,6 +105,12 @@ automation:
- condition: trigger
id: start
sequence:
- service: script.local_audio
data:
media: "/media/haunted_sounds/This_is_Halloween.mp3"
volume: .5
speaker: 'media_player.ha_blue'
- delay: '00:04:00'
- service: script.turn_on
target:
entity_id: script.haunted_house
@ -191,7 +197,7 @@ script:
'media_player.upstairs_speaker',
'media_player.master_bedroom_speaker',
'media_player.croft_speaker',
'media_player.ha_speaker',
'media_player.ha_blue',
'media_player.skylars_bedroom_speaker',
'media_player.theater'
] | random }}
@ -214,8 +220,8 @@ script:
] | random -}}
# Update this script with your local sounds.
# Each time this script is called it will play a random sound
#Update this script with your local sounds.
#Each time this script is called it will play a random sound
haunted_sounds:
sequence:
# Ensure that haunted sounds are allowed. Comment out if not needed.
@ -229,7 +235,7 @@ script:
'media_player.upstairs_speaker',
'media_player.master_bedroom_speaker',
'media_player.croft_speaker',
'media_player.ha_speaker',
'media_player.ha_blue',
'media_player.skylars_bedroom_speaker',
'media_player.theater'
] | random }}
@ -255,40 +261,40 @@ script:
"/media/haunted_sounds/Haunted-Vocals.mp3"
] | random -}}
haunted_sounds_git:
sequence:
# Ensure that haunted sounds are allowed. Comment out if not needed.
- condition: state
entity_id: input_boolean.haunted_sounds
state: 'on'
- service: script.youtube_audio # This script is in the audio.yaml in the packages folder.
data:
speaker: >
{{ ['media_player.kitchen_display',
'media_player.upstairs_speaker',
'media_player.master_bedroom_speaker',
'media_player.croft_speaker',
'media_player.ha_speaker',
'media_player.skylars_bedroom_speaker',
'media_player.theater'
] | random }}
volume: .5
# I try to ensure each of the following links is 60 seconds or less.
media: >
{{-[
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/EvilLaughCackle.mp3".
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/ChainsRattling.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/CreakingDoorSpooky.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Evil_Laugh_2.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Evillaugh.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-CatScream.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-DragonRoaring.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-Heart.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-ScaryScream.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-TollingBell.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Scary.mp3",
"https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/raven.mp3",
] | random -}}
# haunted_sounds_git:
# sequence:
# # Ensure that haunted sounds are allowed. Comment out if not needed.
# - condition: state
# entity_id: input_boolean.haunted_sounds
# state: 'on'
# - service: script.youtube_audio # This script is in the audio.yaml in the packages folder.
# data:
# speaker: >
# {{ ['media_player.kitchen_display',
# 'media_player.upstairs_speaker',
# 'media_player.master_bedroom_speaker',
# 'media_player.croft_speaker',
# 'media_player.ha_blue',
# 'media_player.skylars_bedroom_speaker',
# 'media_player.theater'
# ] | random }}
# volume: .5
# # I try to ensure each of the following links is 60 seconds or less.
# media: >
# {{ [
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/EvilLaughCackle.mp3'.
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/ChainsRattling.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/CreakingDoorSpooky.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Evil_Laugh_2.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Evillaugh.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-CatScream.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-DragonRoaring.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-Heart.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-ScaryScream.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Haunted-TollingBell.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/Scary.mp3',
# 'https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/media/haunted_sounds/raven.mp3'
# ] | random }}
################################
@ -300,7 +306,7 @@ script:
#
# - service: script.local_audio
# data:
# speaker: media_player.ha_speaker
# speaker: media_player.ha_blue
# volume: .5
# media: /media/local_audio.mp3
#
@ -347,40 +353,40 @@ script:
#
# - service: script.youtube_audio
# data:
# speaker: media_player.ha_speaker
# speaker: media_player.ha_blue
# volume: .5
# media: https://www.youtube.com/watch?v=pVeX4C9B1Lk
#
youtube_audio:
sequence:
# Ensure that audible notifications are allowed. Comment out if not needed.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
# Ensure the family is home. If you are using a group to track the family, or a person just update as needed. Comment out if not needed.
- condition: state
entity_id: sensor.family_status
state: Home
# Update the media player with the one you want to use
- service: media_player.turn_on
data:
entity_id: >
{{ speaker }}
# This sets the voume via a parameter when the script is called, and should be a value between .1 and 1.0
- service: media_player.volume_set
data:
entity_id: >
{{ speaker }}
volume_level: >
{{ volume }}
# This tells it to play the media and is set when the script is called.
- service: media_extractor.play_media
data:
entity_id: >
{{ speaker }}
media_content_type: video/youtube
media_content_id: >
{{ media }}
# youtube_audio:
# sequence:
# # Ensure that audible notifications are allowed. Comment out if not needed.
# - condition: state
# entity_id: input_boolean.audible_notifications
# state: 'on'
# # Ensure the family is home. If you are using a group to track the family, or a person just update as needed. Comment out if not needed.
# - condition: state
# entity_id: sensor.family_status
# state: Home
# # Update the media player with the one you want to use
# - service: media_player.turn_on
# data:
# entity_id: >
# {{ speaker }}
# # This sets the voume via a parameter when the script is called, and should be a value between .1 and 1.0
# - service: media_player.volume_set
# data:
# entity_id: >
# {{ speaker }}
# volume_level: >
# {{ volume }}
# # This tells it to play the media and is set when the script is called.
# - service: media_extractor.play_media
# data:
# entity_id: >
# {{ speaker }}
# media_content_type: video/youtube
# media_content_id: >
# {{ media }}
# sensor:
# # Halloween Countdown Sensor using Wolfram Alpha. See the note at the top for a link to how to set it up

View File

@ -35,7 +35,7 @@ automation:
action:
- service: script.kill_this_ride
- service: media_player.media_stop
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
- service: script.turn_off
entity_id: script.haunted_mansion_lights
@ -44,7 +44,7 @@ automation:
initial_state: true
trigger:
- platform: state
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
to: 'playing'
condition:
- condition: state
@ -66,13 +66,13 @@ script:
state: Home
- service: media_player.volume_set
data_template:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
volume_level: .6
- service: media_player.play_media
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
data:
#media_content_id: http://192.168.7.40/audio/haunted_mansion_preshow_full.mp3
media_content_id: http://192.168.7.40/audio/DL_Haunted_Mansion.mp3
media_content_id: /media/disney/DL_Haunted_Mansion.mp3
media_content_type: "music"
haunted_mansion_lights:

View File

@ -47,7 +47,7 @@ tts:
aws_secret_access_key: !secret aws_secret
region_name: 'us-east-1'
text_type: ssml
voice: Brian
voice: Matthew
cache: True
engine: neural
@ -349,10 +349,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -375,10 +375,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -423,10 +423,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -478,14 +478,14 @@ script:
{% elif who in ['kitchen_echo','livingroom_echo', 'garage_echo'] %}
script.alexa_voice
{% elif voice == 'jarvis' %}
{% if who == 'main' and is_state('media_player.ha_speaker','playing') %}
{% if who == 'main' and is_state('media_player.ha_blue','playing') %}
{% set who = 'livingroom_echo' %}
script.alexa_voice
{% else %}
script.jarvis_voice
{% endif %}
{% else %}
{% if who == 'main' and is_state('media_player.ha_speaker','playing') %}
{% if who == 'main' and is_state('media_player.ha_blue','playing') %}
{% set who = 'livingroom_echo' %}
script.alexa_voice
{% else %}
@ -504,7 +504,7 @@ script:
# Use this Simplfied Script by calling in automaint or script like:
# service: script.speech_engine_simplified
# data:
# who: media_player.ha_speaker
# who: media_player.ha_blue
# #who: “{{ states(sensor.room_presence) }}”
# #who: notify.kitchen_echo
# message: something to say
@ -574,9 +574,9 @@ script:
notify.alexa_media_kitchen_echo
{% elif who == 'garage_echo' %}
notify.alexa_media_garage_echo
{% elif who == 'livingroom_echo' and is_state('media_player.ha_speaker','playing') %}
{% set old_volume = states.media_player.ha_speaker.attributes.volume_level %}
media_player.ha_speaker
{% elif who == 'livingroom_echo' and is_state('media_player.ha_blue','playing') %}
{% set old_volume = states.media_player.ha_blue.attributes.volume_level %}
media_player.ha_blue
{% else %}
notify.alexa_media_living_room
{% endif %}
@ -629,10 +629,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -655,10 +655,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -666,7 +666,7 @@ script:
volume_level: >
{% if states.input_boolean.audible_notifications.state == 'on' %}
{% if who == 'master_bedroom' %}
.6
.5
{% elif who == 'theater' %}
{% if is_state('media_player.tv', 'on') %}
.3
@ -674,12 +674,12 @@ script:
.5
{% endif %}
{% elif who == 'main' %}
.8
.5
{% else %}
.6
.5
{% endif %}
{% else %}
.5
.3
{% endif %}
- service: tts.amazon_polly_say
data_template:
@ -699,10 +699,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -734,10 +734,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -760,19 +760,19 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
{% endif %}
volume_level: >
{% if states.input_boolean.audible_notifications.state == 'on' %}
.6
.5
{% else %}
.4
.3
{% endif %}
- service: tts.cloud_say
data_template:
@ -792,10 +792,10 @@ script:
{% elif who == 'all_google' %}
media_player.house
{% elif who == 'main' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
{% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.ha_speaker
media_player.ha_blue
{% else %}
media_player.house
{% endif %}
@ -811,26 +811,26 @@ script:
dim_main_volume:
sequence:
- condition: state
entity_id: 'media_player.ha_speaker'
entity_id: 'media_player.ha_blue'
state: 'playing'
- service: input_number.set_value
data_template:
entity_id: input_number.old_volume
value: >
{{ states.media_player.ha_speaker.attributes.volume_level }}
{{ states.media_player.ha_blue.attributes.volume_level }}
- service: media_player.volume_set
data_template:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
volume_level: .2
raise_main_volume:
sequence:
- condition: state
entity_id: 'media_player.ha_speaker'
entity_id: 'media_player.ha_blue'
state: 'playing'
- service: media_player.volume_set
data_template:
entity_id: media_player.ha_speaker
entity_id: media_player.ha_blue
volume_level: >
{{ states.input_number.old_volume.state }}
@ -1212,7 +1212,7 @@ script:
'Can a human be so kind and close it?',
'The air quality in this house has actually improved.',
'Closing the door would improve the security of the house.',
'Hey. The door was just opened and this is crazy. But now you know. So close it maybe.'
'Hey. The door was just opened and this is crazy. But now you know. So. Close it maybe.'
] | random }}
{%- endmacro -%}