Dynamic Icons Items (Type: Number)

OH4 Snapshot

Item Type:

  • Number do not work in Main UI but in Basic UI

  • Switch / Dimmer (Slider) works in the Main UI

More details are required. An infinity is contained in the words “do not work”.

Only the default icon is displayed.

Item configs? Screen shots? Widget configs for MainUI? Sitemap?

This is like going to a mechanic and saying your vehicle doesn’t work but failing to even say if it’s a car or a boat.

I apologize for this inaccurate question.

With the last two images, I’m not sure if only the standard icon was always displayed

https://foo/basicui/app

basicui_app

https://foo/settings/pages/layout

settings_pages_layout

https://foo/#card=

https://foo/settings/items

settings/items

https://foo/settings/model

settings/model

I forgot to show the working example

I never assumed that this forum is a helpdesk, I know that openHAB is an open source project. I also always mentioned in my posts that I use OH4 Snapshot and I am aware that errors can occur.

The important parts in this case are 8, 9, 10, 11 and 13.

I don’t know what I’m looking at here. Is this a widget placed on a layout page? Is it a default widget or a custom widget?

The icon looks a whole lot like the one from BasicUI, does that mean it’s working?

You also forgot to show how you actually configured this Item. How you put the Item on the layout page. Semantic tags on the Item? Did you define default widget metadata?

oh-label-card: Only with icon and (iconUseState: true)

That’s all the same custom icon temp.svg / temp-{number}.svg

I have tried several different items from Basic: only with Label and Icon, Advanced: incl. Semantic Class (Point / Setpoint / … ) / Property (…)

Item Type:

  • Number
  • Dimmer

Well, I can’t help. Maybe if all the questions asked and information requested were provided I might have an idea. But with this :person_shrugging: and playing 20 questions when most of the questions asked never even get answered is no fun.

What is still missing information? It’s not like I write about every little bug in the forum. This behavior has been going on for a while and I’ve spent a lot of time looking in many different forums for a way to fix it. Most of them deal with OH2 and a few with OH3. I don’t have the ability to install an OH3 instance at the moment, otherwise I would have already tried and thus ruled it out.

From my side all relevant information is available. I use OH also already half an eternity, admittedly not in the smallest detail and often the standard configuration was sufficient for me. Now I have just again a little more time to deal more intensively with OH.

There’s no code tab but a description of what properties are set are good. Screen shots are OK I guess. The JSON from the API Explorer would be the absolute best as it includes everything.

You say “oh-label-card” but that tells me nothing. What is the config? What parameters did you set?

A good hit is if there is a “Code” tab, everything we need is in there.

You show a screen shot of a tiny part of it, but not the actual sitemap definition.

See above

You may have answered that but I can’t interpret your answer. I don’t know what this means

only with Label and Icon, Advanced: incl. Semantic Class (Point / Setpoint / … ) / Property (…)

And show what it is if you did.

In short, we need your actual configurations as they exist in your system. We need the complete configuration for the Item in question and the stuff that the Item touches.

Vague descriptions do not cut it.

If I had made any special settings, I would have mentioned it. I have only created one item via the Web UI it has no connection to any “things”. To make it visible in the Location Card I set the Semantic Class to Point. That’s all and the images show the result.

I would be surprised if every OH instance configures different settings.

oh-label-card: pages/layout… Label Card

I’ve told you what I need to diagnose this problem. Since you seem to know better that I do what I need to help, I wish you luck.

Can you or anyone else, install OH4 and create a number item and tell me if the behavior is occurring, that would already rule out if the error is with the OH service or my configuration.

If you would show us the complete item definition, and don‘t say nothing special, as you mentioned to have used as custom icon (temp.svg) but not showing the category setings and the widget yaml config, we could.

But as you are not giving this information, we cannot reproduce what you are seeing.

Not really, no. Nobody can attempt to replicate what’s going on because you still haven’t really provided the details. You need to take the time to be as detailed and explicit as possible. You have been quite forthcoming with numerous vague descriptions, but this has to be a “don’t tell us, show us” kind of situation.

For example, you haven’t even at any point yet, fully articulated the question here. Your initial post contains no question. You are expecting us to assume a lot.

You are not being targeted or attacked here, but the fact of the matter is that if we’re going to be able to work to a solution we have to be working from information not guesses.

I suggest just starting over completely. Assume that you have given us no information at all. Take the time to express your question clearly then give us the supporting evidence. Something doesn’t work? Ok, then tell us exactly what you expect to see, and show us what you see instead. Give us the full rundown of every part. If this involves an item show us the item configuration file or the page in the UI.
If this involves a widget show us the complete config for the widget. You cannot give us too much information. Pile it on and let us sort through, don’t try to filter it yourself.

2 Likes

works:

  "Test_Test": {
    "class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
    "value": {
      "groupNames": [
        "Location_Home"
      ],
      "itemType": "Dimmer",
      "tags": [
        "Point"
      ],
      "label": "Test Test",
      "category": "temp"
    }

does not work

  "Test_Test": {
    "class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
    "value": {
      "groupNames": [
        "Location_Home"
      ],
      "itemType": "Number",
      "tags": [
        "Point"
      ],
      "label": "Test Test",
      "category": "temp"
    }

This is what I mean. It’s great a great start that you have included the item JSON, but “works” vs “does not work” gives us nothing.

This forum is about communication. Single words or basic phrases do not communicate anything. If we don’t know what “works” and what “does not work” we cannot, even though we would very much like to, help you find a solution.

Please stop writing minimally, and start actually communicating in detail. Start from the top and tell us the complete story, not the summary.

2 Likes

Alright, I’ll start from the beginning.

I have since noticed that the temperatures icons, although dynamically configured, are only displayed in the default design. Item Setting / Model Settings / Location Card

So, I created a Test item to investigate this behavior. First try an item with type Number, this showed the above behavior, but in the Basic UI / Page Layout site (Label Card with setting iconUseState: true) the dynamic icon was displayed with ItemType: Number.

In the Location Card I had other dynamic icons configured. The ItemType were Switch and Dimmer and these changed the design when the state changed. Then I changed the type of the TestItem to Dimmer and then the icon was also updated.

We appreciate that you’re trying here, but something is just not getting through. There is more in this post than any of the previous ones, but still not really the level of detail we’ve been fairly explicit about.

It is clear that you believe that just telling us you’ve done something “standard” is supplying information, but it really isn’t. The problem is that OH is an extremely complex system. It is very easy (and common) even when using the UI to make a mistake when doing something “standard”. You would be surprised how many confusing problems just come down to a typo in a “standard” configuration. You are still just telling us and, no offense, but we can’t take your word for it because we know we all make simple, silly mistakes sometimes. We have to see it to know what’s going on.

Here is one instance of how what you’ve given us is still lacking in a great deal of information. From one single statement, I can produce at least 6 relevant questions you have yet to address:

  1. If you just created the item, does it still have a null state?
  2. Did you give it a state?
  3. If so, what state?
  4. How did you set that state?
  5. Did that state include units?
  6. There are lots of different subtypes for Number items, what kind of Number item did you create?

Dynamic icons are not displayed in some of the areas you list (if I understand your shorthand correctly, again, it’s not really clear). For example, the Item Detail Pane in the Model Page will not have a dynamic icon; it’s just not configured that way. However, it is possible that you have uncovered some part of the system where this isn’t working and if so it’s important that we work through it and figure it out.

Referring back to Rich’s analogy:

We’ve established now that it’s a car, that’s progress. But you’re still just telling the mechanic, “When I drive my car in the standard way that everyone does sometimes it makes a noise.”