I bumped into this blueprint while setting up HA Voice PE. Thank you!
For whatever reason, sometimes the assistant says it fails to fetch the weather information, and when I look at the script traces, I see this: Error: UndefinedError: list object has no element 0. I am using the Met.no integration.
@badnetmask Can you share the full trace? You can paste it to a code sharing site like https://dpaste.org and share the link. Please share a trace from a script run where it didnât work.
Which LLM are you using? And are you using the recommended settings?
Hi, i use the OpenAI LLM and added the script. I always get this error:
Something went wrong: unable to call service weather. forecast with data
(dayâ: â2025-01-05â, âtimeâ: âafternoonâ, 'entity_id: None). One of âentity_id",
area_idâ, or âdevice_idâ is required
How can i fix that? I use met.no and added the entity to the script.
I canât give you a trace because the script doesnât seem to be running. If I donât expose the script for assist, I wonât get this error but then the weather feature dont work.
Thanks for the blueprint! It works great if I ask for todayâs or tomorrowâs forecast. But if I ask for the forecast by the day of the week (i.e. Saturday or Sunday) it will give the forecast for the wrong day. Iâm using this with the OpenWeatherMap integration.
@TheFes Thanks for this. Looks great.
Iâm getting an error from Gemini about not knowing the start and end times for Monday! ai_weather is my script, but it looks like itâs never been run. :-/
@badnetmask
Your issue should be solved if you update the blueprint (just updated the code on GitHub).
The issue was that your LLM used the exact same datetime string for both start and end. I now add a day if the time of that datetime string was 00:00, otherwise I add an hour.