Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget: Item from props cannot be resolved for oh-aggregate-series #1295

Closed
eric1905 opened this issue Feb 2, 2022 · 2 comments · Fixed by #1649
Closed

Widget: Item from props cannot be resolved for oh-aggregate-series #1295

eric1905 opened this issue Feb 2, 2022 · 2 comments · Fixed by #1649

Comments

@eric1905
Copy link

eric1905 commented Feb 2, 2022

I want to create a bar chart which can be used in multiple pages.
Therefore I use the oh-aggregate-series.
The item can be defined in the props section, but this item is not evaluated in the widget code, so currently it is only possible to create one widget per item and it is not possible to create only one widget and set the item via the props section:

`
props:
parameters:
- context: item
description: Main toggle item (use for single toggle or as main switch for group)
label: Item
name: item
required: false
type: TEXT

...

                series:
                  - component: oh-aggregate-series
                    config:
                      name: Stromverbrauch
                      gridIndex: 0
                      xAxisIndex: 0
                      yAxisIndex: 0
                      type: bar
                      item: =props.item
                      dimension1: hour

`

It is described in this thread: https://community.openhab.org/t/custom-widget-item-defined-in-property-not-shown/132707/7?u=eric1905

@marianorenzi
Copy link

Same for charting switches:

    - component: oh-time-series
      config:
        name: Light
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: line
        areaStyle: {}
      slots:
        markArea:
          - component: oh-mark-area
            config:
              name: Light
              item: =props.light_item

@ReachyBayern
Copy link

Is there already a plan to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants