Thank you both for sharing this. I am working on a solution for controlling sunshades based on weather forecast, and this is a great starting point for that. I used the code from @tnemrap and it worked nicely.
I will also try to use some of the code from @pacive, since it has some nice features. One question though, the function getTrimmedList will probably not work for the current day since the forecast does not always start from time 0:00, depending on when the forecast is requested. Is there any simple way of comparing requested times with the timestamps in the json? I am new to the OH scripting language and I do not know how to implement that.
The getTrimmedList can be made to work for todays date by adding
var startIndex = startHour - (24 - numberList.length)
and use startIndex intstead of startHour in the for-loop. This doesnât play well with days more than 2 days in the future however⊠Still got some bugs to figure out
Hi Mike,
Thanks for sharing your Weather Script .
Do you mind sharing your Custom Template, as well can you help me with the python script ? In witch folder do i need to save it in openhab folder ? And where the python.exe . Iâm still in an early learning stage and need a bit of assistance. I can see a location of the script in the rules but there is no c:/ or something similar.
Thanks in advance.
Since some time, I get an error with smhi_minmax.py. Not sure if something has changed from SMHI, or this came because of some upgrade on my computer (python?);