OH3: Chart of Switch item not showing with influxdb

I created an item with type=Switch, updated the influxdb persistence file accordingly for logging.
The status for the item is displayed in the dashboard with OFF/ON and can be changed with a simple sitemap switch.
The values are correct written in the influxdb database as 0 and 1 values (0=OFF,1=ON). Checked with influx program.

Problem:
When looking at the item in openHAB dashboard, via the Analyze button the graph is empty without vertical axis. Timing axis is available.
The chart in the sitemap shows a constant line on 0.

Kind regards, Hans

It has been reported a few times here on the forum that InfluxDB is not properly saving and retrieving Switch and Contact states. Hopefully someone has filed an issue on the binding over at the openhab-addons repo.

OK. Thanks.

There is a fix for this behaviour in openHAB 3.1 Milestone.

To test, I changed the branch in openHAB config to main, and did the Upgrade System.
But, my version is not changed from 3.0.1
Do I have to do something else to upgrade?

I’ve no idea. I don’t use InfluxDB any more and I only partially follow the threads here on the forum.

Milestone releases are still pre-release development versions.

I’ve got this OH3.1 and the issue is still here, Switch ON/OFF become NaN in the Page Charts:

openHAB Distribution Version Information
----------------------------------------
build-no        : Release Build
online-repo     : https://openhab.jfrog.io/openhab/libs-release

Repository        Version
----------------------------------------
openhab-distro  : 3.1.1
openhab-core    : 3.1.1
openhab-addons  : 3.1.1
karaf           : 4.3.2

Any pointers please?