Widget to adjust the setpoint of my KNX Heating Actuators by 1bit element

Here my simple Solution of a small Widget.
OH3 - Widget to adjust the setpoint of my KNX Heating Actuators by an 1bit element. I use the heating actor MDT AKH-0800.

It takes me several hours to program this, because the documentation of the syntax is very poor.
(I was not able to find one, so I started with try and error.)

→ Maybe my code helps someone.
→ Or maybe someone has ideas to make is more beautiful.
(Change the color, make the columns better…)

For OH3 beginners: Can create your own widgets here ![image|690x246](upload://2A3F4LXeHxcF5WByI1sU6ErGI3y.png)

Code

This is the code of my simple widget:

    uid: widget_adjust_setpoint_2
    tags:
      - temperature
    props:
      parameters:
        - description: A text prop
          label: Raum der Heizung
          name: prop1
          required: false
          type: TEXT
        - context: item
          description: An item to control
          label: Sollwertverschiebungs item
          name: Sollwertverschiebung
          required: true
          type: TEXT
        - context: item
          description: An item to control
          label: Sollwert item
          name: Sollwert
          required: true
          type: TEXT
        - context: item
          description: An item to control
          label: Istwert item
          name: Istwert
          required: true
          type: TEXT
        - context: item
          description: An item to control
          label: Stellwert des Ventils item
          name: Stellwert
          required: true
          type: TEXT
      parameterGroups: []
    timestamp: Feb 8, 2021, 12:01:18 AM
    component: f7-row
    config:
      title: Test
    slots:
      default:
        - component: Label
          config:
            text: =props.prop1
            style:
              margin-left: 20px
        - component: Label
          config:
            text: =(items[props.Istwert].displayState )
            style:
              margin-left: 20px
        - component: Label
          config:
            text: =(items[props.Stellwert].displayState )
            style:
              margin-left: 20px
        - component: oh-button
          config:
            action: command
            actionItem: =(props.Sollwertverschiebung)
            actionCommand: OFF
            actionModal: widget:YOURWIDGET
            icon-f7: minus_circle
            iconSize: 20
            iconColor: white
            raised: true
            large: true
            fill: true
            style:
              colour: blue
        - component: Label
          config:
            text: =(items[props.Sollwert].displayState )
        - component: oh-button
          config:
            action: command
            actionItem: =(props.Sollwertverschiebung)
            actionCommand: ON
            actionModal: widget:YOURWIDGET
            icon-f7: plus_circle
            iconSize: 20
            iconColor: white
            raised: true
            large: true
            fill: true
1 Like

Thanks for posting. We’ve been putting all the example widgets in the Add-ons UIs category so I move this post there.

Hi Michael,

I am using the same hardware from MDT. You can also use the beautiful widget from Nico. There are minor modification needed to run it with 1bit element, but you can use the code, that I already posted. If possible could you try whether you have the same issue with rounding?

https://community.openhab.org/t/oh3-heating-widget-based-on-css/115107/58?u=snowy

1 Like