Understanding $device, $devices, $currentEventDevice, etc


#22

I thought that was the question too. One possibility might be the list of devices used in a ‘with’, but I’m not sure how useful that is to users.


#23

Hi,
How did you make the statement like {$device}'s temperature is greater than 50ºF? The closest one I could do is any of {$device}'s ,
58%20AM

Thank you


#24

$devices is filled in:

  • it is restored from a scheduled wakeup
  • it is set when you execute an action with a list of devices

So otherwise it would have nothing in it. (ie when it completes a set of actions it clears it out)

$device is filled in

  • it is restored from a scheduled wakeup (as is $index)
  • inside of a each statement it is filled in (as is $index, and if you used your own counter variable)

$currentEventDevice is filled in on piston start

  • if it is a schedule run, it tries to pickup the device that originally scheduled the event
  • if it is a device event, it uses the event device