]> git.giorgioravera.it Git - homeassistant.git/commitdiff
added script and button to clear log
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 21 Feb 2019 22:15:16 +0000 (23:15 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 21 Feb 2019 22:15:16 +0000 (23:15 +0100)
automation/home_assistant.yaml
customizations/script.yaml
script/home_assistant.yaml
ui-lovelace.yaml

index 753c54c7f8686f564a4917e461a3db748af76990..11e78dc456e68435cb903a3f291b3cffdbc7259c 100644 (file)
     
 ######################################################################
 # Home Assistant: Weekly Clean Log
-# - tts.clear_cache
-# - system_log.clear
-# - recorder.purge
+# - script.homeassistant_clearlog
 ######################################################################
 
 - alias: "Home Assistant: Pulitura settimanale log"
       weekday: [mon]
 
   action:
-    - service: tts.clear_cache
-    - service: system_log.clear
-    - service: recorder.purge
-      data:
-        keep_days: 0
+    - service: script.homeassistant_clearlog
index 2255f5f417ff373642809193af740dc48f388c7a..2621654cdebdcbeaeec08aefd2a48323a92e2215 100644 (file)
@@ -4,3 +4,9 @@
 
 script.notify_text_internal:
   hidden: true
+
+script.homeassistant_restart:
+  icon: mdi:home-assistant
+
+script.homeassistant_clearlog:
+  icon: mdi:file-document
index a58af420b8cbb846f27389d6652b16423ba6a00e..252ccbcb90b64732a1dd0fac37150d42d2426fb4 100644 (file)
@@ -3,7 +3,24 @@
 # - homeassistant.restart
 ######################################################################
 
-- alias: "Home Assistant: Riavvio Servizio"
-
+homeassistant_restart:
+  alias: "Riavvio Home Assistant"
   sequence:
     - service: homeassistant.restart
+
+######################################################################
+# Home Assistant: Clear Log
+# - tts.clear_cache
+# - system_log.clear
+# - recorder.purge
+######################################################################
+
+homeassistant_clearlog:
+  alias: "Pulisci Log"
+  sequence:
+    - service: tts.clear_cache
+    - service: system_log.clear
+    - service: recorder.purge
+      data:
+        keep_days: 0
+
index 4ee7197bd8af600ce569aaa549d700a5055445da..1c42db8c068c560a4a98cb7015d11a6f3e7fafea 100644 (file)
@@ -308,6 +308,10 @@ views:
         title: Configurazione Notifiche
         entities:
         - group.ha_settings
-      - type: entity-button
-        entity: script.homeassistant.restart
+      - type: entities
+        title: Controlli
+        show_header_toggle: false
+        entities: 
+        - script.homeassistant_restart
+        - script.homeassistant_clearlog