1) Give a description of the problem
I’m trying to save devices to a variable based on presence. This snip is from a piston I built from scratch that almost works well. Any help would be appreciated.
2) What is the expected behavior?
Store the names of vehicles when presence changes and then use them in notifications,
ie “Joe’s Car has left. Location mode is X. Themostat is Y, etc”
3) What is happening/not happening?
When true, the second IF stores the device name as expected (Joe’s Car),
BUT, when the first IF becomes true, the device ends up being (not set), instead of (Joe’s Car).
I have changed the order of the IF’s and the behavior always works for the second IF but not the first. That should tell me something, but at this point, I’m at a loss.
Log from “Not Present”:
|+1ms|╔Received event [Joe's Car].presence = not present with a delay of 100ms|
|---|---|
|+58ms|║RunTime Analysis CS > 18ms > PS > 28ms > PE > 13ms > CE|
|+61ms|║Runtime (38583 bytes) successfully initialized in 28ms (v0.2.102.20180116) (58ms)|
|+62ms|║╔Execution stage started|
|+71ms|║║Comparison (enum) not present changes_to (string) not present = true (1ms)|
|+76ms|║║Cancelling condition #29's schedules...|
|+77ms|║║Condition #29 evaluated true (9ms)|
|+78ms|║║Cancelling condition #16's schedules...|
|+78ms|║║Condition group #16 evaluated true (state changed) (11ms)|
|+84ms|║║Comparison (enum) not present changes_to (string) present = false (0ms)|
|+88ms|║║Cancelling condition #17's schedules...|
|+89ms|║║Condition #17 evaluated false (8ms)|
|+91ms|║║Cancelling condition #28's schedules...|
|+92ms|║║Condition group #28 evaluated false (state changed) (11ms)|
|+94ms|║╚Execution stage complete. (33ms)|
|+96ms|╚Event processed successfully (95ms)|
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.