Closed vthawkeye closed 4 years ago
I found line 285 in util/OpenHAB.js has a regular expression:
let matchedValue = value.match(/^\d+((\.|,)\d*)*/i)
I updated the regex in that line to:
let matchedValue = value.match(/^\d+(?:[\.,]\d*)?(?:[eE][\+\-]\d+)?/i)
To match the digits and possibly the scientific notation. That appears to allow the number to be recognized.
Hope that helps
My latest commit (a5d21ecd10a76dae913c7e40a15baf5f7c22578d) supports scientifically notated numbers. Track the official npm releases if you cannot test directly from Github's source.
Describe the bug Thermostat shows wrong temperature when multiple of 10 and a Number:Temperature type. It will display 7 instead of 70. This is because Openhab's rest interface returns: "7E+1 °F". I'm unsure if it affects just Number types.
Expected behavior The temperature should be correct, in the above example it should be 70 and not 7.
Configurations Homebridge:
Openhab item: