Here’s my “Last Update” flow… Pretty sure this has things in you don’t want/need, but export confuses me (currently).
[{"id":"fe6d9e8dcf2b2dee","type":"moment","z":"3f3f5aae.72acee","name":"","topic":"","input":"payload.lastupdate","inputType":"msg","inTz":"Europe/London","adjAmount":"0","adjType":"days","adjDir":"add","format":"DD/MM/YYYY","locale":"en","output":"payload.date","outputType":"msg","outTz":"Europe/London","x":660,"y":940,"wires":[["8a1a41d1a366e928"]]},{"id":"8a1a41d1a366e928","type":"moment","z":"3f3f5aae.72acee","name":"","topic":"","input":"payload.lastupdate","inputType":"msg","inTz":"Europe/London","adjAmount":"0","adjType":"days","adjDir":"add","format":"HH:mm","locale":"en","output":"payload.time","outputType":"msg","outTz":"Europe/London","x":900,"y":940,"wires":[["966cba34f33efb05"]]},{"id":"966cba34f33efb05","type":"function","z":"3f3f5aae.72acee","name":"Last update ","func":"msg.payload.nohr = Math.round(Math.abs((Date.now() - msg.payload.lastUpdate) / 1000 / 60 / 60));\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1110,"y":940,"wires":[["421368e408165af5"]]},{"id":"421368e408165af5","type":"ha-sensor","z":"3f3f5aae.72acee","name":"Last Update","entityConfig":"8ae07a618641546e","version":0,"state":"payload.nohr","stateType":"msg","attributes":[{"property":"Date","value":"payload.date","valueType":"msg"},{"property":"Time","value":"payload.time","valueType":"msg"},{"property":"Last Update","value":"payload.lastUpdate","valueType":"msg"}],"inputOverride":"allow","outputProperties":[],"x":1290,"y":940,"wires":[[]]},{"id":"8ae07a618641546e","type":"ha-entity-config","server":"8c7ce533.7eba88","deviceConfig":"","name":"sensor config for Last Update","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"ev-lastupdate"},{"property":"icon","value":"mdi:clock-outline"},{"property":"entity_category","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":"hrs"},{"property":"state_class","value":""}],"resend":true,"debugEnabled":false},{"id":"8c7ce533.7eba88","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"","enableGlobalContextStore":false}]
The node is a part of node-red-contrib-moment (for anyone following along)…