Moving back to audio output on Pi for announcements due to a chromecast issue.

This commit is contained in:
Jeffrey Stone 2019-07-24 14:09:46 -04:00
parent ad2bcdd739
commit 0eeef2730f
6 changed files with 124 additions and 93 deletions

View File

@ -47,7 +47,7 @@
alias: Turn Off Disney alias: Turn Off Disney
trigger: trigger:
- platform: state - platform: state
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
from: playing from: playing
to: idle to: idle
action: action:

View File

@ -57,7 +57,7 @@ automation:
to: 'off' to: 'off'
action: action:
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- id: illuminations_on - id: illuminations_on
@ -113,7 +113,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: happy_ever_after_on - id: happy_ever_after_on
alias: Happy Ever After On alias: Happy Ever After On
initial_state: true initial_state: true
@ -135,7 +135,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: haunted_mansion_on - id: haunted_mansion_on
alias: Haunted Mansion On alias: Haunted Mansion On
initial_state: true initial_state: true
@ -156,7 +156,7 @@ automation:
action: action:
- service: script.kill_this_ride - service: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: spaceship_earth_on - id: spaceship_earth_on
alias: Spaceship Earth On alias: Spaceship Earth On
initial_state: true initial_state: true
@ -178,7 +178,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: boo_to_you_show_on - id: boo_to_you_show_on
alias: Boo To You Show On alias: Boo To You Show On
initial_state: true initial_state: true
@ -200,7 +200,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: boo_to_you_on - id: boo_to_you_on
alias: Boo To You On alias: Boo To You On
initial_state: true initial_state: true
@ -222,7 +222,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- id: holiday_wisher_on - id: holiday_wisher_on
alias: Holiday Wishes On alias: Holiday Wishes On
initial_state: true initial_state: true
@ -244,7 +244,7 @@ automation:
- service: script.turn_on - service: script.turn_on
entity_id: script.kill_this_ride entity_id: script.kill_this_ride
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
script: script:
kill_hurry_back: kill_hurry_back:
@ -303,10 +303,10 @@ script:
#- service: shell_command.haunted_mansion_preshow_full #- service: shell_command.haunted_mansion_preshow_full
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 media_content_id: /media/audio/haunted_mansion_preshow_full.mp3
media_content_type: "music" media_content_type: "music"
@ -358,7 +358,7 @@ script:
kill_this_ride: kill_this_ride:
sequence: sequence:
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- service: shell_command.alarm_off - service: shell_command.alarm_off
- service: script.turn_off - service: script.turn_off
data: data:
@ -410,10 +410,10 @@ script:
#- service: shell_command.dance_it #- service: shell_command.dance_it
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/move_it_shake_dance_audio.mp3 media_content_id: /media/audio/move_it_shake_dance_audio.mp3
media_content_type: "music" media_content_type: "music"
@ -428,10 +428,10 @@ script:
#- service: shell_command.spaceship_earth_ride #- service: shell_command.spaceship_earth_ride
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: media/audio/spaceship_earth_ride.mp3 media_content_id: media/audio/spaceship_earth_ride.mp3
media_content_type: "music" media_content_type: "music"
@ -482,10 +482,10 @@ script:
#- service: shell_command.welcome_show_crowd #- service: shell_command.welcome_show_crowd
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/welcome_show_crowd.mp3 media_content_id: /media/audio/welcome_show_crowd.mp3
media_content_type: "music" media_content_type: "music"
@ -509,7 +509,7 @@ script:
state: Home state: Home
#- service: shell_command.holiday_wishes #- service: shell_command.holiday_wishes
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/wishes_5_min.mp3 media_content_id: /media/audio/wishes_5_min.mp3
media_content_type: "music" media_content_type: "music"
@ -523,7 +523,7 @@ script:
state: Home state: Home
#- service: shell_command.boo_to_you #- service: shell_command.boo_to_you
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_id: /media/audio/boo_to_you_audio.mp3
media_content_type: "music" media_content_type: "music"
@ -537,7 +537,7 @@ script:
state: Home state: Home
#- service: shell_command.happily_ever_after #- service: shell_command.happily_ever_after
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_id: /media/audio/Happily_Ever_After_Audio.mp3
media_content_type: "music" media_content_type: "music"
@ -551,7 +551,7 @@ script:
state: Home state: Home
#- service: shell_command.boo_to_you #- service: shell_command.boo_to_you
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_id: /media/audio/boo_to_you_audio.mp3
media_content_type: "music" media_content_type: "music"
@ -566,10 +566,10 @@ script:
#- service: shell_command.tiki_room_audio #- service: shell_command.tiki_room_audio
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .9 volume_level: .9
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/tiki_room_audio.mp3 media_content_id: /media/audio/tiki_room_audio.mp3
media_content_type: "music" media_content_type: "music"
@ -584,10 +584,10 @@ script:
#- service: shell_command.happily_ever_after #- service: shell_command.happily_ever_after
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_id: /media/audio/Happily_Ever_After_Audio.mp3
media_content_type: "music" media_content_type: "music"
@ -637,10 +637,10 @@ script:
#- service: shell_command.illuminations_audio #- service: shell_command.illuminations_audio
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .7 volume_level: .7
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/illuminations.mp3 media_content_id: /media/audio/illuminations.mp3
media_content_type: "music" media_content_type: "music"

