[solved] Getting attributes test

Hi,
so again with this Jinja and probably other things.

I have this lock entity

entity: lock.schlage_be469nxcen_touchscreen_deadbolt_locked
_State: locked _
Attributes:
node_id: 10
value_index: 0
value_instance: 1
value_id: 41230419832989
notification: Keypad Lock
lock_status: Locked with Keypad by user 0
friendly_name: Front Door

How can I create a sensor with notification attribute or lock_status?

I am trying to send message on telegram with status and I get l:
“Error rendering data template: UndefinedError: ‘lock’ is undefined”

Using this automation:

  • service: telegram_bot.send_message
    data_template:
    target: ‘{{ trigger.event.data.user_id }}’
    message: ‘Front Door Lock: {{lock.schlage_be469nxcen_touchscreen_deadbolt_locked.lock_status}}’

OK, got it.

states.lock.schlage_be469nxcen_touchscreen_deadbolt_locked.attributes.lock_status