mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
Update pages.py
This commit is contained in:
@@ -394,7 +394,8 @@ class LuiPagesGen(object):
|
||||
|
||||
results = apis.ha_api.call_service(
|
||||
"weather/get_forecasts", target={"entity_id": entityId}, service_data={"type": rt}
|
||||
) forecast = results.get("result", {}).get("response", {}).get(entityId, {}).get('forecast') or entity.attributes.get('forecast', [])
|
||||
)
|
||||
forecast = results.get("result", {}).get("response", {}).get(entityId, {}).get('forecast') or entity.attributes.get('forecast', [])
|
||||
if len(forecast) >= item.stype:
|
||||
day_forecast = forecast[item.stype]
|
||||
fdate = dp.parse(day_forecast['datetime'])
|
||||
|
||||
Reference in New Issue
Block a user