While migrating application scripts from HS2 to HS4 4.2.7.0 (HomeTroller HS4 Pro/Windows 10 Pro), I have observed that when device double precision values are returned to a script using hs.DeviceValueEx(), the values are rounded at the 3rd decimal point. e.g. the device detail display will show the value as 1.54138886928558, and the status as 1.541389 Hours (6 decimal places as configured, with Hours as the suffix).
However, when the midnight history snapshot script runs, this value is returned by hs.DeviceValueEx() as 1.541.
I have tested values like 1.23456789, this would be returned as 1.235 (rounded up at the 3rd decimal point).
The test values were formated both with Format() and CStr(), both yielding the same result, rounding at the 3rd decimal point.
hs.SetDeviceValueByRef() seems to take any specified double precision value and deposit it in the device,
As I never went through the HS3 cycle, I don't know if this is a known phenomena
TIA
Best Regards
However, when the midnight history snapshot script runs, this value is returned by hs.DeviceValueEx() as 1.541.
I have tested values like 1.23456789, this would be returned as 1.235 (rounded up at the 3rd decimal point).
The test values were formated both with Format() and CStr(), both yielding the same result, rounding at the 3rd decimal point.
hs.SetDeviceValueByRef() seems to take any specified double precision value and deposit it in the device,
As I never went through the HS3 cycle, I don't know if this is a known phenomena
TIA
Best Regards
Comment