Passing timer value

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
gschmidt
Posts: 200
Joined: Thursday 20 December 2018 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Passing timer value

Post by gschmidt »

Hi,

2 dzVents questions:

1. Is it possible to get the Timer value e.g 'at 06:45 on mon,tue,wed,thu,fri', to use in the dz.log notification?
2. Is it possible to get the same Timer value in the dz.log of another dzVents script?

This is my current code:

Code: Select all

return 
{
    on = 
    {
        timer = 
        {
            'at 06:45 on mon,tue,wed,thu,fri',
        },
    },

    logging = 
    {
        level = domoticz.LOG_DEBUG,
        marker = 'alarming',
    },

    execute = function(dz)
        if dz.devices('Wekker Faye-Linn').active then 
            dz.devices('Wekker Radio Faye-Linn').switchOn()
            dz.log('Wekker is gezet voor doordeweekse dagen om 06:45',dz.LOG_DEBUG)
        else
            dz.log('Geen wekker nodig vandaag!',dz.LOG_DEBUG)
        end
    end
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest