Action popup on complete card consisting list items

Dear Community,

i’m trieng to achieve a custom widget showing several (two) OH items in a list view by the means of dynamic icons.
The card is supposed as an overview of the most important items of a equipment/thing.
Clicking on the card shall open a popup with a more detailed view.

I already succeded to show two items in a list, which took me as a beginner of this YAML/f7 stuff already some while. Now i have two additional requirements, which i could not solve for me even after searching this froum back and forth + reading the evolving docs of the new main UI.

  1. Clicking anywhere on the card shall open the same modal popup.

  2. How i can i hide e.g. surpress the state of the OH item to be shown on the card. Basically i only want to use the dynamic icon as the representation of the items state. In sitemap days, this was possible by adding an empty opening/closing bracket to the label: “[ ]”.

Can somebody please help me to direct me in the right direction?

Thanks
Henning

uid: widget_Overview
tags: []
props:
  parameters:
    - description: A text prop
      label: Prop 1
      name: prop1
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item1
      name: item1
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item2
      name: item2
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Feb 8, 2021, 8:25:48 AM
component: oh-list-card
config:
  mediaList: false
  simpleList: false
  accordionList: false
  title: Overview
slots:
  default:
    - component: oh-label-item
      config:
        item: =props.item1
        visible: true
        title: Status Pump
        icon: oh:green_led
        iconUseState: true
    - component: oh-label-item
      config:
        item: =props.item2
        title: Alarm
        icon: oh:red_led
        iconUseState: true

After more reading here in the forum incl. trial and error, I’m able to come up with a solution for my own problem.

The widget can be configured with two items, icons and labels. By using as the component oh-list-item no value/state of a item is shown.

The list for the list items i have placed inside the f7-card-content and the desired one link (action) inside another component (oh-link) under the same slot.

There are also other parameters which can be configured: title, background image and font color.

One thing which is not working for me, and maybe here somebody can help, is that if i put the widget on a page and configure the Action to popup a second widget, i can’t set any component properties of the second widget after clicking “Modal component configuration”. It just shows a empty dialog “Set Component Props” - see the pictures below:

grafik

grafik

Here is the YAML of the first widget:

uid: twoItemList_OneAction
tags: []
props:
  parameters:
    - description: Set the title of the widget
      label: Set the title of the widget
      name: title
      required: false
      type: TEXT
      groupName: general
    - description: URL to the background image
      label: URL (local or extern) to background image for widget
      name: urlBackImage
      required: false
      type: TEXT
      groupName: general
    - description: Overwrite the global font-color as rgb (<u>default:</u> <b>0,0,0<b>)
      label: Font color (rgb)
      name: fontColor
      required: false
      type: TEXT
      groupName: general
    - context: item
      description: An item to control
      label: Item1
      name: item1
      required: false
      type: TEXT
      groupName: configItem1
    - description: Set Title of the item
      label: Title for Item1
      name: title1
      required: false
      type: TEXT
      groupName: configItem1
    - description: Set Icon shown for the Item
      label: Icon name for item1
      name: icon1
      required: false
      type: TEXT
      groupName: configItem1
    - context: item
      description: An item to control
      label: Item2
      name: item2
      required: false
      type: TEXT
      groupName: configItem2
    - description: Set Title of the item
      label: Title for Item2
      name: title2
      required: false
      type: TEXT
      groupName: configItem2
    - description: Set Icon shown for the Item
      label: Icon name for item2
      name: icon2
      required: false
      type: TEXT
      groupName: configItem2
  parameterGroups:
    - name: general
      label: General settings for the widget
      description: Set custom background image, text color etc.
    - name: configItem1
      label: Settings for Item 1
      description: Set item, icon and title of the item
    - name: configItem2
      label: Settings for Item 2
      description: Set item, icon and title of the item
    - name: widgetAction
      context: action
      label: Action
      description: Action to perform once the card is clicked
timestamp: Feb 28, 2021, 8:41:32 AM
component: f7-card
config:
  class:
    - padding
  title: =props.title
  style:
    overflow: hidden
    border-radius: 20px
    background-image: ="url('"+props.urlBackImage+"')"
    background-repeat: no-repeat
    background-position: center
    background-size: cover
    --pool-card-text-color: "=(!props.fontColor) ? '0,0,0' : props.fontColor"
    color: rgb(var(--pool-card-text-color))
slots:
  default:
    - component: f7-card-content
      slots:
        default:
          - component: f7-list
            config:
              mediaList: false
            slots:
              default:
                - component: oh-list-item
                  config:
                    item: =props.item1
                    title: =props.title1
                    icon: =props.icon1
                - component: oh-list-item
                  config:
                    item: =props.item2
                    title: =props.title2
                    icon: =props.icon2
    - component: oh-link
      config:
        actionPropsParameterGroup: widgetAction
        style:
          position: absolute
          top: 0px
          width: 100%
          height: 100%

and here for the second widget:

uid: SecondWidget
tags: []
props:
  parameters:
    - description: A text prop
      label: Prop 1
      name: prop1
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Feb 28, 2021, 9:06:54 AM
component: f7-card
config:
  title: '=(props.item) ? "State of " + props.item : "Set props to test!"'
  footer: =props.prop1
  content: =items[props.item].displayState || items[props.item].state

Is this not working in general or am i doing something wrong here?

thanks
Henning

I am having trouble at the exact same thing, the Modal component configuration is empty when I use the actionPropsParameterGroup in a custom widget and want to open a popup. Is there an update on this topic?

Did you find a solution, Henning?

thanks
Sebastian