UI Widget: Weather

Ah, thank you so much, that was indeed the problem!

Many thanks for this nice widget.

Does anyone know on how to translate the condition string.
In the bridge I configured loacle = DE; Openhab set to Germany; German
Where else do I need to update something to get a translation of the strings (in 2.5 there was the possibility to map something, but most of the time the binding already did that job).

Thanks for your support.

Joerg

Hi @DerLang

It should translate the condition string to your region automatically. Did you set your Regional Settings within OH to your location?
SettingsRegional Settings on the right under System Services

Hopefully this is the right section. But basically, yes, I think i did this:

Hi,

I just did the IT thing: Did you turn it off and on again?

And suddenly the translation is available…

Thanks for your support.

Regards
Joerg

Would you mind to share your YAML code?

Hello Rainer,

thanks for the quick reply!
Glad that the idea with the amount of rain is well received.

I understood that with the checkboxes, over a swiper element is practically the same effect. A reason why I have added in each of the 3 tabs something to information was also that they must always have the same height because the widget otherwise with each tab change the size. This could be the only hurdle if you can show and hide info independently.

the z-index is also a great thing, I have previously overlooked in your code smooth :smiley: .

In fact, actions that are based on oh-action work quite well for me. only the f7-action seems to have problems.

if i can help somewhere let me know, otherwise i’ll wait for a final version. My OH3 is anyway first to try until all bindings are converted.

many greetings

Thanks for the really nice widgets.

There is a minor bug in the code of the first widget (have not checked the others). In line 462, it should be wordingPrecipitation instead of wordingUvindex.

Oh, thank you @vbier - I forgot to change that after putting together the final widget.

Hi @RGroll and everyone. Im totally new to OH and began my study with your weather widget. If I add things and points like its described, I get a lot of unorganized stuff. So i`ve added them to model outdoor/forecast. What must i change with the widget code to implement that?

привет Вася and welcome to the community!

Normally, you don’t have to mess with the code whatsoever - it’s only necessary to set-up the particularities (that might be unique for your setup) inside the widget-configuration.

If I understand you right, you’ve successfully added your items and getting values for them, right?
SettingsItems → You see values to the right of your items?!

If it looks similar to this screenshot, you only have to set OneCallAPIweatherandforecast_ as the itemPrefix inside the configuration of the weather-widget.

Yes I do see all items and their values in settings. Then i copy widget code to new widget window, get a widget preview with a lot of ???s. I’ve set in widget props itemPrefix as described - and nothing changes, still a lot of undefinedNaN???s. If I’ll change itemPrefix as Forecast_Forecast, I’ll get the same And I’m so dumb that even can`t figure out what is going wrong.

After copying the widget code - hit Save in the top right corner - don’t do Set props here (as it’s just for testing purposes and won’t be saved permanently).

Set your widget props inside the Page where you won’t to show the widget in, like described here.

Nearly correct :slight_smile: - the prefix in your case would be Forecast_

Not at all - as you’re new to OH and the use of widgets it’s normal that it might need some time, getting familiar with this.

Hope it will work then! :wink:

Thanks, it does work with Forecast_, it`s a strange decision from developers that users can’t fully test widgets in widget window, before going live on OH pages, didn’t expected that to work that way. Now i’ve got:


Will discover more and thanks for you help!

Of course you can - I only wasn’t sure if you’re aware of the fact that params which you set there won’t be permanent.

The widget editor is, as you said, only for testing purposes. So if you would set the Forecast_ parameter there, it should work also.

Hello Rainer,

I tried something and inserted a trend line of the current temperature. I find this actually quite stylish. Maybe it’s the same for you, then maybe you could include it in the upcoming version of the widget. :slight_smile: I also made it editable via the menu so that you can turn it on/off, change the line width and visibility. What I failed at, that you can also change the color in the menu…

Weather_Card_trendline2


That with the “|”, actually goes. I noticed that he has a hard time with spaces, so I just put invisible underscores as labels in between. Because | looks better than /.

best regards

1 Like

I have a direct question about the Trendline. You can give the trendline a width “trendWidth: 300” but this is not dynamic with the width of the widget. I have not found a way to specify a dynamic value here so that the width is always adapted to the corresponding display width and thus the widget width. Do you have any idea here?
Thanks in advance

Hey @Sebastian1

thanks for your enhancement!

You could assign css styles to the oh-trend element (instead of using the trendWidth):

    - component: oh-trend
      config:
        trendItem: YOURITEM
        style:
          position: absolute
          top: 0
          left: 0
          width: 100%
          height: 100%

There is a new oh-chartcomponent that comes with the latest snapshot build, which might allow some more possibilities in regards of styling and information, that I’d like to check before I implement this solution - but we’ll see.

I’m working on some other widgets currently, so it might take some time. :slight_smile:

1 Like

thank you for the quick reply. So the way you suggested I tried it first (I took it from your trendline example card), but that doesn’t exactly adjust it to the width, but makes an exact width of 300. So I tried it with the “trendWidth”. Ok then let’s wait and see what they implement now exactly. So it looks when I make times wider than 300, which is always the case with the laptop.

I’m also trying to build widgets for rooms and devices in parallel, but that’s not so easy when you start at 0 in the theme :smiley: . I’m interested, if your widgets are like the weather widget, then my can not keep up anyway :smiley:

1 Like

You could try to combine max width/height and the trendWidth parameter - it’s not really dynamic and might mess up the width of the trendline a bit, but at least it will take up the whole width. :slight_smile:

    - component: oh-trend
      config:
        trendItem: YOURITEM
        trendWidth: 800
        style:
          width: 100%
          height: 100%

Then we indeed working on similar things right now - I’m trying to build some custom (and as flexible as possible) control-elements for all type of equipment like switches, dimmer, heating controls etc. - let’s see where it ends :smiley:

What helps me here, is to look at some of the better ‘smarthome’ UI concepts on dribbble or google and trying to recreate and optimize them.

Haha, thank you - I’ll try to make them at least with the same degree of flexibility and the goal, that they meet my (and mybe others) standards in regards of look & feel.

Give yourself some time and try to build anything that you see and like - I’m sure you’ll be able to produce even better widgets soon.