return { on = { timer = { 'every 10 minutes' }, httpResponses = { 'NBPEUR' } }, execute = function(domoticz, item) if (item.isTimer) then domoticz.openURL({ url = 'http://api.nbp.pl/api/exchangerates/rates/a/eur?format=json', method = 'GET', callback = 'NBPEUR' }) end if (item.isHTTPResponse and item.ok) then domoticz.devices('Kurs EUR').updateCustomSensor(item.json.rates[1]['mid']) end end }