OH5.2 SNAPSHOT - Action 'variable' not performed while in edit mode

Hi All

I have just updated to: openHAB 5.2.0 Build #5391 - Todays SNAPSHOT

I have not edited a widget for some time, but wanted to make a change today and end up with the error:

This a happens when I try AND use the widget.

A sample (minimised code) is:

uid: ZZZ_Partition_LIST
tags: []
props:
  parameters:
    - context: item
      description: A created group listing all Partitions in System, using the
        Partition Label Channel - Named as in PartitionX_Partiton_Label - All
        Partitons Require the Number instaed of the name in naming to allow
        parsing
      label: Partitions Group Item
      name: partitionsGroup
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Jan 3, 2026, 7:49:22 PM
component: f7-block
config:
  style:
    background-color: rgba(239,239,239,255)
    border-radius: 20px
    height: 720px
    left: 0px
    margin: 0
    top: 0px
    width: 360px
slots:
  default:
    - component: f7-block
      config:
        class:
          - padding
        style:
          left: 0px
          margin: 0
          position: absolute
          top: 150px
          width: 360px
      slots:
        default:
          - component: f7-row
            config:
              class: no-gap
            slots:
              default:
                - component: oh-repeater
                  config:
                    for: partition
                    fragment: true
                    groupItem: =props.partitionsGroup
                    sourceType: itemsInGroup
                  slots:
                    default:
                      - component: f7-row
                        config:
                          width: "10"
                        slots:
                          default:
                            - component: oh-button
                              config:
                                action: variable
                                actionVariable: selectedPartitionP
                                actionVariableValue: ='Partition' + loop.partition.name.slice(9,10)
                                fill: true
                                raised: false
                                style:
                                  border-radius: 12px
                                  overflow: hidden
                                  text-overflow: ellipsis
                                  white-space: nowrap
                                text: ="P" + loop.partition.name.slice(9,10)
                                textColor: white
    - component: Label
      config:
        style:
          color: black
          font-size: 10px
          left: 20px
          position: absolute
          top: 338px
        text: ="Selected Partition - " + [vars.selectedPartitionP]

This happens using Developer Tools/Widgets.

Never had to use a run mode before, and don’t see how thsi is done either?

Can anyone help please?

Also seeing:

image

This could be unlrelated? But could be due to “Run Mode”?

Any suggestions would be appreciated.

Mark

EDIT: THese issues do not occur in Milestone 2.

EDIT2: Looks like the whole widget format has chnaged too:

M2:

uid: ZZZ_Partition_LIST
tags: []
props:
  parameters:
    - context: item

SNAPSHOT #5391:

version: 1
widgets:
  ZZZ_Partition_LIST:
    tags: []
    props:
      parameters:

There has been a lot of good work to create a yaml format for files that encompasses everything (or most things, at least) to allow multi object configurations. That second yaml snippet is from this new file-based feature. To the best of my understanding, however, it should not extend to the UI widget editor and if you can show that it does then that should definitely be reported on the UI repo.

As for the other errors, I can’t say if they are related or not, and I haven’t moved up to that snapshot, so I can’t check what’s going on, but they do feel like they are probably related to me.

There have been a lot of changes, but IIRC the change to the UI widget editor and UI pages was intended. It is still supported to paste the old format and the UI can properly read it, but from now on it will display a new, uniform format.

I’ve been travelling a lot lately, I must have missed that part of the discussion. That’s good to know.

Thanks @florian-h05
I confirmed that if you take a M2 widget and paste into SNAPSHOT the config is updated to new format on save. So it appears that my issue is not related ot that.

I have created another test widget on M2 whicgh works 100%:

Test Widget M2

uid: Tes_VariableAction_M2
tags: []
props:
  parameters:
    - description: A text prop
      label: Prop 1
      name: prop1
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: May 31, 2026, 8:41:44 AM
component: f7-card
config:
  title: Test of Variable Action
  footer: =props.prop1
slots:
  default:
    - component: f7-block
      config:
        style:
          top: 45px
          left: 0px
          margin: 0
          padding: 0
          position: absolute
          width: 100%
      slots:
        default:
          - component: oh-button
            config:
              action: variable
              actionVariable: testVariable
              actionVariableValue: '=(vars.testVariable == "null") ? true : !(vars.testVariable)'
              style:
                height: 100%
                width: 100%
              text: OPEN
    - component: Label
      config:
        style:
          color: black
          font-size: 10px
          left: 20px
          position: absolute
          top: 78px
        text: ="Value testVariable - " + [vars.testVariable]

However when using SNAPSHOT:

Test Widget SNAPSHOT

version: 1
widgets:
  Tes_VariableAction_SNAPSHOT:
    tags: []
    props:
      parameters:
        - description: A text prop
          label: Prop 1
          name: prop1
          required: false
          type: TEXT
        - context: item
          description: An item to control
          label: Item
          name: item
          required: false
          type: TEXT
      parameterGroups: []
    component: f7-card
    config:
      title: Test of Variable Action
      footer: =props.prop1
    slots:
      default:
        - component: f7-block
          config:
            style:
              top: 45px
              left: 0px
              margin: 0
              padding: 0
              position: absolute
              width: 100%
          slots:
            default:
              - component: oh-button
                config:
                  action: variable
                  actionVariable: testVariable
                  actionVariableValue: '=(vars.testVariable == "null") ? true : !(vars.testVariable)'
                  style:
                    height: 100%
                    width: 100%
                  text: OPEN
        - component: Label
          config:
            style:
              color: black
              font-size: 10px
              left: 20px
              position: absolute
              top: 78px
            text: ="Value testVariable - " + [vars.testVariable]

Hope this help narow down the issue?

Mark

That’s likely a regression from my widget actions refactoring. I think I have DRY-ied the edit mode check and thus variable actions are also disabled in edit mode.

The message pretty exactly described what’s the issue. In case the item name there is constructed from a variable and a string, that is a consequence of the above.

Thank you. Yes, the item name is contructed from the variable. Apprerciate the feedback. Atl least I know you are on it. Theer shoudl hoqwever be quite a few of these as there are many items constructed from the variable.

So the root cause was different than I expected, it was not my refactoring that led to this regression.
I’ve created a fix for the variable issue (the issue actually affects all widget actions):

Thank you so much for the quick turn aound

Unfortunately it’s too later for M5, which was released today (but built last night). M6 will be released in three weeks.

Thank you. All up and working again :slight_smile: