Changing house party protocol interactions

This commit is contained in:
Jeffrey Stone 2022-02-24 23:21:18 -05:00
parent b69726af0f
commit 1f3177e355
1 changed files with 50 additions and 102 deletions

View File

@ -9,124 +9,72 @@ input_boolean:
house_party_protocol_switch: house_party_protocol_switch:
name: House Party Switch name: House Party Switch
automation: # automation:
- id: house_party_protocol_on # - id: house_party_protocol_on
alias: Turn On House Party Protocol # alias: Turn On House Party Protocol
initial_state: true # initial_state: true
trigger: # trigger:
- platform: state # - platform: state
entity_id: input_boolean.house_party_protocol_switch # entity_id: input_boolean.house_party_protocol_switch
to: 'on' # to: 'on'
action: # action:
- service: homeassistant.turn_on # - delay: 00:00:05
entity_id: group.incense # - service: homeassistant.turn_on
- delay: 00:00:05 # entity_id: group.incense
- service: script.status_annc # - service: script.status_annc
data_template: # data_template:
who: '{{ states.sensor.room_presence.state }}' # who: '{{ states.sensor.room_presence.state }}'
call_house_party_protocol_enabled: 1 # call_house_party_protocol_enabled: 1
- id: house_party_protocol_off # - id: house_party_protocol_off
alias: Turn Off House Party Protocol # alias: Turn Off House Party Protocol
initial_state: true # initial_state: true
trigger: # trigger:
- platform: state # - platform: state
entity_id: input_boolean.house_party_protocol_switch # entity_id: input_boolean.house_party_protocol_switch
to: 'off' # to: 'off'
action: # action:
- service: homeassistant.turn_off # - delay: 00:00:05
entity_id: group.incense # - service: homeassistant.turn_off
- delay: 00:00:05 # entity_id: group.incense
- service: script.status_annc # - service: script.status_annc
data_template: # data_template:
who: '{{ states.sensor.room_presence.state }}' # who: '{{ states.sensor.room_presence.state }}'
call_house_party_protocol_disabled: 1 # call_house_party_protocol_disabled: 1
script: script:
house_party_protocol_on:
# To Use:
# service: script.amp_voice
# Data
# who: media_player_ha_speaker
# #who: “{{ states(sensor.room_presence) }}”
# message: something to say
#
amp_voice:
sequence: sequence:
- service: media_player.turn_on - delay: 00:00:05
data_template: - service: homeassistant.turn_on
entity_id: > entity_id: group.incense
{{ who }} - service: script.status_annc
- service: script.dim_main_volume data_template:
- service: media_player.volume_set who: '{{ states.sensor.room_presence.state }}'
data_template: call_house_party_protocol_enabled: 1
entity_id: >
{{ who }}
volume_level: >
{% if is_state('input_boolean.audible_notifications.state','on') %}
.6
{% else %}
.4
{% endif %}
- service: >
{{ who }}
data:
message: >
{{ message }}
data:
type: tts
- delay: 00:00:20
- service: script.raise_main_volume
house_party_protocol_off:
# To Use:
# service: script.polly_voice
# Data
# who: media_player_ha_speaker
# #who: “{{ states(sensor.room_presence) }}”
# message: something to say
#
polly_voice:
sequence: sequence:
- service: media_player.turn_on - delay: 00:00:05
data_template: - service: homeassistant.turn_off
entity_id: > entity_id: group.incense
{{ who }} - service: script.status_annc
- service: media_player.volume_set data_template:
data_template: who: '{{ states.sensor.room_presence.state }}'
entity_id: > call_house_party_protocol_disabled: 1
{{ who }}
volume_level: >
{% if states.input_boolean.audible_notifications.state == 'on' %}
.7
{% else %}
.4
{% endif %}
- service: tts.amazon_polly_say
data_template:
entity_id: >
{{ who }}
message: >-
<speak>
<break time="1s"/>
{{ message }}
</speak>
cache: true
alexa_interjection: alexa_interjection:
sequence: sequence:
- service: script.status_annc - service: script.status_annc
data: data:
who: '{{ states.sensor.alexa_audio.state}}' who: "{{ states('sensor.last_alexa')}}"
call_interuption: 1 call_confirmation: 1
google_interjection: google_interjection:
sequence: sequence:
- service: script.status_annc - service: script.status_annc
data: data:
who: '{{ states.sensor.room_audio.state }}' who: '{{ states.sensor.room_audio.state }}'
call_interuption: 1 call_confirmation: 1