Avec le bout de script ci dessous qui fonctionne :
je voudrais pouvoir sortir une valeur x10elseif command == 'Tv' then
local text = get(deviceValue, 2):gsub("%W", ""):lower()
local value = get(deviceValue, 3)
for Tv,words in pairs(Tv) do
for word in words:gmatch("%w+") do
if text == word then
commandArray[Tv] = 'Set Level: ' .. value
end
end
end
j'ai essayé ça mais ça ne fonctionne pas ???
elseif command == 'Tv' then
local text = get(deviceValue, 2):gsub("%W", ""):lower()
local value = get(deviceValue, 3)
for Tv,words in pairs(Tv) do
for word in words:gmatch("%w+") do
if text == word then
local chaine = Tv
if (tonumber(chaine) < 10) then
local chaine = chaine *10
commandArray[Tv] = 'Set Level: ' .. chaine
elseif chaine > 9 then
local chaine = chaine + 20
commandArray[Tv] = 'Set Level: ' .. chaine
end
end
end