return { on = { devices = {'Reg-Pokojowy'} }, logging = { level = domoticz.LOG_DEBUG, marker = 'Grupa termostat', }, execute = function(dz, devices ) if (devices.state == 'On') then dz.groups('Nazwa Grupy').switchOn() else dz.groups('Nazwa Grupy').switchOff() end end }