Hi to all,
i want to set an event for notify me when time to work is over 30 minutes.
i have made this blocky and work fine but at every time the script "time to work" run and the result is over 30 minutes i receive a notification!
how can i set "IF time to work > 30" from 7:30 to 8:30 send ONLY ONE TIME a notifications...." ?
Thx!
Blocky One Time Only
Moderator: leecollings
-
pvm
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Blocky One Time Only
Can you use a user variable or dummy switch to monitor whether you've already send the message
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
-
tozzke
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blocky One Time Only
add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:
This way the notification wil only be sent once because the if-statement is no longer true after it triggers
Something like:
Code: Select all
If [your if now] and [[var time_to_work_notification_sent?] = ["no"]]
Do [Set [var time_to_work_notification_sent?] = ["yes"]]
[Send notification...]
Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"]
Do [Set [var time_to_work_notification_sent?] = ["no"]]
Blocky One Time Only
Can you explain how can i use user variables for this target?pvm wrote:Can you use a user variable or dummy switch to monitor whether you've already send the message
Re: Blocky One Time Only
tozzke wrote:add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:This way the notification wil only be sent once because the if-statement is no longer true after it triggersCode: Select all
If [your if now] and [[var time_to_work_notification_sent?] = ["no"]] Do [Set [var time_to_work_notification_sent?] = ["yes"]] [Send notification...] Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"] Do [Set [var time_to_work_notification_sent?] = ["no"]]
Thx! I can try when arrive at home !
Re: Blocky One Time Only
Thx work perfectly!
Who is online
Users browsing this forum: No registered users and 1 guest