Duddits
(Holger)
May 3, 2020, 3:55pm
1
Hi all,
I work now for two weeks with openHAB and most things are working. But in one frame there are two problems
Frame label="Meßwerte" {
Text item=Rasenfeuchtigkeit
Text item=Rasentemperatur
Switch item=rasenChartPeriod label="Chart Periode" mappings=[0="Aus",1="2 Tage",2="Woche",3="Monat"]
Webview height=10 url="http://server1:8080/static/rasen2d.html"
}
The result is:
Why are there only two states for rasenChartPeriod?
The “broken” image seems to come from the Webview item. When I define a valid icon it works but I do not want to have one at all. I saw several tutorials for usage of Grafana charts in openHAB by Webview and they all seem not to have one. Do you know what happens?
Best regards
Duddits
The openHAB answer is because that is what Grafan is sending.
Perhaps a Grafana forum can help you debug Grafana.
Duddits
(Holger)
May 3, 2020, 3:59pm
3
Hi, Grafana does exactly that what I expect. The Problem with icon and switch item comes from openHAB
Best regards
Duddits
rossko57
(Rossko57)
May 3, 2020, 4:54pm
4
Duddits:
rasenChartPeriod
What type of Item is that?
I can’t see anything obvious wrong with your mappings.
Try icon="none"
Duddits
(Holger)
May 3, 2020, 5:53pm
5
@rossko57 : Thanks a lot!
I defined rasenChartPeriod as a Number. After reading your reply I changed this to String - it’s working.
Also your hint re icon is working!
Best regards
Duddits
rossko57
(Rossko57)
May 3, 2020, 6:05pm
6
It should work as Number too, perhaps something else was amiss with your definition.
This works for me and it is Number type Item -
Switch item=nm_chart_period label="chart period []" mappings=[0="Day", 1="Week", 2="Month", 3="Year"]