Rules Machine Passing wrong value

i have tried this logic many ways. i get the same result every time.
what i want is it to announce everything accept when the variable = to waiting. randomly it will announce that it is waiting.

the only reason i can think this is happing is that the trigger was changed to something like person. then when the action fires the variable changes just as its about to make the announcement.

if you can see an error in my logic or a better way to create the logic please do.

I wish the trigger could be something more like smartDetectType changed without having to identify all the devices
i also wish in the actions i could do the same. the variable will be filled with the device name anyways.

Couldn't your triggers be each one not equal to waiting vs changed and then your actions would be simple you could dump all the conditional tests and just do your speak command and volume reset command. Or set each trigger to what each device reports when you want the announcement made.

2 Likes

I should add you may want a delay afterwards in case more than one of those devices trigger in rapid succession. Unless you want that information spoken.

each device has multiple triggers. lets say there are 5 (person, vehicle, animal, speaking, alarm). i would have to create 5 triggers per device. There are 5 devices so there would be 25 triggers just to avoid triggering on the waiting status.

This could be useful since someone walking around does trigger every few seconds.

first thing you need to do is create a local variable in your rule.
Then the 1st line of your rule needs to be Set 'your local variable' to %value%.
The do your IF not equal to 'you local variable'
Also you don't need all of the individual IFs you need just 1, just one that says Speak %value% detected at the %device%

local variable example