I need a little help with a simple exercise. I would like to rewrite a value from a virtual dimmer to a percentage display. How I'm trying to do that:
Code: Select all
local iDimmer = tonumber (otherdevices['Dimmer']) --Input
local qDimmer = 'Percent' --Output
commandArray = {}
--I'v tried:
qDimmer = iDimmer
--And like that
commandArray[qDimmer] = tonumber(iDimmer)
return commandArray
I'm learning LUA, I understand how to read a value from devices but I don't know how to write values for example to a virtual indicators :/
Is there any tutorial about that? I'm trying to google that but without luck...