5iver
(Scott Rushworth)
May 28, 2020, 3:32am
4
Burzin_Sumariwalla:
gTodays_Weather_Forecasts.label = gTodays_Weather_Forecasts_Label.label // Results in “Label: Weather Forecasts for”, instead of “Weather Forecasts for Wednesday, May 27, 2020 (Today)”
This does not work because the state presentation is not actually in the Item’s label, but used in the presentation of the state in the UI. Also, you should be using setLabel.
Why not use…
The OpenWeatherMap binding can be used with a free API, but this does not provide daily forecasts. So, I wrote a JSR223-Jython rule using the openhab2-jython modules to take the hourly data and add/remove the Items into groups that provide the daily forecast information. Since there are about 600 groups and Items that are needed, I included their creation in the rule too. The script file contains more details.
I think this is pretty much final, so I’ll start working on a Habpanel widget!
[i…
… and this?
I just submitted a PR that adds a core feature for a JythonScriptEngineFactory and it would be great to have some testers! Basically, this will allow for the installation of Jython including the core and community helper libraries through Paper UI, once the PR is merged. If you’d like to test it, you’ll need to…
Have OH 2.5.x (S1778) or newer
Shutdown OH
Backup OH
Download the addon and copy to $OPENHAB_HOME/addons/ (see here for more details). The jar contains the core and community helper l…
1 Like