Hey!
I’m very happy to see such interest and contributions to the weather-widgets - and all it’s variants - over the time (Thanks to all of you!)
The shown widgets were created at different (sometimes very early) development stages of the OH3 MainUI, so functions as well as the used binding (OWM) has evolved over time - so has the YAML-knowledge of myself.
To make these widgets more accessible to new users and consider the above made changes to the system itself, I’ll try to create an overview of the widgets and point out some of the particularities for each of them.
All of the below shown widgets (the ones I created at least) using the same items now which are based on the default and automatically suggested naming-scheme during the creation of your semantic model.
Custom thing-prefixes as well as other prefixes (e.g. for different locations) can be configured within the widget.
What is the purpose of this widget?
It’s a weather widget for the great new OH3 MainUI based on the OpenWeatherMap-Binding to show the forecast for a dynamic ammount of hours and days with a lot of additional informations and some customization / localization options.
Prerequisites
You need to have the OpenWeatherMap binding installed, which offers all the informations you need to set-up this widget. You can follow this tutorial if you’re new to OpenHAB 3.0.
If you use textual configuration or want to add the items via UI afterwards, you can use the following thing- & item-defintions.
Not all of the items defined below are needed right now and differs on the widget you’d like to use - but to be future-proof, I would recommend to set up all of them.
Info: to those who want to assign their channels to a specific group in their semantic model - you’ve to add the group parameter.
Thing defintion (*.things)
→ owm-weather.things on github
Item definition (*.items)
→ owm-weather.items on github (667 items / Forecast for 25 hours and 7 days - including weather-informations that are not used by the widgets currently)
→ owm-weather-minimal.items on github (173 items / Forecast for 13 hours and 4 days - only necessary items included)
So let’s come to the different widget designs and their features (& limitations)…
Weather popup #1
This widget is meant to open inside a popup only!
It shows the current temperature , apparent temperature, condition (+icon), humidity and wind-speed as well as a forecast for the next x-days for which it also shows the min-/max-temperature, humidity, wind-speed and precipitation probability in a accordion-module.
- Variable amount of days to forecast
- Additional informations for each day (with click on the day)
- Dynamic background change for day/night (simplified to background-gradient only atm)
- Localization options (e.g. setting date-pattern & translations)
Info: If you used the above item-naming pattern you’ve to assign OneCallAPIweatherandforecast_
as itemPrefix (and Localweatherandforecast_
as additional itemPrefix if you want to show the Location automatically) within the widget-configuration.
Widget YAML
Weather popup #2 (extended)
This widget is meant to open inside a popup only!
This is an extended version of the first popup widget. It shows the current temperature, condition (+icon) as well as a slideable hourly- and daily-forecast
- Variable amount of days to forecast (inside a swiper-element)
- Variable amount of hours to forecast (inside a swiper-element)
- Sunrise / Sunset information as background- and icon-indicator within the hourly-forecast
- Dynamic background change for day/night (+the option to set different background images)
- Localization options (e.g. setting date-pattern & translations)
Info: If you used the above item-naming pattern you’ve to assign OneCallAPIweatherandforecast_
as itemPrefix (and Localweatherandforecast_
as additional itemPrefix if you want to show the Location automatically) within the widget-configuration.
Images:
weather_img.txt (31.7 KB) (rename to *.rar - default would be /static/files/weather_img corresponds to /etc/openhab/html/files/weather_img)
Search for a prominent sight of your region here and also put it in the above mentioned image-path. (you can also use any other source or create your own icon here of course)
Widget YAML
Weather card
This is a weather card which shows the current- and apparent temperature, condition (+icon) as well as a slideable hourly-, daily- and %-precipitation-forecast.
- Variable amount of days to forecast (inside a swiper-element)
- Variable amount of hours to forecast (inside a swiper-element)
- Sunrise / Sunset information as background- and icon-indicator within the hourly-forecast
- Dynamic background change for day/night (+the option to set different background images)
- Localization options (e.g. setting date-pattern & translations)
- Widget-size settings
- Various other styling settings
- Support for Actions (Experimental - theres a small issue right now, with setting parameters of the widget to open, which should be solved soon)
Info: If you used the above item-naming pattern you’ve to assign OneCallAPIweatherandforecast_
as itemPrefix (and Localweatherandforecast_
as additional itemPrefix if you want to show the Location automatically) within the widget-configuration.
Widget YAML
Feel free to reuse and modify all of these widgets (if you willed to make them available here as well) - and please report any errors, if you find them.
Other variants
The item-definitions of these widgets might differ - consult their postings to get more information.
- Card widget with webcam view from @Ronny_Desmedt
- Card widget with optional information item and exchangeable backgrounds from @oh11
- Card widget for the Dark Sky Binding with alternative icons from @maxwie1093
Thx!