Thus, when I try to get the [0]th element of the above I get undefined since it is not actually an array. This becomes an issue on Tileboard as I try to iterate though the first nth elements of the forecast.
This issue has no "integration causing the issue" hence it's unlikely anyone will look at it. Refile it against whatever weather integration you are using.
The problem
Hello,
I have the following template for use with Tileboard to fetch hourly weather from Environment Canada.
Using the following
{{state_attr('sensor.weather_forecast_daily','forecast')}}
The above used to give me an array of objects back, but now I just get a string.
{'forecast': [{'datetime': datetime.datetime(2024, 8, 12, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 30, 'condition': 'lightning-rainy', 'temperature': 22.0, 'templow': 13.0}, {'datetime': datetime.datetime(2024, 8, 13, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 0, 'condition': 'sunny', 'temperature': 27.0, 'templow': 15.0}, {'datetime': datetime.datetime(2024, 8, 14, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 30, 'condition': 'rainy', 'temperature': 28.0, 'templow': 14.0}, {'datetime': datetime.datetime(2024, 8, 15, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 0, 'condition': 'sunny', 'temperature': 28.0, 'templow': 15.0}, {'datetime': datetime.datetime(2024, 8, 16, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 0, 'condition': 'partlycloudy', 'temperature': 28.0, 'templow': 18.0}, {'datetime': datetime.datetime(2024, 8, 17, 15, 0, tzinfo=tzutc()), 'precipitation_probability': 60, 'condition': 'rainy', 'temperature': 24.0, 'templow': 18.0}]}
Thus, when I try to get the [0]th element of the above I get undefined since it is not actually an array. This becomes an issue on Tileboard as I try to iterate though the first nth elements of the forecast.
Seemingly another user ran into the issue here also : https://community.home-assistant.io/t/need-help-with-recent-daily-weather-forecast-error/759166
Please let me know if I can provide any more information or do any testing for you.
Thanks!
What version of Home Assistant Core has the issue?
core-2024.8.0
What was the last working version of Home Assistant Core?
core-2024.7.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response