timer + variable

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

Moderator: leecollings

Post Reply
TheCondor
Posts: 78
Joined: Thursday 18 June 2015 10:32
Target OS: Linux
Domoticz version:
Contact:

timer + variable

Post by TheCondor »

Hello, i've currently a script triggered at 7.45 during mon-sat and at 8.45 on sunday. I've found a script here on the forum for set a variable (string) with the info if today is a working day or a bank-holiday and i want to let use my blind script that variable info.
The actual trigger is that:

Code: Select all

   on = {
        timer = {
            'at 22:30',
            'at 7:45 on mon,tue,wed,thu,fri,sat',
            'at 8:45 on sun'
   },

its possible to use in conjunction in this way?

Code: Select all

   on = {
        timer = {
            'at 22:30',
            'at 7:45 on (day == working_day),
            'at 8:45 on (day == holiday)'
   },
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: timer + variable

Post by dannybloe »

No, that is not possible.You'll have to test it 'manually'.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: timer + variable

Post by maluko »

hi ,

i can use like me.

I have at my google calendary all day off/holidays marked like any word i want, like "holiday" , at my android phone i have the tasker app that scan the calendary if the word "holiday" are there each day.
at midnight of holiday the tasker send the json http to domoticz switch.
if this domoticz switch is on, goes disable the scene that open my blind everyday by blockly rule.
the day after holiday goes back normal with another tasker rules
TheCondor
Posts: 78
Joined: Thursday 18 June 2015 10:32
Target OS: Linux
Domoticz version:
Contact:

Re: timer + variable

Post by TheCondor »

Hi, thanks both for the answer.
I ended with a double check directly in the script:

I set ON timer for all the three hours, after i check for the variable = working + time.hour = 7
or
Variable = holiday + time.hour =8

It's not optimal.... Anyway it works fine since some days...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests