definitely couse of my lack of skills so hoping for your help
so i have a virtual percentage device setup called "wtw filter levensduur (9mnd)" idx = 10526
9 months = 9 x 30 x 24 = 6480 hours
i receive a filter counter called "itho filter teller" in hours
so this is one version i have tried:(of many unsuccessfull)
Code: Select all
local itho_filter_teller = tonumber(otherdevices_svalues['itho filter teller'])
commandArray = {}
if devicechanged['itho filter teller'] then
percentage = itho_filter_teller / 6480
commandArray['UpdateDevice']='10526|0|..percentage'
end
return commandArray
what do i need to change to get this working?