]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Speech script improvement
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 25 Feb 2019 13:00:00 +0000 (14:00 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 25 Feb 2019 13:00:00 +0000 (14:00 +0100)
automation/ciao.yaml.disabled [deleted file]
customizations/script.yaml
script/speech_engine.yaml
ui-lovelace.yaml

diff --git a/automation/ciao.yaml.disabled b/automation/ciao.yaml.disabled
deleted file mode 100644 (file)
index 06cae16..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-######################################################################
-# Switch off all covers
-######################################################################
-
-- alias: "ciao"
-  trigger:
-    - platform: time
-      at: '15:48:00'
-
-  condition: []
-
-  action:
-    - service: script.speech_engine
-      data_template:
-        message: >- 
-          {% set ora = now().strftime('%H') %}
-          "Sono le {{ ora }} e tutto va bene"
index 2621654cdebdcbeaeec08aefd2a48323a92e2215..f951c8bc1a391434ba02f3b3094bba77e0006b63 100644 (file)
@@ -2,11 +2,17 @@
 # Script Customizations
 ######################################################################
 
-script.notify_text_internal:
-  hidden: true
-
 script.homeassistant_restart:
   icon: mdi:home-assistant
 
 script.homeassistant_clearlog:
   icon: mdi:file-document
+
+script.notify_text_internal:
+  hidden: true
+
+script.speech_engine:
+  icon: mdi:text-to-speech
+
+script.speech_status:
+  icon: mdi:voice
\ No newline at end of file
index 50d60b9f387815c430819d57f81d62b2212562d1..f23cd64a1ff2b64287e11b85c6edd51749113261 100644 (file)
@@ -80,6 +80,14 @@ speech_engine:
             {% endif %}\r
           {%- endmacro -%}\r
           \r
+          {# Location Status #}\r
+          {%- macro status_location() -%}\r
+            {% set giorgio_position = states('device_tracker.google_maps_115265981849847357125') %}\r
+            {% set laura_position = states('device_tracker.google_maps_103158638433668748797') %}\r
+            La posizione di Giorgio è {{ giorgio_position }}.\r
+            La posizione di Laura è {{ laura_position }}.\r
+          {%- endmacro -%}\r
+\r
           {# *********************************************** #}\r
           {# ******************* Message ******************* #}\r
           {# *********************************************** #}\r
@@ -93,11 +101,30 @@ speech_engine:
           \r
           {% if enable_status is defined %}\r
             {% if enable_status | int == 1 %}\r
+\r
               {{ status_covers() }}\r
+\r
+              {{ status_location() }}\r
             \r
               {{ status_car() }}\r
+              \r
             {% endif %}\r
           {% endif %}\r
 \r
           {# generic message #}\r
           {{ message }}\r
+\r
+######################################################################\r
+# Script: Speech Status\r
+#\r
+# Operations:\r
+# - script.speech_engine\r
+######################################################################\r
+\r
+speech_status:\r
+  alias: Pronuncia Stato\r
+  sequence: \r
+    - service: script.speech_engine\r
+      data:\r
+        enable_greeting: 1\r
+        enable_status: 1\r
index b918e82fbe071f8c3b776dd7ab1f2bcfd713707d..8cc546ce4fc8507426abdb8823ddc40ea85fc521 100644 (file)
@@ -71,6 +71,12 @@ views:
       - input_boolean.home_mode_day
       - input_boolean.home_mode_night
       - input_boolean.home_mode_away
+      
+    - type: entities
+      title: Controlli Vari
+      show_header_toggle: false
+      entities:
+      - script.speech_status
 
 ######################################################################
 # Covers