Browse Source

Add config test on update

Joachim M. Giæver 3 years ago
parent
commit
8e4fbf0b8c
2 changed files with 7 additions and 1 deletions
  1. 4 0
      scripts/hooks/post-refresh
  2. 3 1
      snap/snapcraft.yaml

+ 4 - 0
scripts/hooks/post-refresh

@@ -2,3 +2,7 @@
 
 source "${SNAP}/init"
 logger "Running post-refresh ${SNAP_NAME} (uuid: ${UUID})"
+
+logger "Running config test"
+set -e
+$SNAP/bin/hass --script check_config --config "${SNAP_DATA}"

+ 3 - 1
snap/snapcraft.yaml

@@ -7,6 +7,8 @@ description: |
   platform for automating control.
 
   Please see official docs: https://git.giaever.org/joachimmg/home-assistant-snap
+
+  See `snap connections home-assistant-snap` for necessary plugs.
 base: core20
 grade: stable
 confinement: strict
@@ -61,7 +63,7 @@ apps:
     slots: 
       - components
   check-config:
-    command: bin/hass --script check_config
+    command: bin/hass --script check_config --config $SNAP_DATA -i
 
 parts:
   homeassistant: