In Node Red with a mustache template node I am trying to read the state of an entity and getting no results. I am not sure how this is working and everything I read on this page says it should. I can interpret payloads just fine but not entities. For example:
Inject [payload: "Foo"] => Template: "We injected {{payload}} and the kitchen light is {{entity.light.kitchen.state}}." => Output: We injected Foo and the kitchen light is .
[{"id":"7f1117bfed6889fb","type":"inject","z":"7cda1be25d3af46f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Foo","payloadType":"str","x":1070,"y":920,"wires":[["07f87c9428860646"]]},{"id":"07f87c9428860646","type":"template","z":"7cda1be25d3af46f","name":"Effects","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"We injected {{payload}} and the kitchen light is {{entity.light.kitchen.state}}.","output":"str","x":1240,"y":920,"wires":[["b194b6c90f1b4a39"]]},{"id":"b194b6c90f1b4a39","type":"debug","z":"7cda1be25d3af46f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":920,"wires":[]}]
Am I using the entity reference wrong somehow? I think a mustache template is the way to go for what I am doing and I prefer not to use the JSONata approach.