Hi,
I have an installation with JSON/REST values of a heating system…unfortunately the values of “Puffer State” come in as float with a DOT instead of COMMA…in presenting the values in GUI its no problem as it is interpreted as String I guess…at least its perfectly shown there…like 77.9%…but if I take now this item to build rules…like if Pufferstate <75 it does not react…and i’m pretty sure its because the 77.9 is not interpreted as 77,9…
Any suggestions? It would be hard to change the transmitted values already,…is there a way to do this locally at openhab instance?
thanks for your feedback! I already realized that anyhow my heating system provides “DOT”…so it should work.
The strange thing is that I changed the transmission from external push to pull (xsl) and by doing so it changed the format from “integer” to float (below)…and now a working rule does not react anymore…please have a look at the rule, maybe you find the problem…(is a 25.0 required instead of 25?)
2017-01-05 16:58:03 - PufferState state updated to 68.8
2017-01-05 17:08:03 - PufferState state updated to 68.2
2017-01-05 17:18:03 - PufferState state updated to 67.4
2017-01-05 17:28:04 - PufferState state updated to 66.8
2017-01-05 17:38:04 - PufferState state updated to 66.4
2017-01-05 17:48:04 - PufferState state updated to 66
rule "ETA LowState - Logger"
when
Item PufferState received command
then
if (PufferState.state < 25 && ETA_low.state==OFF) {
ETA_low.sendCommand(ON)
sendMail(“xxxxxxxxxxxx”, "PSC-1000 is LOW reaching " + PufferState.state + “%”, “—EoM—”)
}
else
if (PufferState.state > 29 && ETA_low.state==ON) { ETA_low.sendCommand(OFF) }
end
I see what you mean…frankly speaking i never exactly got when to use command/update…as this rule worked before when sending the updates via http direct push (/rest/items,…), it looks like as if via xsl it requires an update instead of command. will change and see if it works…thanks for your very fast support!