return {
    active = true,

    on = {
        timer = { 'every minute' } -- Check every minute
    },

    logging = {
        level = domoticz.LOG_INFO,
        marker = "AWTRIX3_GARAGE_DOOR"
    },

    execute = function(domoticz)
        local garageDoor = domoticz.devices('Garage door')

        -- Check if the garage door is open and has been open for more than 10 minutes
        if garageDoor.state == 'Open' and garageDoor.lastUpdate.minutesAgo > 10 then
            domoticz.log('Garage door has been open for more than 10 minutes!', domoticz.LOG_WARNING)

            -- Prepare JSON payload for AWTRIX3
            local payload = {
                text = "Garage OPEN!",
                icon = 50087
            }
            local payloadJSON = domoticz.utils.toJSON(payload)

            domoticz.log("Sending to AWTRIX3: " .. payloadJSON, domoticz.LOG_INFO)

            -- Send the JSON to the AWTRIX3 device
            local awtrixDevice = domoticz.devices('AWTRIX3 - Send Notification')
            if awtrixDevice then
                awtrixDevice.setDescription(payloadJSON)
                awtrixDevice.switchOn().afterSec(2)
            else
                domoticz.log("AWTRIX3 - Send Notification device not found", domoticz.LOG_ERROR)
            end

            -- Optional: Notify via Domoticz app or email
            domoticz.notify(
                'Garage Door Alert',
                'The garage door has been open for more than 10 minutes!',
                domoticz.PRIORITY_HIGH
            )
        end
    end
}