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}"" )"