Just want to elaborate this a bit.
time on the root of the payload is not necessarily the time that the workflow was triggered. It’s the time of the trigger event. So, in this case, time would be the time the device reported state. Now, here is where things get tricky, you have the ability ( when you’re sending state ) to override the time. If you override the time,
time is what ever you sent with the state request.
For example, let’s say your device was offline for 1 hour, collecting data every 5 mins. Upon connection, it reported all of its data and overrode the time, so each state is recorded correctly in Losant. For each one, it would trigger a workflow that had the Device: State Trigger, on each payload
time would be overridden time (aka it would be a past time).