In Widget actionModalConfig Items auswählen

Einrichtung der openHAB Umgebung und allgemeine Konfigurationsthemen.

Moderatoren: seppy, udo1toni

Antworten
Benutzeravatar
lenschith
Beiträge: 313
Registriert: 11. Dez 2020 22:36
Answers: 0

In Widget actionModalConfig Items auswählen

Beitrag von lenschith »

Hallo zusammen,
ich versuche mich gerade an einem Widget für eine Kamerasteuerung. Das Widget selbst funktioniert. Jetzt möchte ich dieses Widget über ein andres aufrufen und in der Config die Modal, also die Items der Steuerung mitgeben. Ich hab viel gelesen und probiert aber ich bekomme das nicht hin. Hat jemand einen Tipp wie ich das umsetzten muss.

PTZ Control Widget:

Code: Alles auswählen

uid: ptz_camera_control
tags: []
props:
  parameters:
    - context: item
      description: PTZ-Steuerung nach oben
      label: Kamera nach oben
      name: ptz_up
      required: true
      type: TEXT
    - context: item
      description: PTZ-Steuerung nach rechts
      label: Kamera nach rechts
      name: ptz_right
      required: true
      type: TEXT
    - context: item
      description: PTZ-Steuerung nach unten
      label: Kamera nach unten
      name: ptz_down
      required: true
      type: TEXT
    - context: item
      description: PTZ-Steuerung nach links
      label: Kamera nach links
      name: ptz_left
      required: true
      type: TEXT
timestamp: Nov 24, 2024, 11:06:52 AM
component: f7-card
config:
  noBorder: true
  noShadow: true
  outline: false
  style:
    padding: 0
    background-color: transparent
    width: auto
    height: auto
slots:
  default:
    - component: f7-block
      config:
        style:
          display: flex
          justify-content: center
          align-items: center
          width: 150px
          height: 150px
          border-radius: 50%
          background-color: "#e0e0e0"
          position: relative
      slots:
        default:
          - component: oh-button
            config:
              iconF7: arrow_up
              action: command
              actionCommand: MOVE_UP
              actionItem: =props.ptz_up
              style:
                position: absolute
                top: 10px
          - component: oh-button
            config:
              iconF7: arrow_right
              action: command
              actionCommand: MOVE_RIGHT
              actionItem: =props.ptz_right
              style:
                position: absolute
                right: 10px
          - component: oh-button
            config:
              iconF7: arrow_down
              action: command
              actionCommand: MOVE_DOWN
              actionItem: =props.ptz_down
              style:
                position: absolute
                bottom: 10px
          - component: oh-button
            config:
              iconF7: arrow_left
              action: command
              actionCommand: MOVE_LEFT
              actionItem: =props.ptz_left
              style:
                position: absolute
                left: 10px
Videoanzeige Widget:
Parameter Setting:

Code: Alles auswählen

  parameterGroups:
    - name: action
      context: action
      label: Kachelaction
      description: Action die ausgeführt wird.
Wie muss ich das hier im oh-link konfigurieren. Ich kann in Action Popover auswählen, dann das Widget, aber leider hab ich keine Item Auswahl bei Modal component configuration. Was muss ich denn tun damit ich das machen kann.

Code: Alles auswählen

          - component: oh-link
            config:
              actionPropsParameterGroup: action
              iconF7: =props.settingsicon
              iconSize: 30
              style:
                color: =props.settingsiconcolor
                opacity: 0.7
                position: absolute
                right: 1.5rem
                top: 1.5rem
              visible: "=props.settings ? true : false"
Ich hoffe das man das versteht.
Gruß Lenschi
openHAB4.3.3 in einem Docker Container auf RPI5-8GB, AVM: Fritz!Box 7590 - SMART301/302 - Comet, SMART200/210, SMART440, Alexa, Shelly, Tasmota, ESP Easy, WLED

Antworten