Page 1 of 1

Implementation request: trigger on value

Posted: Friday 20 October 2017 14:21
by emme
Ciao,

it might be possible to implement a much sharp control of trigger?
as now if you want to trigger a device you have to enter

Code: Select all

on = {devices = {'myDevice'}},
then in the execute section you can check its state as per your use:

Code: Select all

if device.state == "On" then 
   do my stuff
end
what about replaving with

Code: Select all

on = {devices = {'myDevice' == 'On'}},
and by conseguence the execution part would be

Code: Select all

do my stuff
it is applicable? :P :P
ciao
M

Re: Implementation request: trigger on value

Posted: Friday 20 October 2017 15:20
by EddyG
I am not in favour.
You save 2 lines of code and some extra code.
Proberly those 2 lines 'shift' to the dzVents code, so total evaluation takes more time.
You cannot debug the 'Off' state.