Closed Woutch closed 2 months ago
Thanks for the feedback! I did not reproduce the bug yet, I'll try when I have some time and keep you posted.
So something is broken to parse the json into an array I guess? Maybe the single quotes in forecast text? like 's morgens?
This seems like a reasonable guess, the only differences between daily and hourly forecast are: sunset, sunrise and text. Probably one of them is not serializable to JSON as intended
Love the integration by the way ;-)
Thanks! It seems that people love to know when it is going to rain in Belgium :)
No problem, take your time.
Let me know if I can do something. ;-)
Yes, to see when it will get sunny here is useless :-D
I managed to reproduce the bug and fix it. The fix is included in 0.2.18
The problem was the time of sunset and sunrise not being serialized correctly (it was a datetime object instead of a string as expected by Home Assistant)
Just updated here. Working perfectly again!
Many thanks!!
Describe the bug Daily forecast using the script bellow returns puts a long string in the entity, hourly is getting processed correctly
Script
I have practcally the same script for hourly. T problem lies with the last line: forecast: "{{ daily['weather.home'].forecast }}"
Working hourly: {{ state_attr('sensor.weather_hourly','forecast') }} Output is a array:![image](https://github.com/jdejaegh/irm-kmi-ha/assets/3136903/ddaf8a6f-de42-4e8d-bbe4-25e11f39c61f)
Not working Daily: {{ state_attr('sensor.weather_daily','forecast') }} Ouptus is a string:![image](https://github.com/jdejaegh/irm-kmi-ha/assets/3136903/bb7f0eb7-e44f-4d6c-9265-038bd90db56f)
So the following template "{{ state_attr('sensor.weather_daily','forecast')[3]}}" returns the 4th char: d, and not the 4th day.
So something is broken to parse the json into an array I guess? Maybe the single quotes in forecast text? like 's morgens?
Version
Love the integration by the way ;-)
Thanks Wouter