From: Giorgio Ravera Date: Sat, 2 May 2020 17:58:32 +0000 (+0200) Subject: fixed configuration (discovery), added person customization, fixed speech and template X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=a427c942edd474f13b6ca33ebca91c2f58c0ab9c;p=homeassistant.git fixed configuration (discovery), added person customization, fixed speech and template --- diff --git a/automation/speech.yaml b/automation/speech.yaml index e6cb403a..af98e57b 100644 --- a/automation/speech.yaml +++ b/automation/speech.yaml @@ -67,29 +67,7 @@ - service: script.speech_engine data_template: - language: 'it' - message: >- - {% set name = state_attr(trigger.entity_id, 'friendly_name') %} - {%- macro greeting_sentence(name) -%} - {{ [ - "Ciao " ~ name + " è un piacere rivederti a casa", - "Finalmente a casa " ~ name + "!", - "Indovina chi è a casa? " ~ name + "!", - name + " è ora a casa!", - "Che bello! " ~ name + " è a casa", - name + " sei a casa!", - "Il sistema di domotica Casa Ravera-Testa notifica che " ~ name + " è a casa!", - "Annuncio: " ~ name + " è ora a casa!", - "Rilevo una presenza! " ~ name + " è a casa!", - "Ciao " ~ name + " che la forza sia con te", - "Sento un tremito nella forza! " ~ name + " è a casa", - "Sento un interferenza nella Forza! " ~ name + " è qui", - "Menomale che sei qui " ~ name + "! Mi sentivo solo", - "Menomale che sei qui " ~ name + "! La casa è vuota senza di te!", - "Ciao " ~ name + "! Casa è sempre la casa!" - ] | random }} - {%- endmacro -%} - {{ greeting_sentence(name) }} + message: !include ../templates/welcome_message.yaml enable_greeting: 0 ###################################################################### diff --git a/configuration.yaml b/configuration.yaml index 6ff24159..fc9ad8ac 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -54,9 +54,8 @@ updater: # Discover some devices automatically discovery: - ignore: - - roku -# - google_cast +# ignore: +# - roku # Allows you to issue voice commands from the frontend in enabled browsers #conversation: diff --git a/customizations/person.yaml b/customizations/person.yaml new file mode 100644 index 00000000..3982a1ab --- /dev/null +++ b/customizations/person.yaml @@ -0,0 +1,15 @@ +###################################################################### +# Customization: Person +###################################################################### + +person.giorgio: + entity_picture: "https://lh5.googleusercontent.com/-XA71SeQatCE/AAAAAAAAAAI/AAAAAAABf8U/EWQJ3bwMgK8/photo.jpg" + +person.laura: + entity_picture: "https://lh4.googleusercontent.com/-MzGTo7hJlzQ/AAAAAAAAAAI/AAAAAAAAHBg/enCMtB-4rrs/photo.jpg" + +person.anna: + entity_picture: "https://lh3.googleusercontent.com/-jKAuS0EKCo0/AAAAAAAAAAI/AAAAAAAAIz4/Edk7vyRSPc4/photo.jpg" + +person.assunta: + entity_picture: "https://lh6.googleusercontent.com/-4VDO1evGw1U/AAAAAAAAAAI/AAAAAAAAAC4/5BymNaSNWcc/photo.jpg" diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index 9d4413f2..3c557650 100644 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -22,7 +22,6 @@ speech_engine: data_template: media_player: "{{ media_player }}" volume_level: "{{ volume_level }}" - language: "{{ language }}" message: !include ../templates/speech_message.yaml ###################################################################### @@ -52,6 +51,5 @@ speech_consumption: sequence: - service: script.speech_engine data_template: - language: 'it' message: >- "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt"