Hello,
I created below widgets to display three time series. For the 1st and 2nd series I can use props
to assign the items.
However, for the 3rd it doesn’t work when props prop_item_Ventil
is used - which seems to be related to the oh-mark-area
- component: oh-time-series
config:
gridIndex: 1
item: item_Hm_Thermostat_Wohnzimmer_10_STATE
name: Ventil
service: rrd4j
type: line
xAxisIndex: 1
yAxisIndex: 1
slots:
markArea:
- component: oh-mark-area
config:
item: item_Hm_Thermostat_Wohnzimmer_10_STATE
The chart is only updated with the correct data, if the item is “hardcoded” in the widget.
Any idea?
Below is the full widget code:
uid: widget_Thermostat_Chart
tags: []
props:
parameters:
- description: Zimmer
label: Zimmer
name: prop_Zimmer_Name
required: false
type: TEXT
- context: item
description: Aktuelle Temperatur Thermostat
label: Item Thermostat Ist Temperatur
name: prop_item_Temp_Ist
required: true
type: TEXT
- context: item
description: Soll Temperatur Thermostat
label: Item Thermostat Soll Temperatur
name: prop_item_Temp_Soll
required: true
type: TEXT
- context: item
description: Ventil Zustand
label: Item_Ventil
name: prop_item_Ventil
required: true
type: TEXT
parameterGroups: []
timestamp: Feb 18, 2023, 6:56:20 PM
component: f7-card
config:
backdrop: false
class:
- no-padding
expandable: false
style:
--f7-theme-color: var(--f7-text-color)
border-radius: var(--f7-card-expandable-border-radius)
box-shadow: var(--f7-card-expandable-box-shadow)
height: 200px
margin-bottom: 10px
margin-left: 5px
margin-right: 5px
margin-top: 10px
width: auto
swipeToClose: false
slots:
default:
- component: Label
config:
style:
color: lightgrey
font-size: 16px
margin-left: 65px
margin-top: 10px
position: absolute
z-index: 1
text: =props.prop_Zimmer_Name
- component: oh-chart
config:
chartType: day
label: Thermostat Wohnzimmer
period: 12h
sidebar: false
slots:
grid:
- component: oh-chart-grid
config:
height: "80"
left: 66
right: 40
show: false
top: "60"
- component: oh-chart-grid
config:
containLabel: true
height: "40"
left: 40
right: 40
show: false
top: "150"
legend:
- component: oh-chart-legend
config:
left: 60
orient: horizontal
show: true
top: 32
series:
- component: oh-time-series
config:
areaStyle:
opacity: 0.2
gridIndex: 0
item: =props.prop_item_Temp_Ist
markPoint:
label:
backgroundColor: auto
name: Ist Temp
service: rrd4j
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
gridIndex: 0
item: =props.prop_item_Ventil
name: Soll Temp
service: rrd4j
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
gridIndex: 1
item: item_Hm_Thermostat_Wohnzimmer_10_STATE
name: Ventil
service: rrd4j
type: line
xAxisIndex: 1
yAxisIndex: 1
slots:
markArea:
- component: oh-mark-area
config:
item: item_Hm_Thermostat_Wohnzimmer_10_STATE
toolbox:
- component: oh-chart-toolbox
config:
show: false
tooltip:
- component: oh-chart-tooltip
config:
orient: horizontal
show: true
xAxis:
- component: oh-time-axis
config:
gridIndex: 0
show: false
- component: oh-time-axis
config:
gridIndex: 1
yAxis:
- component: oh-value-axis
config:
axisLabel:
formatter: "{value} °C"
gridIndex: 0
scale: true
splitNumber: 3
- component: oh-value-axis
config:
gridIndex: 1
max: "1"
min: "0"
show: false
Seems this is similar issue reported in https://community.openhab.org/t/no-expressions-in-units-name-in-oh-chart-components/144753