View File

@ -173,7 +173,7 @@ script:
state: 'off' state: 'off'
- service: tts.google_translate_say - service: tts.google_translate_say
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
message: > message: >
{{ message }} {{ message }}
@ -181,7 +181,7 @@ script:
sequence: sequence:
- service: tts.amazon_polly_say - service: tts.amazon_polly_say
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
message: >- message: >-
<speak> <speak>
{{ message }} {{ message }}
@ -207,11 +207,11 @@ script:
entity_id: input_boolean.vacation_mode entity_id: input_boolean.vacation_mode
state: 'off' state: 'off'
- condition: state - condition: state
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
state: 'idle' state: 'idle'
- service: tts.google_translate_say - service: tts.google_translate_say
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
message: > message: >
{{message }} {{message }}
@ -231,18 +231,18 @@ script:
entity_id: input_boolean.vacation_mode entity_id: input_boolean.vacation_mode
state: 'off' state: 'off'
- service: media_player.turn_on - service: media_player.turn_on
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
- wait_template: >- - wait_template: >-
{{ not is_state('media_player.guest_tv', 'playing') }} {{ not is_state('media_player.hass_speaker', 'playing') }}
- service: media_player.volume_set - service: media_player.volume_set
data_template: data_template:
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
volume_level: .65 volume_level: .65
- service: tts.amazon_polly_say - service: tts.amazon_polly_say
data_template: data_template:
entity_id: > entity_id: >
{% if states.input_boolean.audible_notifications.state == 'on' %} {% if states.input_boolean.audible_notifications.state == 'on' %}
media_player.guest_tv, media_player.googlehome0715, media_player.googlehomehub3492 media_player.hass_speaker, media_player.googlehome0715, media_player.googlehomehub3492
{% else %} {% else %}
media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker
{% endif %} {% endif %}

View File

