From: Giorgio Ravera Date: Thu, 21 Feb 2019 22:15:16 +0000 (+0100) Subject: added script and button to clear log X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=056dc956f26d6b2c6482b3b275bbacdb27065842;p=homeassistant.git added script and button to clear log --- diff --git a/automation/home_assistant.yaml b/automation/home_assistant.yaml index 753c54c7..11e78dc4 100644 --- a/automation/home_assistant.yaml +++ b/automation/home_assistant.yaml @@ -143,9 +143,7 @@ ###################################################################### # Home Assistant: Weekly Clean Log -# - tts.clear_cache -# - system_log.clear -# - recorder.purge +# - script.homeassistant_clearlog ###################################################################### - alias: "Home Assistant: Pulitura settimanale log" @@ -160,8 +158,4 @@ weekday: [mon] action: - - service: tts.clear_cache - - service: system_log.clear - - service: recorder.purge - data: - keep_days: 0 + - service: script.homeassistant_clearlog diff --git a/customizations/script.yaml b/customizations/script.yaml index 2255f5f4..2621654c 100644 --- a/customizations/script.yaml +++ b/customizations/script.yaml @@ -4,3 +4,9 @@ script.notify_text_internal: hidden: true + +script.homeassistant_restart: + icon: mdi:home-assistant + +script.homeassistant_clearlog: + icon: mdi:file-document diff --git a/script/home_assistant.yaml b/script/home_assistant.yaml index a58af420..252ccbcb 100644 --- a/script/home_assistant.yaml +++ b/script/home_assistant.yaml @@ -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 + diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 4ee7197b..1c42db8c 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -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