From: Giorgio Ravera Date: Fri, 22 Feb 2019 07:30:14 +0000 (+0100) Subject: Added upgrade script and button X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=46d357e13d3c9c6a368ab0de1a551bca05815d63;p=homeassistant.git Added upgrade script and button --- 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/hass_update.sh deleted file mode 100755 index b4451eab..00000000 --- a/shell_scripts/hass_update.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Changed directory to homeassistant home" -cd -echo "Activating python environment" -source bin/activate -echo "Upgrading homeassistant" -pip3 install --upgrade homeassistant -echo "Done" diff --git a/shell_scripts/homeassistant_upgrade.sh b/shell_scripts/homeassistant_upgrade.sh new file mode 100755 index 00000000..5f1e2693 --- /dev/null +++ b/shell_scripts/homeassistant_upgrade.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Changed directory to homeassistant home" +cd +echo "Activating python environment" +source bin/activate +echo "Upgrading 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