Hi there,
as the built-in geolocation solutions do not really work for me I tried to create an own automation for opening my garage doors. It’s based on the owntracks integration and mqtt.
The automation is simple it has a mqtt trigger with topics and payload.
The payload is also not very complex. The problem, I cannot access neither the trigger.payload nor the trigger.payload_json in my value_template.
The log says ‘Template variable error: ‘trigger’ is undefined when rendering ‘{{ ‘_type’ in trigger.payload and trigger.payload._type == ‘location’ }}’’.
If I check the automation in yaml it is not trigger but triggers as it has been renamed a while ago.
The content of template_value itself works correctly if I put it into the devtools/template editor with a sample payload.
I see a lot of samples in the community but all is based in the “old” notation with trigger.
Do you have an idea, why triggers and also trigger is undefined in condition?
Thanks!