New backup 2025-05-06 15:45:02
This commit is contained in:
parent
c358a80bee
commit
47d2fab9a0
1 changed files with 3 additions and 0 deletions
|
@ -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}"" )"
|
||||
|
|
Loading…
Add table
Reference in a new issue