I am trying to build an automation to get my door lock notification message, I used to trigger on the zwave id that i hardcoded but reading forums, I understant that this is not the right thing to do so i am trying to get the notification via a trigger where i would be using device_id but I can’t get it to work;
I am testig in developer template and I have results I can’t reproduce in the automation, let say my ZWAVE id is :e4cf47e709626c845e82ec53eec06715 (I found it listening to events )
In template I tried the following:
{{device_id(“lock.serrure_cabanon”)}} this return e4cf47e709626c845e82ec53eec06715
Then if i tried {{“e4cf47e709626c845e82ec53eec06715” == device_id(“lock.serrure_cabanon”) }} it tells me TRUE in template but if I try it in the automation, it never runs :
description: ""
trigger:
- platform: event
event_type: zwave_js_notification
condition:
- condition: template
value_template: >-
{{trigger.event.data.device_id == device_id("lock.serrure_cabanon")
}}
action:
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: input_text.set_value
target:
entity_id: input_text.serrure_cabanon_last_status
data:
value: "test"
mode: single
if I change it to {{trigger.event.data.device_id == ‘e4cf47e709626c845e82ec53eec06715’}} in the YAML then it runs
I think I tried every option, quote, no quote … nothing works
thank for any help provided