Skip to content

Variables seem to no longer work on OVERVIEW Page (Worked prior to OH 5.2.0.M1 #3939

@Mark-VG

Description

@Mark-VG

The problem

Prior to OH 5.2.0.M1 I used variables to determin teh visibility of componets on my widgets.

After installing the Milestone this functionality stopped working and the visibility seemed to be always false

The functionality still seems to work on other pages as well as the Overview in "run" mode.

After posting in the community it was suggested to create a limited widget to demonstrate the issue.

https://community.openhab.org/t/openhab-5-2-milestone-discussion/168410/2
https://community.openhab.org/t/openhab-5-2-milestone-discussion/168410/23

Similar issue was resolved in the past: #2046

The following widget code demonstrates the issue when used on the Overview Page:

component: oh-cell
config:
  title: ="Test Visibility " + vars.visibleMonthlyPop
slots:
  background:
    - component: f7-block
      config:
        bgColor: none
        style:
          bottom: 5px
          left: 0px
          margin: 0
          padding: 0
          position: absolute
          width: 100%
      slots:
        default:
          - component: oh-button
            config:
              action: variable
              actionVariable: visibleMonthlyPop
              actionVariableValue: true
              popupOpen: .month-pop-test
              style:
                height: 100%
                width: 100%
              text: OPEN
    - component: f7-popup
      config:
        class: month-pop-test
        style:
          --f7-popup-tablet-height: 720px
          --f7-popup-tablet-width: 360px
          background-color: rgb(220,220,220)
          border-radius: 30px
          height: 720px
          text-overflow: ellipsis
          width: 360px
      slots:
        default:
          - component: f7-block
            config:
              style:
                --f7-popup-tablet-height: 720px
                --f7-popup-tablet-width: 360px
                background: rgb(220,220,220)
                border-radius: 20px
                height: 720px
                margin: 0
                padding: 0
                position: absolute
                top: 0px
                width: 360px
            slots:
              default:
                - component: oh-button
                  config:
                    action: variable
                    actionVariable: visibleMonthlyPop
                    actionVariableValue: false
                    clearVariable:
                      - visibleMonthlyPop
                    large: true
                    popupClose: .modal-in
                    style:
                      background: rgb(220,220,220)
                      color: white
                      display: flex
                      height: 30px
                      left: 5px
                      position: absolute
                      top: 5px
                      width: 30px
                      z-index: 999
                  slots:
                    default:
                      - component: f7-icon
                        config:
                          color: white
                          f7: clear_fill
                          style:
                            color: black
                            font-size: 20px
                            margin: auto
                - component: Label
                  config:
                    style:
                      top: 20px
                      position: absolute
                      font-weight: 500
                      padding-left: 35px
                      width: 100%
                    text: ="Status " + vars.visibleMonthlyPop
                - component: Label
                  config:
                    style:
                      position: absolute
                      top: 50px
                      font-weight: 500
                      padding-left: 35px
                      width: 100%
                    text: ="Status " + vars.visibleMonthlyPop

One Overview in Run Mode:

Image

One Overview Page:

Image

Expected behavior

The functionality from before to work and allow variable to be assigned values correctly.

Steps to reproduce

Create the test widget from above on the Overview page and oberve the variable status.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmain uiMain UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions