Text to value mapping

Hi,

I have a window sensor in my smarthome. To manage the smarthome I use openHAB + influxDB + Grafana on a raspPI.
InfluxDB shows values like ‘open’ and ‘closed’ for the different window-states.
Since influxDB shows ‘only’ ‘open’ or ‘closed’ I cannot use these values to create metrics in Grafana.
I need values like 0 (for closed) and 1 (for open) to create the metrics and finally a graph.
Is there any text to value mapping in openHAB? How can I solve this issue?

Thanks for ay help…

This the graph I get after entering a door in the metrics
The status is OPEN or CLOSED

I have disabled the Y scale but CLOSED is 0 and OPEN is 1

No transformation necessary

Hi,

this looks nice - but I do not understand how you did it.

Could you show the metrics as well and the axes settings please?

Thanks…

1 Like

Hi,

I tried same metrics but could not get anything shown on the graph:

What I am missing?

I don’t know young man. It just works for me. I haven’t done anything.

Does anybody else have an idea how to get those values tracked?