From 47d2fab9a019c1d5592d39fbba1dfd5e3eb7bcae Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Tue, 6 May 2025 15:45:02 -0700 Subject: [PATCH] New backup 2025-05-06 15:45:02 --- de/home/.config/eww/scripts/home/hass_weather | 3 +++ 1 file changed, 3 insertions(+) diff --git a/de/home/.config/eww/scripts/home/hass_weather b/de/home/.config/eww/scripts/home/hass_weather index 703f0f7..5682e55 100755 --- a/de/home/.config/eww/scripts/home/hass_weather +++ b/de/home/.config/eww/scripts/home/hass_weather @@ -4,6 +4,9 @@ hass_weather_cache="${HOME}/.cache/hass_weather.json" update_cache_json(){ weather_summary="$( hass-cli -a states -i sensor.weather_summary | jq -r '.attributes' )" + if [[ -z "${weather_summary}" ]];then + return 1 + fi condition="$( jq -r '.condition' <<< ""${weather_summary}"" )" condition_code="$( jq -r '.condition_code' <<< ""${weather_summary}"" )" current_temp="$( jq -r '.current_temp' <<< ""${weather_summary}"" )"