Skip to content

Conversation

@jvandenbroek
Copy link
Contributor

Implemented SetEventTrigger and GetEventTrigger functions to set/get whether an event should be triggered or not, preventing the need to set the infamous bEvenTrigger bool throughout the whole project (like the previous rejected patch). This patch doesn't include any json related functionality, only focuses on Lua/dzVents.

Changes:

  • TRIGGER argument added to UpdateDevice and 'Variable:' functions (defaults to no trigger)
  • NOTRIGGER argument added for general device actions (defaults to trigger)
  • Scenes/groups and uservars now also work with event triggers, members of scenes/groups will follow this (defaults to trigger for scenes/groups, no trigger for uservars)
  • Scenes/groups and uservars lastupdate logic now works like devices (update lastupdate after running script)
  • Small fix preventing dzVents to evaluate when no dzVents scripts are enabled

So TRIGGER triggers the event system, NOTRIGGER makes sure it doesn't.

We made sure the trigger logic defaults to Domoticz' current behaviour, preventing possible breaking of existing installations/scripts. For that reason we use both TRIGGER and NOTRIGGER as arguments for different functions, instead of just one.

@gizmocuz
Copy link
Contributor

Thanks!

@gizmocuz gizmocuz merged commit a06a4d6 into domoticz:development Sep 20, 2017
@jvandenbroek jvandenbroek deleted the eventtrigger branch January 23, 2018 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants