I have this little script for updating two custom sensors. But when I run it only one, the last, custom sensor is updated. Can someone give me a hint how to solve this?
Code: Select all
-- Testscript (device)
now=os.time()
tijd=(os.date("%X", now))
windspeed = 363
windforce = 364
commandArray = {}
if devicechanged['Visite']
then
commandArray['UpdateDevice'] = windspeed..'|0|'..tostring(50)
commandArray['UpdateDevice'] = windforce..'|0|'..tostring(7)
end
return commandArray
Rob