Best way to save Node-Red json result

Hi All,

I’m wanting to save a JSON result from Node-Red and display them on the Lovelace dashboard. I’m stuck on what best to create (how to create) in order to achieve this. I’ve looked at template sensors, and other means. Would variables be a suitable option, or am I just missing something really basic here.

Cheers,
Paul

1 Like

OK, answered my own question . . .

Just pass each JSON value to a number of Entity nodes works a treat. I assume that rather than creating a dozen of these entity nodes, I could probably add a bunch of attributes to one node and save values to the attributes. Would need to test this out though.

If anyone is interested . . .

[{"id":"efa336da266c7e7e","type":"ha-entity","z":"a3702243d82388a4","name":"Testing Sensor","server":"788d326f.ff7f4c","version":1,"debugenabled":true,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"testing sensor"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[{"property":"device_id","value":"sensor.testing_sensor","valueType":"str"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":380,"y":180,"wires":[[]]},{"id":"788d326f.ff7f4c","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Cheers,
Paul