From 59e33875cda2b86b125b14d22c94f2d7f2b22b21 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Tue, 6 May 2025 10:45:02 -0700 Subject: [PATCH] New backup 2025-05-06 10:45:02 --- de/home/.config/eww/scripts/home/hass_weather | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/de/home/.config/eww/scripts/home/hass_weather b/de/home/.config/eww/scripts/home/hass_weather index c4cf5ab..1449929 100755 --- a/de/home/.config/eww/scripts/home/hass_weather +++ b/de/home/.config/eww/scripts/home/hass_weather @@ -3,21 +3,14 @@ hass_weather_cache="${HOME}/.cache/hass_weather.json" update_cache_json(){ -# condition="$(jq -r '.current_condition[0].weatherDesc[0].value' ${hass_weather_cache})" - condition="$(hass-cli -a states -i sensor.openweathermap_weather | jq -r '.state')" -# condition_code="$(jq -r '.current_condition[0].weatherCode' ${hass_weather_cache})" - condition_code="$(hass-cli -a states -i sensor.openweathermap_weather_code | jq -r '.state')" -# current_temp="$(jq -r '.current_condition[0].temp_F' ${hass_weather_cache})" - current_temp="$(hass-cli -a states -i sensor.openweathermap_temperature | jq -r '.state')" -# feels_temp="$(jq -r '.current_condition[0].FeelsLikeF' ${hass_weather_cache})" - feels_temp="$(hass-cli -a states -i sensor.openweathermap_feels_like_temperature | jq -r '.state')" -# min_temp="$(jq -r '.weather[0].mintempF' ${hass_weather_cache})" - min_temp="$(hass-cli -a states -i sensor.eugene_weather_realfeel_temperature_min_day_0 | jq -r '.state')" -# max_temp="$(jq -r '.weather[0].maxtempF' ${hass_weather_cache})" - max_temp="$(hass-cli -a states -i sensor.eugene_weather_realfeel_temperature_max_day_0 | jq -r '.state')" -# humidity="$(jq -r '.current_condition[0].humidity' ${hass_weather_cache})" - humidity="$(hass-cli -a states -i sensor.openweathermap_humidity | jq -r '.state')" -# updated="$(date -r ${hass_weather_cache} '+%Y-%m-%d, %H:%M')" + weather_summary="$( hass-cli -a states -i sensor.weather_summary | jq -r '.attributes' )" + condition="$( jq '.condition' <<< ""${weather_summary}"" )" + condition_code="$( jq '.condition_code' <<< ""${weather_summary}"" )" + current_temp="$( jq '.current_temp' <<< ""${weather_summary}"" )" + feels_temp="$( jq '.feels_temp' <<< ""${weather_summary}"" )" + min_temp="$( jq '.min_temp' <<< ""${weather_summary}"" )" + max_temp="$( jq '.max_temp' <<< ""${weather_summary}"" )" + humidity="$( jq '.humidity' <<< ""${weather_summary}"" )" updated="$(date '+%Y-%m-%d, %H:%M')" case "${condition_code}" in