Hi Stuart
It is a command and no sensor. So that isn’t part of the problem. I just lack the skills to format 24.3 into a 24, without the decimal.
Thanks anyway
Richard
Hi Stuart
It is a command and no sensor. So that isn’t part of the problem. I just lack the skills to format 24.3 into a 24, without the decimal.
Thanks anyway
Richard
There are few ways of doing this. Pehaps the simplest would be to write:
execute.command("250_02_C_DL_PM",String.format("%.0f",correctedValue));
Or
execute.command("250_02_C_DL_PM",String.format("%d",int(correctedValue)));
Yeah.
The first one worked!
Thank you very much
For reference, this works:
rule “AAA”
when
CustomState (source == “010_00_SE_TST_WnkmrSchuifpui”, $v : value);
then
double correctedValue1 = Double.parseDouble($v.toString());
double correctedValue = (correctedValue1/1) * 1;
execute.command(“250_02_C_DL_PM”,String.format("%.0f",correctedValue));
System.out.println(correctedValue);
end
where:
010_00_SE_TST_WnkmrSchuifpui is a sensor of temperaturesensor of a velbus button
250_02_C_DL_PM is a dimmer_level command
I will continue to adjust it to really use it, but this is method to work with it.
Richard