I can’t figure out how to use the Degrees or Strength values. What I would need is for the automation to run if the vibration strength is above 50 or the tilt is more than 10 degrees. My current automation looks like this:
I’m not sure about the rest so I’m assuming all of that is OK (I think it is tho) and the logic is sound (haven’t even looked at it) but start with the changes above and see if it works.
unfortunately that is not working. Getting this error:
Message malformed: invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘=’) for dictionary value @ data[‘condition’][0][‘conditions’][1][‘conditions’][1][‘conditions’][1][‘value_template’]
I can save it as
condition: template
value_template: '{{ trigger.event.data.args.degrees| int > 10 }}'
as far as the automation not working I really don’t have an explanation for that. Like I said I didn’t verify your logic and I honestly don’t think I could even if I wanted to wade thru all of those nested and/or blocks since I don’t have your devices.
I think what I would do is start removing conditions and add them back one at a time and verify that the automation works as you add each one back in. Then at least you’ll know where it’s failing.
Thank you both. @nappyjim, you’re nodered output showed something the developer tools didn’t. The correct syntax is trigger.event.data.args.0.strength and trigger.event.data.args.0.degrees
Comming back to the and/or statement. It’s less difficult then it looks. I have 2 sensors that can have 3 outputs. So it’s something like this:
ZHA_Event comming from: device 1 or device 2
And
one of these
Thanks for posting this. Triggering on a ZHA_event - doesn’t that mean it will trig every time anything ZHA related triggers? I understand that the conditions will it prevent it from running the actions, but is this the only way to capture a drop event or orientation event?