@ -12,7 +12,7 @@ sensor:
friendly_name: "Jeff's Current Location" friendly_name: "Jeff's Current Location"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{%- if is_state('device_tracker.jeffreystonesiphone', 'not_home') %} {%- if is_state('person.jeffrey', 'not_home') %}
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
Flue Network Flue Network
{%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
@ -20,22 +20,22 @@ sensor:
{% else %} {% else %}
Lost Lost
{%- endif %} {%- endif %}
{% elif is_state('device_tracker.jeffreystonesiphone', 'Sprouts') %} {% elif is_state('person.jeffrey', 'Sprouts') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger1') %} {% elif is_state('person.jeffrey', 'Kroger1') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger2') %} {% elif is_state('person.jeffrey', 'Kroger2') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Home Depot') %} {% elif is_state('person.jeffrey', 'Home Depot') %}
Home Improvement Store Home Improvement Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Lowes') %} {% elif is_state('person.jeffrey', 'Lowes') %}
Home Improvement Store Home Improvement Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Walmart') %} {% elif is_state('person.jeffrey', 'Walmart') %}
Super Store Super Store
{% elif is_state('device_tracker.jeffreystonesiphone', 'Target') %} {% elif is_state('person.jeffrey', 'Target') %}
Super Store Super Store
{% else %} {% else %}
{{ states.device_tracker.jeffreystonesiphone.state }} {{ states.person.jeffrey.state }}
{%- endif %} {%- endif %}
jeff_driving: jeff_driving:
friendly_name: "Jeff' Driving" friendly_name: "Jeff' Driving"
@ -54,7 +54,7 @@ sensor:
friendly_name: "Skylar's Current Location" friendly_name: "Skylar's Current Location"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{%- if is_state('device_tracker.jeffreystonesiphone', 'home') and is_state('device_tracker.katherinestonesiphone', 'home')%} {%- if is_state('person.jeffrey', 'home') and is_state('person.jeffrey', 'home')%}
home home
{% else %} {% else %}
Mortal Peril Mortal Peril
@ -65,7 +65,7 @@ sensor:
friendly_name: "Kat's Current Location" friendly_name: "Kat's Current Location"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{%- if is_state('device_tracker.katherinestonesiphone', 'not_home') %} {%- if is_state('person.katherine', 'not_home') %}
{%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %}
Flue Network Flue Network
{% elif states.device_tracker.life360_kat_stone.attributes.driving == True %} {% elif states.device_tracker.life360_kat_stone.attributes.driving == True %}
@ -73,22 +73,22 @@ sensor:
{% else %} {% else %}
Lost Lost
{%- endif %} {%- endif %}
{% elif is_state('device_tracker.katherinestonesiphone', 'Sprouts') %} {% elif is_state('person.katherine', 'Sprouts') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Kroger1') %} {% elif is_state('person.katherine', 'Kroger1') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Kroger2') %} {% elif is_state('person.katherine', 'Kroger2') %}
Grocery Store Grocery Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Home Depot') %} {% elif is_state('person.katherine', 'Home Depot') %}
Home Improvement Store Home Improvement Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Lowes') %} {% elif is_state('person.katherine', 'Lowes') %}
Home Improvement Store Home Improvement Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Walmart') %} {% elif is_state('person.katherine', 'Walmart') %}
Super Store Super Store
{% elif is_state('device_tracker.katherinestonesiphone', 'Target') %} {% elif is_state('person.katherine', 'Target') %}
Super Store Super Store
{% else %} {% else %}
{{ states.device_tracker.katherinestonesiphone.state }} {{ states.person.katherine.state }}
{%- endif %} {%- endif %}
- platform: template - platform: template
sensors: sensors:
@ -140,7 +140,7 @@ automation:
- platform: zone - platform: zone
event: enter event: enter
zone: zone.zoo_atlanta zone: zone.zoo_atlanta
entity_id: device_tracker.katherinestonesiphone entity_id: person.katherine
action: action:
- service: input_boolean.turn_off - service: input_boolean.turn_off
entity_id: input_boolean.kat_travel_monitor entity_id: input_boolean.kat_travel_monitor
@ -156,7 +156,7 @@ automation:
- platform: zone - platform: zone
event: leave event: leave
zone: zone.zoo_atlanta zone: zone.zoo_atlanta
entity_id: device_tracker.katherinestonesiphone entity_id: person.katherine
condition: condition:
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
@ -187,23 +187,11 @@ automation:
from: Away from: Away
platform: state platform: state
to: Home to: Home
- entity_id: device_tracker.jeffreystonesiphone - entity_id: person.jeffrey
event: enter event: enter
platform: zone platform: zone
zone: zone.home zone: zone.home
- entity_id: device_tracker.katherinestonesiphone - entity_id: person.katherine
event: enter
platform: zone
zone: zone.home
- entity_id: binary_sensor.jeffrey_presence
from: 'Off'
platform: state
to: 'On'
- entity_id: binary_sensor.kat_presence
from: 'Off'
platform: state
to: 'On'
- entity_id: device_tracker.hass_jeffsiphone
event: enter event: enter
platform: zone platform: zone
zone: zone.home zone: zone.home
@ -243,7 +231,7 @@ automation:
alias: Jeff is Home alias: Jeff is Home
initial_state: true initial_state: true
trigger: trigger:
- entity_id: device_tracker.jeffreystonesiphone - entity_id: person.jeffrey
event: enter event: enter
platform: zone platform: zone
zone: zone.home zone: zone.home
@ -257,11 +245,7 @@ automation:
- id: jeff_arrives_summit - id: jeff_arrives_summit
alias: Jeff Arrives At Summit alias: Jeff Arrives At Summit
trigger: trigger:
- entity_id: device_tracker.jeffreystonesiphone - entity_id: person.jeffrey
event: enter
platform: zone
zone: zone.summit
- entity_id: device_tracker.hass_jeffsiphone
event: enter event: enter
platform: zone platform: zone
zone: zone.summit zone: zone.summit
@ -275,11 +259,7 @@ automation:
- id: jeff_arrives_summit_notification - id: jeff_arrives_summit_notification
alias: Notify Kat Jeff At Summit alias: Notify Kat Jeff At Summit
trigger: trigger:
- entity_id: device_tracker.jeffreystonesiphone - entity_id: person.jeffrey
event: enter
platform: zone
zone: zone.summit
- entity_id: device_tracker.hass_jeffsiphone
event: enter event: enter
platform: zone platform: zone
zone: zone.summit zone: zone.summit
@ -291,7 +271,7 @@ automation:
alias: Jeff Leaves Summit alias: Jeff Leaves Summit
initial_state: true initial_state: true
trigger: trigger:
- entity_id: device_tracker.jeffreystonesiphone - entity_id: person.jeffrey
event: leave event: leave
platform: zone platform: zone
zone: zone.summit zone: zone.summit
@ -303,10 +283,6 @@ automation:
alias: Kat is Home alias: Kat is Home
initial_state: true initial_state: true
trigger: trigger:
- entity_id: device_tracker.katherinestonesiphone
event: enter
platform: zone
zone: zone.home
- entity_id: person.katherine - entity_id: person.katherine
event: enter event: enter
platform: zone platform: zone
@ -343,3 +319,54 @@ automation:
{{greeting_sentence(person)}} {{greeting_sentence(person)}}
call_interuption: 1 call_interuption: 1
script:
jeff_destination_zoo:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: Zoo
retain: true
jeff_destination_summit:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: Summit
retain: true
jeff_destination_none:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: none
retain: true
jeff_destination_na:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: na
retain: true
jeff_destination_home:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: Home
retain: true
jeff_destination_harbins:
sequence:
- service: mqtt.publish
data:
topic: jeff/driving/destination
payload: Harbins
retain: true
kat_destination_na:
sequence:
- service: mqtt.publish
data:
topic: kat/driving/destination
payload: na
retain: true

