Using a variable for Home Assistant sensor name

I've made a flow sequence with multiple inject nodes that go through the same process, so I need the end result to be unique. That is to be a Home Assistant sensor, but i need the sensor name to be based on the data that is scraped in the process. I can't figure out a way to use msg.payload.title as the sensor name. Is there another way around this that i'm not seeing? Here's the code anyway:

[{"id":"74b7d864.c68ae8","type":"inject","z":"4f7a68fe.44caa8","name":"Global Indeks A","topic":"","payload":"F00000JORS","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":60,"wires":[["4e81d2a5.088efc"]]},{"id":"6999504e.40c27","type":"inject","z":"4f7a68fe.44caa8","name":"Health Care R","topic":"","payload":"F00000ZFFV","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":100,"wires":[["4e81d2a5.088efc"]]},{"id":"9d22c900.7b7c78","type":"inject","z":"4f7a68fe.44caa8","name":"Norge Indeks A","topic":"","payload":"F00000JORR","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":140,"wires":[["4e81d2a5.088efc"]]},{"id":"3fea5597.6382ea","type":"inject","z":"4f7a68fe.44caa8","name":"Teknologi R","topic":"","payload":"F00000ZFG1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":180,"wires":[["4e81d2a5.088efc"]]},{"id":"23400103.ee59ee","type":"inject","z":"4f7a68fe.44caa8","name":"USA Indeks A","topic":"","payload":"F0GBR04OTI","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":220,"wires":[["4e81d2a5.088efc"]]},{"id":"4e81d2a5.088efc","type":"change","z":"4f7a68fe.44caa8","name":"","rules":[{"t":"set","p":"post","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":140,"wires":[["26130e98.7fc472","ffab6cf.c0c2b9"]]},{"id":"26130e98.7fc472","type":"http request","z":"4f7a68fe.44caa8","name":"GET Main","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}","tls":"","persist":false,"proxy":"","authType":"","x":480,"y":100,"wires":[["92268fd7.d5a04","66a9e49f.19e67c","1f3cb4ed.c0675b"]]},{"id":"ffab6cf.c0c2b9","type":"http request","z":"4f7a68fe.44caa8","name":"GET History","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}&tab=1","tls":"","persist":false,"proxy":"","authType":"","x":490,"y":180,"wires":[["4ae13990.aba6f8","d684101c.b1105","cfbb8ea7.ee16d","98318502.83fc98"]]},{"id":"66a9e49f.19e67c","type":"html","z":"4f7a68fe.44caa8","name":"Title","property":"payload","outproperty":"payload","tag":"h1","ret":"text","as":"multi","x":650,"y":20,"wires":[["c81858c7.03e9b8"]]},{"id":"1f3cb4ed.c0675b","type":"html","z":"4f7a68fe.44caa8","name":"Date","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-child(2) td.line.heading span","ret":"text","as":"multi","x":650,"y":60,"wires":[["3d165f16.618a3"]]},{"id":"92268fd7.d5a04","type":"html","z":"4f7a68fe.44caa8","name":"Price","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-of-type(2) td:nth-of-type(3)","ret":"text","as":"single","x":650,"y":100,"wires":[["6e34f137.06e3e"]]},{"id":"4ae13990.aba6f8","type":"html","z":"4f7a68fe.44caa8","name":"1 Day","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(3) td.col2.value.number","ret":"text","as":"single","x":650,"y":140,"wires":[["48f29160.3c608"]]},{"id":"d684101c.b1105","type":"html","z":"4f7a68fe.44caa8","name":"1 Week","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(4) td.col2.value.number","ret":"text","as":"single","x":660,"y":180,"wires":[["8b68aff6.657c4"]]},{"id":"cfbb8ea7.ee16d","type":"html","z":"4f7a68fe.44caa8","name":"1 Month","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(5) td.col2.value.number","ret":"text","as":"single","x":660,"y":220,"wires":[["d4bf002e.75ffd"]]},{"id":"98318502.83fc98","type":"html","z":"4f7a68fe.44caa8","name":"1 Year","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(9) td.col2.value.number","ret":"text","as":"single","x":650,"y":260,"wires":[["7fc10c40.ad5774"]]},{"id":"e02d3f6f.6e111","type":"function","z":"4f7a68fe.44caa8","name":"String>Float","func":"msg.payload = /(?:[^A-z]+)/.exec(msg.payload)[0].replace(\",\",\".\");\nmsg.payload = parseFloat(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":200,"wires":[["3962740f.0173cc"]]},{"id":"de523f4c.bf1fe","type":"debug","z":"4f7a68fe.44caa8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":1000,"y":40,"wires":[]},{"id":"3962740f.0173cc","type":"join","z":"4f7a68fe.44caa8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"7","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":970,"y":140,"wires":[["de523f4c.bf1fe","b1aa9f58.5648e"]]},{"id":"48f29160.3c608","type":"change","z":"4f7a68fe.44caa8","name":"day","rules":[{"t":"set","p":"topic","pt":"msg","to":"day","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":140,"wires":[["e02d3f6f.6e111"]]},{"id":"8b68aff6.657c4","type":"change","z":"4f7a68fe.44caa8","name":"week","rules":[{"t":"set","p":"topic","pt":"msg","to":"week","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":180,"wires":[["e02d3f6f.6e111"]]},{"id":"d4bf002e.75ffd","type":"change","z":"4f7a68fe.44caa8","name":"month","rules":[{"t":"set","p":"topic","pt":"msg","to":"month","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":220,"wires":[["e02d3f6f.6e111"]]},{"id":"7fc10c40.ad5774","type":"change","z":"4f7a68fe.44caa8","name":"year","rules":[{"t":"set","p":"topic","pt":"msg","to":"year","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":260,"wires":[["e02d3f6f.6e111"]]},{"id":"c81858c7.03e9b8","type":"change","z":"4f7a68fe.44caa8","name":"title","rules":[{"t":"set","p":"topic","pt":"msg","to":"title","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":20,"wires":[["3962740f.0173cc"]]},{"id":"3d165f16.618a3","type":"change","z":"4f7a68fe.44caa8","name":"date","rules":[{"t":"set","p":"topic","pt":"msg","to":"date","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":60,"wires":[["3962740f.0173cc"]]},{"id":"6e34f137.06e3e","type":"change","z":"4f7a68fe.44caa8","name":"price","rules":[{"t":"set","p":"topic","pt":"msg","to":"price","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":100,"wires":[["e02d3f6f.6e111"]]},{"id":"b1aa9f58.5648e","type":"ha-entity","z":"4f7a68fe.44caa8","name":"{{msg.payload.title}}","server":"e707d943.9c83a8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"{{msg.payload.title}}"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"kr"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","x":1080,"y":80,"wires":[[]]},{"id":"e707d943.9c83a8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Where is HA expecting to find the name in the msg? If you just want to extend the msg or the payload with a name property you can use a change node right after the join node (before you send it to HA)

I expect HA to use msg.payload.title. I tried using your change node, but that doesn't change anything practical. Did i not include the HA sensor node in the initial setup, or did you delete it? The sensor will either get a generated weird name like nodered b1aa9f58.5648e, or if i set {{{msg.payload.title}}} in the HA sensor name field, the name will be {{{msg.payload.title}}} and not the data from that part of the msg. Here's the updated one with your added node and the HA sensor node:

[{"id":"74b7d864.c68ae8","type":"inject","z":"4f7a68fe.44caa8","name":"Global Indeks A","topic":"","payload":"F00000JORS","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":60,"wires":[["4e81d2a5.088efc"]]},{"id":"6999504e.40c27","type":"inject","z":"4f7a68fe.44caa8","name":"Health Care R","topic":"","payload":"F00000ZFFV","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":100,"wires":[["4e81d2a5.088efc"]]},{"id":"9d22c900.7b7c78","type":"inject","z":"4f7a68fe.44caa8","name":"Norge Indeks A","topic":"","payload":"F00000JORR","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":140,"wires":[["4e81d2a5.088efc"]]},{"id":"3fea5597.6382ea","type":"inject","z":"4f7a68fe.44caa8","name":"Teknologi R","topic":"","payload":"F00000ZFG1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":180,"wires":[["4e81d2a5.088efc"]]},{"id":"23400103.ee59ee","type":"inject","z":"4f7a68fe.44caa8","name":"USA Indeks A","topic":"","payload":"F0GBR04OTI","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":220,"wires":[["4e81d2a5.088efc"]]},{"id":"4e81d2a5.088efc","type":"change","z":"4f7a68fe.44caa8","name":"","rules":[{"t":"set","p":"post","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":140,"wires":[["26130e98.7fc472","ffab6cf.c0c2b9"]]},{"id":"26130e98.7fc472","type":"http request","z":"4f7a68fe.44caa8","name":"GET Main","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}","tls":"","persist":false,"proxy":"","authType":"","x":480,"y":100,"wires":[["92268fd7.d5a04","66a9e49f.19e67c","1f3cb4ed.c0675b"]]},{"id":"ffab6cf.c0c2b9","type":"http request","z":"4f7a68fe.44caa8","name":"GET History","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}&tab=1","tls":"","persist":false,"proxy":"","authType":"","x":490,"y":180,"wires":[["4ae13990.aba6f8","d684101c.b1105","cfbb8ea7.ee16d","98318502.83fc98"]]},{"id":"66a9e49f.19e67c","type":"html","z":"4f7a68fe.44caa8","name":"Title","property":"payload","outproperty":"payload","tag":"h1","ret":"text","as":"multi","x":650,"y":20,"wires":[["c81858c7.03e9b8"]]},{"id":"1f3cb4ed.c0675b","type":"html","z":"4f7a68fe.44caa8","name":"Date","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-child(2) td.line.heading span","ret":"text","as":"multi","x":650,"y":60,"wires":[["3d165f16.618a3"]]},{"id":"92268fd7.d5a04","type":"html","z":"4f7a68fe.44caa8","name":"Price","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-of-type(2) td:nth-of-type(3)","ret":"text","as":"single","x":650,"y":100,"wires":[["6e34f137.06e3e"]]},{"id":"4ae13990.aba6f8","type":"html","z":"4f7a68fe.44caa8","name":"1 Day","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(3) td.col2.value.number","ret":"text","as":"single","x":650,"y":140,"wires":[["48f29160.3c608"]]},{"id":"d684101c.b1105","type":"html","z":"4f7a68fe.44caa8","name":"1 Week","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(4) td.col2.value.number","ret":"text","as":"single","x":660,"y":180,"wires":[["8b68aff6.657c4"]]},{"id":"cfbb8ea7.ee16d","type":"html","z":"4f7a68fe.44caa8","name":"1 Month","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(5) td.col2.value.number","ret":"text","as":"single","x":660,"y":220,"wires":[["d4bf002e.75ffd"]]},{"id":"98318502.83fc98","type":"html","z":"4f7a68fe.44caa8","name":"1 Year","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(9) td.col2.value.number","ret":"text","as":"single","x":650,"y":260,"wires":[["7fc10c40.ad5774"]]},{"id":"e02d3f6f.6e111","type":"function","z":"4f7a68fe.44caa8","name":"String>Float","func":"msg.payload = /(?:[^A-z]+)/.exec(msg.payload)[0].replace(\",\",\".\");\nmsg.payload = parseFloat(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":200,"wires":[["3962740f.0173cc"]]},{"id":"de523f4c.bf1fe","type":"debug","z":"4f7a68fe.44caa8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":1200,"y":20,"wires":[]},{"id":"3962740f.0173cc","type":"join","z":"4f7a68fe.44caa8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"7","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":970,"y":140,"wires":[["3109d76f.306af8"]]},{"id":"48f29160.3c608","type":"change","z":"4f7a68fe.44caa8","name":"day","rules":[{"t":"set","p":"topic","pt":"msg","to":"day","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":140,"wires":[["e02d3f6f.6e111"]]},{"id":"8b68aff6.657c4","type":"change","z":"4f7a68fe.44caa8","name":"week","rules":[{"t":"set","p":"topic","pt":"msg","to":"week","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":180,"wires":[["e02d3f6f.6e111"]]},{"id":"d4bf002e.75ffd","type":"change","z":"4f7a68fe.44caa8","name":"month","rules":[{"t":"set","p":"topic","pt":"msg","to":"month","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":220,"wires":[["e02d3f6f.6e111"]]},{"id":"7fc10c40.ad5774","type":"change","z":"4f7a68fe.44caa8","name":"year","rules":[{"t":"set","p":"topic","pt":"msg","to":"year","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":260,"wires":[["e02d3f6f.6e111"]]},{"id":"c81858c7.03e9b8","type":"change","z":"4f7a68fe.44caa8","name":"title","rules":[{"t":"set","p":"topic","pt":"msg","to":"title","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":20,"wires":[["3962740f.0173cc"]]},{"id":"3d165f16.618a3","type":"change","z":"4f7a68fe.44caa8","name":"date","rules":[{"t":"set","p":"topic","pt":"msg","to":"date","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":60,"wires":[["3962740f.0173cc"]]},{"id":"6e34f137.06e3e","type":"change","z":"4f7a68fe.44caa8","name":"price","rules":[{"t":"set","p":"topic","pt":"msg","to":"price","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":100,"wires":[["e02d3f6f.6e111"]]},{"id":"b1aa9f58.5648e","type":"ha-entity","z":"4f7a68fe.44caa8","name":"","server":"e707d943.9c83a8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":""},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"kr"}],"state":"payload.price","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","x":990,"y":60,"wires":[[]]},{"id":"3109d76f.306af8","type":"change","z":"4f7a68fe.44caa8","name":"","rules":[{"t":"set","p":"payload.name","pt":"msg","to":"payload.title","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":140,"wires":[["b1aa9f58.5648e","de523f4c.bf1fe"]]},{"id":"e707d943.9c83a8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

See image here: https://i.imgur.com/7CBBU44.png

Not everyone answering has the home automation nodes installed or will install them specifically to help. Because of that simplified flows are often shown as example on how to do something as a lot of aspects can be handled by core node-red functionality. If you don’t have it installed the nodes can’t be shown/edited. You might get the most detailed responses if you specify what messages look like coming out of the HA nodes.

Ok sure, yeah i get that. Everything works perfectly in Node-RED, except for the name field in the HA Sensor which seems to only support static names. I've tried to bypass this by using {{msg.payload.title}}, using both two and three brackets. I've also tried to sneak in "valueType":"msg" in the code and payload.name as the name in the sensor, but once i run the sequence, it wipes away the sneaky "valueType" i tried to put in there. The HA sensor just uses the literal name i enter in that field with the red circle around it. In HA, I end up with a sensor named {{msg,payload.title}} and entity_id: sensor.msg_payload_title.

So what I think is that the HA sensor only supports static names, but maybe I'm wrong. Is there a way to work around this? If not, i can copy and paste the whole flow sequence for each sensor, but that seems very clumsy for such a minor obstacle, especially as the name for the sensor is also scraped from the site(s). For now I have 5 different injects, but i want that part to be flexible so i can add and remove in the future by only adding the unique part of the url.


5zBDeJn

EDIT: Upladed images

It's better if you upload images direct into the forum, instead of providing links.
Links can be broken in the future which would make the post difficult to read, and it's also easier for other members to visualize your issue.
nrimages

1 Like

Cheers, i was looking for that feature, thought it was reserved for veterans. Edited my previous post.

I'm thinking out load here; maybe I could add many sensors in parallel at the end, and only accept data if it comes from the corresponding inject node at the start. Dunno how I would do that either.

1 Like

I understand you want to send data to HA and present it there in some gui/lovelace
Is there a specific reason you need the HA sensor nodes in Node-RED (and yes, I have not bothered to install them)?
I mean since there is this limitation about naming. Have you considered using mqtt to send the data?

The reason i want them in Node-RED, is that i want Node-RED to generate them because of the limitations of the scrape sensor built into HA (Which i have been using up until now). I did once modify a custom component for HA to do many of the features that this, but never got it fully working like i wanted to.

I'm sure i could have used MQTT, and it might still be the better option, but i've achieved my goal now using the HA API node, and I'm still tweaking it a bit. Here's my setup for anyone interested:

[{"id":"42c972fb.0134ec","type":"inject","z":"4f7a68fe.44caa8","name":"Global","topic":"","payload":"F00000JORS","payloadType":"str","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":100,"wires":[["a68dcd4f.230db"]]},{"id":"a932e574.99a468","type":"inject","z":"4f7a68fe.44caa8","name":"Health Care","topic":"","payload":"F00000ZFFV","payloadType":"str","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":60,"wires":[["a68dcd4f.230db"]]},{"id":"e9007c06.0e3c3","type":"inject","z":"4f7a68fe.44caa8","name":"Norge","topic":"","payload":"F00000JORR","payloadType":"str","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":180,"wires":[["a68dcd4f.230db"]]},{"id":"84dd578a.5b0058","type":"inject","z":"4f7a68fe.44caa8","name":"Teknologi","topic":"","payload":"F00000ZFG1","payloadType":"str","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":220,"wires":[["a68dcd4f.230db"]]},{"id":"853457d2.4d60c8","type":"inject","z":"4f7a68fe.44caa8","name":"USA","topic":"","payload":"F0GBR04OTI","payloadType":"str","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":140,"wires":[["a68dcd4f.230db"]]},{"id":"a68dcd4f.230db","type":"change","z":"4f7a68fe.44caa8","name":"","rules":[{"t":"set","p":"post","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":140,"wires":[["a577ef0d.f750d","9f75215.10ebae"]]},{"id":"a577ef0d.f750d","type":"http request","z":"4f7a68fe.44caa8","name":"oversikt","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":60,"wires":[["1a2edc4f.24ba24","a3bd421e.d7954","9e8cf469.eed5d8"]]},{"id":"9f75215.10ebae","type":"http request","z":"4f7a68fe.44caa8","name":"historikk","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.morningstar.no/no/funds/snapshot/snapshot.aspx?id={{{post}}}&tab=1","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":220,"wires":[["8da8e812.875bd8","350afb45.e3fef4","a9de1423.4ed838","5db63583.67730c"]]},{"id":"a3bd421e.d7954","type":"html","z":"4f7a68fe.44caa8","name":"navn","property":"payload","outproperty":"payload","tag":"h1","ret":"text","as":"multi","x":490,"y":20,"wires":[["45ed6194.60772"]]},{"id":"9e8cf469.eed5d8","type":"html","z":"4f7a68fe.44caa8","name":"dato","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-child(2) td.line.heading span","ret":"text","as":"multi","x":490,"y":60,"wires":[["7363eca0.1591f4"]]},{"id":"1a2edc4f.24ba24","type":"html","z":"4f7a68fe.44caa8","name":"kurs","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-of-type(2) td:nth-of-type(3)","ret":"text","as":"single","x":490,"y":100,"wires":[["7a70769a.835118"]]},{"id":"8da8e812.875bd8","type":"html","z":"4f7a68fe.44caa8","name":"dag","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(3) td.col2.value.number","ret":"text","as":"single","x":490,"y":140,"wires":[["934fc0a4.5fd18"]]},{"id":"350afb45.e3fef4","type":"html","z":"4f7a68fe.44caa8","name":"uke","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(4) td.col2.value.number","ret":"text","as":"single","x":490,"y":180,"wires":[["516a7989.e37718"]]},{"id":"a9de1423.4ed838","type":"html","z":"4f7a68fe.44caa8","name":"mnd","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(5) td.col2.value.number","ret":"text","as":"single","x":490,"y":220,"wires":[["f574fc6e.acd38"]]},{"id":"5db63583.67730c","type":"html","z":"4f7a68fe.44caa8","name":"ĂĄr","property":"payload","outproperty":"payload","tag":"#returnsTrailingDiv tr:nth-child(9) td.col2.value.number","ret":"text","as":"single","x":490,"y":260,"wires":[["794ae9bb.2f31e8"]]},{"id":"c409b260.ffca1","type":"function","z":"4f7a68fe.44caa8","name":"string/float","func":"msg.payload = /(?:[^A-z]+)/.exec(msg.payload)[0].replace(\",\",\".\");\nmsg.payload = parseFloat(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":260,"wires":[["6bf833e.f9d0dcc"]]},{"id":"6bf833e.f9d0dcc","type":"join","z":"4f7a68fe.44caa8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"8","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":970,"y":40,"wires":[["11e86e32.e5f8d2"]]},{"id":"934fc0a4.5fd18","type":"change","z":"4f7a68fe.44caa8","name":"day","rules":[{"t":"set","p":"topic","pt":"msg","to":"day","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":140,"wires":[["c409b260.ffca1","c148fe81.519d9"]]},{"id":"516a7989.e37718","type":"change","z":"4f7a68fe.44caa8","name":"week","rules":[{"t":"set","p":"topic","pt":"msg","to":"week","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":180,"wires":[["c409b260.ffca1"]]},{"id":"f574fc6e.acd38","type":"change","z":"4f7a68fe.44caa8","name":"month","rules":[{"t":"set","p":"topic","pt":"msg","to":"month","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":220,"wires":[["c409b260.ffca1"]]},{"id":"794ae9bb.2f31e8","type":"change","z":"4f7a68fe.44caa8","name":"year","rules":[{"t":"set","p":"topic","pt":"msg","to":"year","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":260,"wires":[["c409b260.ffca1"]]},{"id":"45ed6194.60772","type":"change","z":"4f7a68fe.44caa8","name":"title","rules":[{"t":"set","p":"topic","pt":"msg","to":"title","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":20,"wires":[["6bf833e.f9d0dcc"]]},{"id":"7363eca0.1591f4","type":"change","z":"4f7a68fe.44caa8","name":"date","rules":[{"t":"set","p":"topic","pt":"msg","to":"date","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":60,"wires":[["6bf833e.f9d0dcc"]]},{"id":"7a70769a.835118","type":"change","z":"4f7a68fe.44caa8","name":"price","rules":[{"t":"set","p":"topic","pt":"msg","to":"price","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":100,"wires":[["c409b260.ffca1"]]},{"id":"11e86e32.e5f8d2","type":"function","z":"4f7a68fe.44caa8","name":"format","func":"msg.entity_id = `sensor.${msg.payload.title.replace(/ /g, '_' )}`;\n\nmsg.payload = {\n    data: {\n        state: msg.payload.price,\n        attributes: {\n            Dato: msg.payload.date,\n            '1 Dag': msg.payload.day,\n            '1 Uke': msg.payload.week,\n            '1 MĂĄned': msg.payload.month,\n            '1 Ă…r': msg.payload.year,\n            unit_of_measurement: 'kr',\n            friendly_name: msg.payload.title,\n            icon: msg.payload.icon\n        }\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":100,"wires":[["846f272d.d0e228"]]},{"id":"846f272d.d0e228","type":"ha-api","z":"4f7a68fe.44caa8","name":"sensor","server":"dd6076c8.03e098","protocol":"http","method":"post","path":"/api/states/{{entity_id}}","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":990,"y":160,"wires":[[]]},{"id":"c148fe81.519d9","type":"switch","z":"4f7a68fe.44caa8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"0","vt":"str"},{"t":"lt","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":140,"wires":[["c6e09896.e8b688"],["2f80fd2f.114232"]]},{"id":"c6e09896.e8b688","type":"change","z":"4f7a68fe.44caa8","name":"icon-up","rules":[{"t":"set","p":"payload","pt":"msg","to":"mdi:arrow-top-right-thick","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"icon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":80,"wires":[["6bf833e.f9d0dcc"]]},{"id":"2f80fd2f.114232","type":"change","z":"4f7a68fe.44caa8","name":"icon-down","rules":[{"t":"set","p":"payload","pt":"msg","to":"mdi:arrow-bottom-right-thick","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"icon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":200,"wires":[["6bf833e.f9d0dcc"]]},{"id":"dd6076c8.03e098","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]

Or one or two clicks less - copy paste.

Agreed that it's useful to upload your images instead of making people download your templates.

Did you ever get this working? If so, what was your solution?