Change rwe switch from "ON" to "1"

Hi, I’m using the RWE binding and I want to plot the status of a switch using Habmin. The switch generates an output "ON/OFF’. I can plot many sensor values, but not the ‘value’ of the switch. I would like to change the value from ‘ON/OFF’ to ‘1/0’ so I can plot it on the secondary axis of my graph. (Or does anybody else have a suggestion how to do this in an other way?)

In my rwesmarthome.items I have defined the switch:

Switch	rweSwitchTest	"Switch TEST"	<switch>	(rwe) {rwe="id=1794ddb9-aadb-4e36-bd17-33f43bc2c21f,param=switch"}

No I think I have to create a file in my transform folder and refere to this file in the item definition above. But how...?

Edit: ok,  it's too late.  I can simply solve this with a rule.  Don't know ow why I've been looking into the transform direction.  Time to go to sleep

Typically 1/0 is how ON/OFF is stored in the database in the first place. Are you sure you have the scale of your secondary axis set right? Have you tried to chart is by itself?

I have a couple of Switches that I chart and it works just fine, though I’m not using Habmin.

When you said that you can chart many sensor values that implies that you have persistence configured and working. So you just need to add your Switch to persistence just like those Items.

See the following for documentation.

OK, some strange behavior…
When I plot the switch using HABpanel the value indeed changes from 1 to 0 and back.

However, when I plot the same swith using Habmin I get nothing in my graph. It’s empty.
I will read some moe about Habmin, seems like I’m having an issue there.