[SOLVED] Main UI Widget does not update with new item

Hi everyone. I am just adapting to OH3 and I have had problems setting up Pages.

Create a widget thanks to Example Custom List Widgets.

uid: light_list_widget
  - list
  - light
    - description: The label for the widget
      label: Title
      name: title
      required: false
      type: TEXT
    - context: item
      description: The light switch Item
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Feb 10, 2021, 11:15:55 AM
component: oh-toggle-item
  icon: f7:lightbulb
  iconColor: '=(items[props.item].state == "ON") ? "yellow" : "gray"'
  color: '=(items[props.item].state == "ON") ? "yellow" : "gray"'
  title: =props.title
  item: =props.item

When I place it on “overview” and edit it to add the corresponding item, the following error appears in my console.

[WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined

If I put “Save” the widget is placed but without the assigned item.

I have been trying to do something similar with a humidity sensor and the same thing happens, I add the item but at the time of adding it, there are no changes.

What could be happening?

An issue has already been filed for this. The solution is you have to fill in the title and all the other properties that use props to use the actual Item and title.

Forgive my ignorance, so should I edit where I create the widget or the list where the item is?

You have to set all the settings on the form where you inserted the widget. Leave the custom widget unchanged.

I got it, editing in the “code” tab, there was no way to edit from the “design” tab -> “config item”. Just out of curiosity, why is this happening?
Thank you.

There’s a bug. And as I said there is an issue opened.

Can you post some code example:

  1. As it should be when there is no bug
  2. As it should be with bug to be able to use widget without issue

Thank you in advance

No because it’s not a problem with the code. It’s a problem with using a custom widget on the Overview tab. There is nothing you can change in the code to make it work.

I believe this problem has been fixed but you should search Github for related issues to be sure.

Thank you

Hi All, I think im trying to do something similar. My widget puts the itemname by default, which is too long for the MainUI to look clean. If I go and edit the code of the page and enter this:

It appears like this:

But I want it to say Island instead

So I edited the code, but it won’t update


Any suggestions? Thanks!