I’m trying to operate a Thermostat radiator valve TV02-Zigbee with a separate Temperature & humidity sensor WSD500A.
In my scene I’m using “Set device value” with “computed” value.
For debugging I’m sending all values via Telegram. All input values look correct.
In the Zigbee2mqtt log I see 2 messages to the Thermostat with current_heating_setpoint (only copied the current_heating_setpoint part here):
1st message: “current_heating_setpoint”:16.920000000000005
2nd message: “current_heating_setpoint”:-145960468.4
Looking at the 1st message shows that calculating the value is working fine.
However for some reason there is a second message sending a scrambled value to the Thermostat.
Using “Set device value” with simple mode does also result in 2 messages.
After some trials it looks like values with 2 and more digits after the decimal point result in the scrambled values in the 2nd message.
Looks like a proper rounding could solve the issue.
Is there a rounding mechanism available in the “computed” field?
What maths capabilities does the “computed” field provide?