First attempt at rewriting Jarvis for my needs

This commit is contained in:
2022-06-30 04:26:19 -04:00
parent f599539c95
commit b0958fc908
3 changed files with 37 additions and 58 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,6 +12,15 @@ input_boolean:
name: House Party Switch name: House Party Switch
icon: mdi:party-popper icon: mdi:party-popper
input_select:
jarvis_voice:
name: Jarvis voice
options:
- Brian
- Emma
- Joanna
initial: Brian
# automation: # automation:
# - id: house_party_protocol_on # - id: house_party_protocol_on
# alias: Turn On House Party Protocol # alias: Turn On House Party Protocol

View File

@ -488,6 +488,7 @@ script:
who: '{{ who }}' who: '{{ who }}'
message: > message: >
{{ message }} {{ message }}
voice: "{{ states('input_select.jarvis_voice') }}"
- service: >- - service: >-
{% if who in ['Everywhere','everywhere'] %} {% if who in ['Everywhere','everywhere'] %}
{% set who = 'everywhere' %} {% set who = 'everywhere' %}
@ -563,63 +564,32 @@ script:
# Called wheh notification needs to play on echos # Called wheh notification needs to play on echos
alexa_voice: alexa_voice:
sequence: sequence:
# - service: media_player.turn_on - service: notify.alexa_media
# data_template: data:
# entity_id: >- message: >
# {% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %} <voice name="{{ voice }}"
# media_player.living_room_echo_dot <amazon:auto-breaths>
# {% elif who in ['master_bedroom','master_bedroom_echo_dot'] %} <prosody rate="fast">
# media_player.master_bedroom_echo_dot {{ message }}
# {% elif who in ['basement','basement_echo_dot'] %} </prosody>
# media_player.basement_echo_dot </amazon:auto-breaths>
# {% elif who in ['Everywhere','everywhere'] %} </voice>
# - media_player.basement_echo_dot target: >
# - media_player.living_room_echo_dot {% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
# - media_player.master_bedroom_echo_dot media_player.living_room_echo_dot
# {% else %} {% elif who in ['master_bedroom','master_bedroom_echo_dot'] %}
# media_player.living_room_echo_dot media_player.master_bedroom_echo_dot
# {% endif %} {% elif who in ['basement','basement_echo_dot'] %}
# - service: media_player.volume_set media_player.basement_echo_dot
# data_template: {% elif who in ['common'] %}
# entity_id: >- media_player.common_areas
# {% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %} {% elif who in ['Everywhere','everywhere'] %}
# media_player.living_room_echo_dot media_player.alexa_everywhere
# {% elif who in ['master_bedroom','master_bedroom_echo_dot'] %} {% else %}
# media_player.master_bedroom_echo_dot media_player.living_room_echo_dot
# {% elif who in ['basement','basement_echo_dot'] %} {% endif %}
# media_player.basement_echo_dot data:
# {% elif who in ['Everywhere','everywhere'] %} type: tts
# - media_player.basement_echo_dot
# - media_player.living_room_echo_dot
# - media_player.master_bedroom_echo_dot
# {% else %}
# media_player.living_room_echo_dot
# {% endif %}
# volume_level: >-
# {% if is_state('input_boolean.audible_notifications.state','on') %}
# .7
# {% else %}
# .3
# {% endif %}
- service: >-
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
notify.alexa_media_living_room_echo_dot
{% elif who in ['master_bedroom','master_bedroom_echo_dot'] %}
notify.alexa_media_master_bedroom_echo_dot
{% elif who in ['basement','basement_echo_dot'] %}
notify.alexa_media_basement_echo_dot
{% elif who in ['common'] %}
notify.alexa_common_areas
{% elif who in ['Everywhere','everywhere'] %}
notify.alexa_everywhere
{% else %}
notify.alexa_media_living_room_echo_dot
{% endif %}
data:
message: >
{{ message }}
data:
type: tts
# Default audible notifications. Notifcations play on the google devices. # Default audible notifications. Notifcations play on the google devices.
jarvis_voice: jarvis_voice: