diff --git a/check_config/config.json b/check_config/config.json index 46b16a0..6701f5c 100644 --- a/check_config/config.json +++ b/check_config/config.json @@ -1,6 +1,6 @@ { "name": "Check HomeAssistant config", - "version": "0.4", + "version": "0.5", "slug": "check_config", "description": "Check HomeAssistant config with a new version", "url": "https://home-assistant.io/addons/check_config/", diff --git a/check_config/run.sh b/check_config/run.sh index 58c0018..7193d41 100644 --- a/check_config/run.sh +++ b/check_config/run.sh @@ -25,8 +25,16 @@ echo "[INFO] Install done, check config now" cp -r /config /tmp/config > /dev/null if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)" then - echo "[ERROR] Wrong config found: $HASS_OUTPUT" + echo "[ERROR] Wrong config found!" + echo "$HASS_OUTPUT" exit 1 fi -echo "[INFO] Okay :)" +if echo "$HASS_OUTPUT" | grep ERROR > /dev/null +then + echo "[ERROR] Wrong yaml found!" + echo "$HASS_OUTPUT" + exit 1 +fi + +echo "[INFO] Done"