]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added input text for google home at anna apartment
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Sun, 13 Aug 2023 18:33:48 +0000 (20:33 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Sun, 13 Aug 2023 18:33:48 +0000 (20:33 +0200)
.storage/lovelace.lovelace_multimedia
automations/media_player.yaml
input_text/media_player.yaml

index 75c3cf06871dac8d845ee82ccbaf1d0ad170836a..47ed2a8d98a94b342a964e2c50b921ee5985f5c6 100644 (file)
                 },
                 {
                   "entities": [
-                    "media_player.google_home",
-                    "input_text.google_home_speak"
+                    {
+                      "entity": "media_player.google_home"
+                    },
+                    {
+                      "entity": "input_text.google_home_speak"
+                    }
                   ],
                   "show_header_toggle": false,
                   "title": "Google Nest Mini Cucina",
                 {
                   "cards": [
                     {
+                      "show_name": true,
+                      "show_icon": true,
                       "entity": "script.laura_voice",
                       "icon": "mdi:numeric-1",
                       "name": "Bell'Affare",
                 {
                   "cards": [
                     {
+                      "show_name": true,
+                      "show_icon": true,
                       "entity": "script.laura_voice",
                       "icon": "mdi:numeric-4",
                       "name": "Che Schifo รจ?",
                   "entities": [
                     {
                       "entity": "media_player.google_anna"
+                    },
+                    {
+                      "entity": "input_text.google_anna_speak"
                     }
                   ],
                   "title": "Google Home Mini Anna",
index 550780fe676f674af3925a29fc535c500f254bd8..e7a83734648e2b673716bb4d143d34b90544b315 100644 (file)
@@ -8,11 +8,18 @@
   trigger:
     - platform: state
       entity_id: input_text.google_home_speak
+    - platform: state
+      entity_id: input_text.google_anna_speak
 
   condition: []
 
   action:
     - service: script.speech_engine
       data_template:
-        media_player: "media_player.google_home"
+        media_player: >
+          {% if trigger.entity_id == 'input_text.google_anna_speak' %}
+            media_player.google_anna
+          {% else %}
+            media_player.google_home
+          {% endif %}
         message: "{{ trigger.to_state.state }}"
index b6a2a975e857ed7ee485609c25b4544e175e996f..e6a22a6046092379f224243a1dc220aff8b3924e 100644 (file)
@@ -4,3 +4,10 @@
 google_home_speak:
   name: Pronuncia
   mode: text
+
+######################################################################
+# Input Text: Google Home Anna Speak
+######################################################################
+google_anna_speak:
+  name: Pronuncia
+  mode: text