Umrechnen

Hallo und guten Abend,

ich habe openHAB um KNX/HUE/HomeMatic/Netatmo in einer gemeinsamen Oberfläche zusammenzuführen. Viele Komponenten sind Batterie betrieben. Bei Netatmo wird der Batteriestatus in 0-100% angegeben, was durchaus sinnvoll ist. Aus Homematic bekommt man nur die Restspannung (0-3.2V). Ich möchte gerne den tatsächlichen Status haben (in Prozent), um entsprechende Symbole darzustellen. Ich habe inzwischen viel gefunden und gelöst, aber nicht, wie ich in openHab umrechnen kann.
Ich möchte gerne 3.2V als 100% und z.B. 2.8V als 0% darstellen.
Bitte um Unterstützung.

Grüße zu Ostern,

Hans-Gerd

Please use the german forum if you want to communicate in german language …

Thanks for the info and sorry.
So i try to explain my problem in english:
Many components of homematic use batteries. Also the components from Netatmo weather station.
The values (battery health) from Netatmo are 0% - 100%. The values from homematic are in volts (max. 3.2V). Is there a way to “translate” Volts to percent? e.g. 3.2V = 100% - 2.8V = 0%?
The reason for my question is, that I have a group “maintenance” and all batteries are shown. Now I want to use a dynamic batterie symbol.

Please help.

best regards
Hans-Gerd

I think the transformations are what you searched for. In this case javaScript ts should last. If I recall correctly there are a few examples in this forum