How do I get the rule into a widget

  • Platform information: 4GB Ram virtual machine
    • OS: _Ubuntu 22.04.1 LTS
    • Java Runtime Environment: OpenJDK 64-Bit Server VM Zulu11.58+23-CA
    • openHAB version: 3.1

Hi guys

sorry for my bad english.
I am in the process of creating my first widget and would like to replace a simple rule with it. The rule is built as follows:

Blockquoterule “tuer”
when
Item testschalter changed from OFF to ON
then
Turschloss_LockTargetLevel.sendCommand(‘Locked’)
end

My widget should perform this one action (as in the rule) after clicking on the button but unfortunately nothing happens. Do you have any idea what the problem is?

uid: Tür
tags: []
props:
  parameters:
    - description: Überschrift
      label: title
      name: title
      required: false
      type: TEXT
    - context: item
      description: Das Item welches den Zustand anzeigt
      label: Zustand Item
      name: Zustand_item
      required: false
      type: TEXT
    - context: item
      description: Das Item zum steuerm
      label: Schloss steuern
      name: schloss_steuern
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Dec 17, 2022, 5:30:49 PM
component: f7-card
config:
  title: =props.title
slots:
  default:
    - component: f7-card
      config:
        class:
          - text-align-center
        title: =(items[props.Zustand_item].state)
      slots: {}
    - component: f7-row
      slots:
        default:
          - component: f7-col
            slots:
              default:
                - component: oh-button
                  config:
                    action: command
                    actionItem: =(probs.schloss_steuern)
                    actionCommand: Locked
                    iconColor: green
                    iconF7: lock_fill
                    text: verschlossen
                    textColor: green
                    title: zuschliessen
          - component: f7-col
            slots:
              default:
                - component: f7-button
                  config:
                    text: test 2
          - component: f7-col
            slots:
              default:
                - component: f7-button
                  config:
                    text: test 3

I am very grateful for any tip.

Many greetings
Torsten

Looks like a simple typo to me. should be props instead of probs.

Oh no, I’m such an idiot. Now it works. Thanks for the help