I am trying to get the entity_id using the mustache templates:
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/mustache-templates.html
Below is the complete msg object. I used {{data.entity_id}}, but it seems not working. what should be the correct syntax?
Thanks.
{"topic":"binary_sensor.wyzesense_xx","payload":"on","data":{"entity_id":"binary_sensor.wyzesense_xx","old_state":{"entity_id":"binary_sensor.wyzesense_xx","state":"off","attributes":{"mac":"xx","device_class":"door","timestamp":"2020-03-13T09:56:26.344000","rssi":-85,"battery_level":90,"friendly_name":"wyze_garage_2"},"last_changed":"2020-03-13T16:39:12.563057+00:00","last_updated":"2020-03-13T16:39:12.563057+00:00","context":{"id":"807bada67c154240a8882d3ad1911480","parent_id":null,"user_id":"676d91a974a74369be71d93d109d6b4a"}},"new_state":{"entity_id":"binary_sensor.wyzesense_xx","state":"on","attributes":{"mac":"xx","device_class":"door","timestamp":"2020-03-13T09:56:26.344000","rssi":-85,"battery_level":90,"friendly_name":"wyze_garage_2"},"last_changed":"2020-03-13T16:39:16.285093+00:00","last_updated":"2020-03-13T16:39:16.285093+00:00","context":{"id":"78e89981ca414c009da2b7f6aae13a61","parent_id":null,"user_id":"676d91a974a74369be71d93d109d6b4a"},"timeSinceChangedMs":11}},"_msgid":"d6d93385.5a59d"}