I have two temperature sensors (DS18B20) both sending temperature to domoticz and both are visible as xx.x C.
I made script which read temperature value from both sensor, counting average and change other domoticz device value and.... i have problem
average temperature is visible as xx.xxxxxxxxxxxx C (yes, it has 12 digits after dot), is it possible to change?
its part of code
Code: Select all
local Temp_100_1 = domoticz.devices('Temperatura_1').temperature this device have format xx.x C
local Temp_100_2 = domoticz.devices('Temperatura_2').temperature this device have format xx.x C
local Temp_100 = (Temp_100_1+Temp_100_2)/2
domoticz.devices('Temperatura').updateTemperature(Temp_100) but this device have format xx.xxxxxxxxxxxx C