Can {{ }} be used as a condition or notification?

# tested both context.user_id and context['user_id'] and neither match a condition or can
be used in the notification

 - alias: 'notify - lock RF state change template'
     - platform: event
       event_type: state_changed
         entity_id: lock.zw_lock
     condition: template
     value_template: >
       {{ != 'null' }}
     - service: persistent_notification.create
         title: "mudroom - lock"
         message: "RF **{{ | upper }}** \n user: {{ }} \n\n {{ (now().strftime(\"%m/%d/%Y - %I:%M:%S %p\")) }}"

That double fullstop context..user_id probably isn’t making things work too well…

Addtionally I think it should be


Indeed, you were correct on both accounts: (a) the extra “.” was my typo AND you correctly defined the

Thank you for your quick response and spot-on answer!

1 Like

Glad I could help. It took a LOT of reading past threads to find the right path to the user_id field. Although now that I think about it, I guess just looking at the trace of any existing automation would have also provided this information.