View File

@ -347,10 +347,10 @@ script:
# entity_id: input_boolean.audible_notifications # entity_id: input_boolean.audible_notifications
# state: 'on' # state: 'on'
# - condition: state # - condition: state
# entity_id: media_player.guest_tv # entity_id: media_player.hass_speaker
# state: 'idle' # state: 'idle'
# - service: tts.google_say # - service: tts.google_say
# entity_id: media_player.guest_tv # entity_id: media_player.hass_speaker
# data_template: # data_template:
# message: "Sentry mode activated" # message: "Sentry mode activated"
@ -360,10 +360,10 @@ script:
# entity_id: input_boolean.audible_notifications # entity_id: input_boolean.audible_notifications
# state: 'on' # state: 'on'
# - condition: state # - condition: state
# entity_id: media_player.guest_tv # entity_id: media_player.hass_speaker
# state: 'idle' # state: 'idle'
# - service: tts.google_say # - service: tts.google_say
# entity_id: media_player.guest_tv # entity_id: media_player.hass_speaker
# data_template: # data_template:
# message: "Sentry mode deactivated" # message: "Sentry mode deactivated"

View File

@ -200,7 +200,7 @@ automation:
to: 'on' to: 'on'
action: action:
- service: media_player.play_media - service: media_player.play_media
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
data: data:
media_content_id: /media/audio/Tornado_Siren.mp3 media_content_id: /media/audio/Tornado_Siren.mp3
media_content_type: "music" media_content_type: "music"
@ -215,7 +215,7 @@ automation:
action: action:
- service: media_player.media_stop - service: media_player.media_stop
entity_id: media_player.guest_tv entity_id: media_player.hass_speaker
script: script:
@ -237,3 +237,7 @@ script:
notification_id: "nwswxalert" notification_id: "nwswxalert"
message: "{{ message }}" message: "{{ message }}"
title: '{{ title }}' title: '{{ title }}'
tornado_alarm:
sequence:
- service: shell_command.tornado_alarm