From de06ca1b017f71d4daab8f6d83ad535e9f77b80d Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 24 Jul 2019 14:09:46 -0400 Subject: [PATCH] Moving back to audio output on Pi for announcements due to a chromecast issue. --- automations.yaml | 2 +- packages/disney.yaml | 54 ++++++------- packages/notify.yaml | 16 ++-- packages/presence.yaml | 129 +++++++++++++++++++------------ packages/security.yaml | 8 +- packages/weather_alerts_nws.yaml | 8 +- 6 files changed, 124 insertions(+), 93 deletions(-) diff --git a/automations.yaml b/automations.yaml index 229be72..5c8408a 100755 --- a/automations.yaml +++ b/automations.yaml @@ -47,7 +47,7 @@ alias: Turn Off Disney trigger: - platform: state - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker from: playing to: idle action: diff --git a/packages/disney.yaml b/packages/disney.yaml index a6655a8..3bac5a6 100755 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -57,7 +57,7 @@ automation: to: 'off' action: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - service: script.turn_on entity_id: script.kill_this_ride - id: illuminations_on @@ -113,7 +113,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: happy_ever_after_on alias: Happy Ever After On initial_state: true @@ -135,7 +135,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: haunted_mansion_on alias: Haunted Mansion On initial_state: true @@ -156,7 +156,7 @@ automation: action: - service: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: spaceship_earth_on alias: Spaceship Earth On initial_state: true @@ -178,7 +178,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: boo_to_you_show_on alias: Boo To You Show On initial_state: true @@ -200,7 +200,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: boo_to_you_on alias: Boo To You On initial_state: true @@ -222,7 +222,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: holiday_wisher_on alias: Holiday Wishes On initial_state: true @@ -244,7 +244,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker script: kill_hurry_back: @@ -303,10 +303,10 @@ script: #- service: shell_command.haunted_mansion_preshow_full - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 media_content_type: "music" @@ -358,7 +358,7 @@ script: kill_this_ride: sequence: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - service: shell_command.alarm_off - service: script.turn_off data: @@ -410,10 +410,10 @@ script: #- service: shell_command.dance_it - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/move_it_shake_dance_audio.mp3 media_content_type: "music" @@ -428,10 +428,10 @@ script: #- service: shell_command.spaceship_earth_ride - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: media/audio/spaceship_earth_ride.mp3 media_content_type: "music" @@ -482,10 +482,10 @@ script: #- service: shell_command.welcome_show_crowd - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/welcome_show_crowd.mp3 media_content_type: "music" @@ -509,7 +509,7 @@ script: state: Home #- service: shell_command.holiday_wishes - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/wishes_5_min.mp3 media_content_type: "music" @@ -523,7 +523,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -537,7 +537,7 @@ script: state: Home #- service: shell_command.happily_ever_after - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -551,7 +551,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -566,10 +566,10 @@ script: #- service: shell_command.tiki_room_audio - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .9 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/tiki_room_audio.mp3 media_content_type: "music" @@ -584,10 +584,10 @@ script: #- service: shell_command.happily_ever_after - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -637,10 +637,10 @@ script: #- service: shell_command.illuminations_audio - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/illuminations.mp3 media_content_type: "music" diff --git a/packages/notify.yaml b/packages/notify.yaml index d55f6d1..798ffee 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -173,7 +173,7 @@ script: state: 'off' - service: tts.google_translate_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: > {{ message }} @@ -181,7 +181,7 @@ script: sequence: - service: tts.amazon_polly_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: >- {{ message }} @@ -207,11 +207,11 @@ script: entity_id: input_boolean.vacation_mode state: 'off' - condition: state - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker state: 'idle' - service: tts.google_translate_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: > {{message }} @@ -231,18 +231,18 @@ script: entity_id: input_boolean.vacation_mode state: 'off' - service: media_player.turn_on - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - wait_template: >- - {{ not is_state('media_player.guest_tv', 'playing') }} + {{ not is_state('media_player.hass_speaker', 'playing') }} - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .65 - service: tts.amazon_polly_say data_template: entity_id: > {% 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 %} media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker {% endif %} diff --git a/packages/presence.yaml b/packages/presence.yaml index bc993c1..b90b264 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -12,7 +12,7 @@ sensor: friendly_name: "Jeff's Current Location" unit_of_measurement: '' 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 %} Flue Network {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} @@ -20,22 +20,22 @@ sensor: {% else %} Lost {%- endif %} - {% elif is_state('device_tracker.jeffreystonesiphone', 'Sprouts') %} + {% elif is_state('person.jeffrey', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger1') %} + {% elif is_state('person.jeffrey', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger2') %} + {% elif is_state('person.jeffrey', 'Kroger2') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Home Depot') %} + {% elif is_state('person.jeffrey', 'Home Depot') %} Home Improvement Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Lowes') %} + {% elif is_state('person.jeffrey', 'Lowes') %} Home Improvement Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Walmart') %} + {% elif is_state('person.jeffrey', 'Walmart') %} Super Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Target') %} + {% elif is_state('person.jeffrey', 'Target') %} Super Store {% else %} - {{ states.device_tracker.jeffreystonesiphone.state }} + {{ states.person.jeffrey.state }} {%- endif %} jeff_driving: friendly_name: "Jeff' Driving" @@ -54,7 +54,7 @@ sensor: friendly_name: "Skylar's Current Location" unit_of_measurement: '' 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 {% else %} Mortal Peril @@ -65,7 +65,7 @@ sensor: friendly_name: "Kat's Current Location" unit_of_measurement: '' 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 %} Flue Network {% elif states.device_tracker.life360_kat_stone.attributes.driving == True %} @@ -73,22 +73,22 @@ sensor: {% else %} Lost {%- endif %} - {% elif is_state('device_tracker.katherinestonesiphone', 'Sprouts') %} + {% elif is_state('person.katherine', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger1') %} + {% elif is_state('person.katherine', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger2') %} + {% elif is_state('person.katherine', 'Kroger2') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Home Depot') %} + {% elif is_state('person.katherine', 'Home Depot') %} Home Improvement Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Lowes') %} + {% elif is_state('person.katherine', 'Lowes') %} Home Improvement Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Walmart') %} + {% elif is_state('person.katherine', 'Walmart') %} Super Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Target') %} + {% elif is_state('person.katherine', 'Target') %} Super Store {% else %} - {{ states.device_tracker.katherinestonesiphone.state }} + {{ states.person.katherine.state }} {%- endif %} - platform: template sensors: @@ -140,7 +140,7 @@ automation: - platform: zone event: enter zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone + entity_id: person.katherine action: - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor @@ -156,7 +156,7 @@ automation: - platform: zone event: leave zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone + entity_id: person.katherine condition: action: - service: input_boolean.turn_on @@ -187,23 +187,11 @@ automation: from: Away platform: state to: Home - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.home - - entity_id: device_tracker.katherinestonesiphone - 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 + - entity_id: person.katherine event: enter platform: zone zone: zone.home @@ -243,7 +231,7 @@ automation: alias: Jeff is Home initial_state: true trigger: - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.home @@ -257,11 +245,7 @@ automation: - id: jeff_arrives_summit alias: Jeff Arrives At Summit trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.summit - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.summit @@ -275,11 +259,7 @@ automation: - id: jeff_arrives_summit_notification alias: Notify Kat Jeff At Summit trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.summit - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.summit @@ -291,7 +271,7 @@ automation: alias: Jeff Leaves Summit initial_state: true trigger: - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: leave platform: zone zone: zone.summit @@ -303,10 +283,6 @@ automation: alias: Kat is Home initial_state: true trigger: - - entity_id: device_tracker.katherinestonesiphone - event: enter - platform: zone - zone: zone.home - entity_id: person.katherine event: enter platform: zone @@ -343,3 +319,54 @@ automation: {{greeting_sentence(person)}} 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 \ No newline at end of file diff --git a/packages/security.yaml b/packages/security.yaml index d8daaa3..cac2240 100755 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -347,10 +347,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # state: 'idle' # - service: tts.google_say - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # data_template: # message: "Sentry mode activated" @@ -360,10 +360,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # state: 'idle' # - service: tts.google_say - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # data_template: # message: "Sentry mode deactivated" diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index 54b40d1..3ed4189 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -200,7 +200,7 @@ automation: to: 'on' action: - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Tornado_Siren.mp3 media_content_type: "music" @@ -215,7 +215,7 @@ automation: action: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker script: @@ -237,3 +237,7 @@ script: notification_id: "nwswxalert" message: "{{ message }}" title: '{{ title }}' + + tornado_alarm: + sequence: + - service: shell_command.tornado_alarm \ No newline at end of file