commandArray = {} stan = tostring (otherdevices['Burze - Ostrzeżenie o upale']) info=string.gsub (tostring(stan), " ", "+") if (info == 'Brak+ostrzeżeń') then info = 'Brak%20ostrze%C5%BCe%C5%84' end if (otherdevices['Burze - Ostrzeżenie o upale'] ~= 'Brak ostrzeżeń' and uservariables["upał"] == 0) then os.execute ('curl "https://platform.clickatell.com/messages/http/send?apiKey=API&to=TEL&content=Alert+z+domu:+"'..info) commandArray['Variable:upał'] = '1' print "SMS z alertem wysłany - upał" print (info) elseif (otherdevices['Burze - Ostrzeżenie o upale'] == 'Brak ostrzeżeń' and uservariables["upał"] == 1) then os.execute ('curl "https://platform.clickatell.com/messages/http/send?apiKey=API&to=TEL&content=Alert+o+upale:+"'..info) commandArray['Variable:upał'] = '0' print "SMS z alertem wysłany - odwołano alert przed upałem" end return commandArray