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
Parameter Setting:
Code: Alles auswählen
parameterGroups:
- name: action
context: action
label: Kachelaction
description: Action die ausgeführt wird.
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"
Gruß Lenschi