Skip to content

YamlSlotOpenWeathermap

olialb edited this page Jun 8, 2026 · 1 revision

ohItem slot type openweathermap

The openweathermap slot type is mainly meant to be used in the screensaver card. It shows a weather forcast based on the openwathermap binding in openHAB. Youn need an openHAB item for the channel icon-id, time-stamp and one item for the value which you want to see in the forcast (temperature, humidity, rain,...).

Slot attribute default value optional / Mandetory Description
item - M the item attribute must reference with the openweathermap icon id for the forecast
textItem - M Item context will be shown as text. Can be an item with temperature, humidity etc.
timeItem - M OpenHAB DateTime item with the time of the forecast

Example:

    ...
    slots:
      - class: ohItem
        type: openweathermap      #openweathermap forcast
        item: W_IconID_0          #item with weather icon-id
        textItem: W_Temperatur_0  #Forcast item, which you want to see in the forecast
        timeItem: W_Messung_0     #Timestamp of the forecast

In card screensaver: image

Example definition of openHAB open waether map items:

DateTime W_Messung_0 "Eingang: [%tT %<tF]" {channel="openweathermap:weather-and-forecast:X:LocalWeather:current#time-stamp"}
String W_IconID_0 "[%s]" {channel="openweathermap:weather-and-forecast:X:LocalWeather:current#condition-id"}
Number:Temperature W_Temperatur_0 "Temperatur aktuell [%.1f°C]" {channel="openweathermap:weather-and-forecast:X:LocalWeather:current#temperature"}
Number W_Rain_0 "Regen aktuell [%.1fl/m²]" {channel="openweathermap:weather-and-forecast:X:LocalWeather:current#rain"}

Clone this wiki locally