]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Fixed Voice Scripts
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 6 Jun 2019 09:37:24 +0000 (11:37 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 6 Jun 2019 09:37:24 +0000 (11:37 +0200)
script/audio.yaml
ui-lovelace.yaml

index 9fe24035c891bec6d2fda0aac324aff7d4ad4876..ea655b993b321ab29e4d16a0f39ea26b5116415e 100644 (file)
@@ -42,3 +42,24 @@ laura_voice:
             {% set type = 1 %}\r
           {% endif %}\r
           https://home.giorgioravera.it/local/audio/laura/{{type}}.mp3\r
+\r
+laura_voice_1:\r
+  alias: Voce Laura 1\r
+  sequence:\r
+  - service: script.laura_voice\r
+    data:\r
+      type: '1'\r
+\r
+laura_voice_2:\r
+  alias: Voce Laura 2\r
+  sequence:\r
+  - service: script.laura_voice\r
+    data:\r
+      type: '2'\r
+\r
+laura_voice_3:\r
+  alias: Voce Laura 3\r
+  sequence:\r
+  - service: script.laura_voice\r
+    data:\r
+      type: '3'\r
index 52ad1e5b7a770ffedcf8753fb2d2f521552d8391..18a2781fa12dc211c2e3671d0ee5137c1fa17cda 100644 (file)
@@ -304,10 +304,7 @@ views:
               action: call-service
               service: script.turn_on
               service_data:
-                entity_id: script.laura_voice
-                data:
-                  variables:
-                    type: '1'
+                entity_id: script.laura_voice_1
           - type: entity-button
             name: Belan
             icon: mdi:numeric-2
@@ -316,10 +313,7 @@ views:
               action: call-service
               service: script.turn_on
               service_data:
-                entity_id: script.laura_voice
-                data:
-                  variables:
-                    type: '2'
+                entity_id: script.laura_voice_2
           - type: entity-button
             name: Schifezza
             icon: mdi:numeric-3
@@ -328,11 +322,7 @@ views:
               action: call-service
               service: script.turn_on
               service_data:
-                entity_id: script.laura_voice
-                data:
-                  variables:
-                    type: '3'
-
+                entity_id: script.laura_voice_3
 
 ######################################################################
 # People