From 46d357e13d3c9c6a368ab0de1a551bca05815d63 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Fri, 22 Feb 2019 08:30:14 +0100 Subject: [PATCH] Added upgrade script and button --- script/home_assistant.yaml | 12 +++++++++++- shell_command/homeassistant.yaml | 2 +- .../{hass_update.sh => homeassistant_upgrade.sh} | 2 +- themes/midnight.yaml | 3 ++- ui-lovelace.yaml | 1 + 5 files changed, 16 insertions(+), 4 deletions(-) rename shell_scripts/{hass_update.sh => homeassistant_upgrade.sh} (68%) diff --git a/script/home_assistant.yaml b/script/home_assistant.yaml index 252ccbcb..9f95866c 100644 --- a/script/home_assistant.yaml +++ b/script/home_assistant.yaml @@ -4,7 +4,7 @@ ###################################################################### homeassistant_restart: - alias: "Riavvio Home Assistant" + alias: "Riavvio servizio" sequence: - service: homeassistant.restart @@ -24,3 +24,13 @@ homeassistant_clearlog: data: keep_days: 0 +###################################################################### +# Home Assistant: Upgrade +# - homeassistant.restart +###################################################################### + +homeassistant_upgrade: + alias: "Aggiornamento" + sequence: + - service: shell_command.homeassistant_upgrade + diff --git a/shell_command/homeassistant.yaml b/shell_command/homeassistant.yaml index b730e970..bedfd06f 100644 --- a/shell_command/homeassistant.yaml +++ b/shell_command/homeassistant.yaml @@ -1 +1 @@ -homeassistant_update: /etc/homeassistant/shell_scripts/hass_update.sh +homeassistant_upgrade: /etc/homeassistant/shell_scripts/homeassistant_upgrade.sh diff --git a/shell_scripts/hass_update.sh b/shell_scripts/homeassistant_upgrade.sh similarity index 68% rename from shell_scripts/hass_update.sh rename to shell_scripts/homeassistant_upgrade.sh index b4451eab..5f1e2693 100755 --- a/shell_scripts/hass_update.sh +++ b/shell_scripts/homeassistant_upgrade.sh @@ -5,5 +5,5 @@ cd echo "Activating python environment" source bin/activate echo "Upgrading homeassistant" -pip3 install --upgrade homeassistant +pip3 install --upgrade homeassistant > /var/log/homeassistant/upgrade.log echo "Done" diff --git a/themes/midnight.yaml b/themes/midnight.yaml index e2b3040b..516c2c0f 100644 --- a/themes/midnight.yaml +++ b/themes/midnight.yaml @@ -1,6 +1,7 @@ # Main colors primary-color: '#5294E2' # Header -accent-color: '#E45E65' # Accent color +#accent-color: '#E45E65' # Accent color +accent-color: '#5294E2' # Accent color dark-primary-color: 'var(--accent-color)' # Hyperlinks light-primary-color: 'var(--accent-color)' # Horizontal line in about diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 677d3446..fa90f174 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -356,4 +356,5 @@ views: entities: - script.homeassistant_restart - script.homeassistant_clearlog + - script.homeassistant_upgrade -- 2.47.3