MriX
(Maximilian)
1
I extract trough a RegEx and the HTTP Binding the temperature outside. Now I want to save this value in a Number.
But I get this error:
2017-02-09 19:24:05.086 [DEBUG] [ab.binding.http.internal.HttpBinding] - Couldn't create state for item 'temp' from string '-1,1'
How do I “convert” this String in a Number?
AndrewZ
(Andrew)
2
Please see my example.
Controller returns something like 21.1 C
This is the item I use:
Number TemperatureOffice "Ambient Temperature [%.1f °C]" <temperature> (Temperatures) { http="<[http://192.168.X.X/gett1.cgi:60000:REGEX(.*?(\\d+\\.\\d).*)]" }
MriX
(Maximilian)
3
My problem is that there is a comma in the answer: -1,1
So I think openHAB cannot convert this in a Number
AndrewZ
(Andrew)
4
Then you can use JS transform instead of REGEX in the item configuration.