I’m no guru with this, and I got some help from @fame89 over at Discord getting this to work. However, it stopped working just last week, I haven’t had the time to figure out why yet, probably some small changes to the website. Here is the code i use in Node-RED:
[{"id":"bded4522.f1a228","type":"inject","z":"4f7a68fe.44caa8","name":"timer","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"0 12-17 * * 1,2,3,4,5","once":true,"onceDelay":"180.1","x":90,"y":1340,"wires":[["6907bae3.7a8294"]]},{"id":"6907bae3.7a8294","type":"http request","z":"4f7a68fe.44caa8","name":"pensjon80","method":"GET","ret":"txt","paytoqs":false,"url":"https://lt.morningstar.com/cahq7idbwv/snapshot/snapshot.aspx?id=F00000N52F","tls":"","persist":false,"proxy":"","authType":"","x":230,"y":1340,"wires":[["10443b0b.800355","1d44fbd7.101a34","c884d39b.b8d88","15f31e3c.017812"]]},{"id":"10443b0b.800355","type":"html","z":"4f7a68fe.44caa8","name":"dato","property":"payload","outproperty":"payload","tag":"#KeyStatsLatestNav th span","ret":"text","as":"single","x":410,"y":1340,"wires":[["10c8d756.fdf559"]]},{"id":"1d44fbd7.101a34","type":"html","z":"4f7a68fe.44caa8","name":"kurs","property":"payload","outproperty":"payload","tag":"#KeyStatsLatestNav td","ret":"text","as":"single","x":410,"y":1460,"wires":[["41c7ccc7.394be4"]]},{"id":"c884d39b.b8d88","type":"html","z":"4f7a68fe.44caa8","name":"mnd","property":"payload","outproperty":"payload","tag":"#TrailingReturns tr.rowM1.alternate td.number.colSecurity","ret":"text","as":"single","x":410,"y":1380,"wires":[["8da49db9.c9b8d"]]},{"id":"15f31e3c.017812","type":"html","z":"4f7a68fe.44caa8","name":"år","property":"payload","outproperty":"payload","tag":"#TrailingReturns tr.rowM12 td.number.colSecurity","ret":"text","as":"single","x":410,"y":1420,"wires":[["a9f758cb.7ee7e8"]]},{"id":"10c8d756.fdf559","type":"change","z":"4f7a68fe.44caa8","name":"date","rules":[{"t":"set","p":"topic","pt":"msg","to":"date","tot":"str"},{"t":"move","p":"payload.0","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":1340,"wires":[["14024a3a.72ed16"]]},{"id":"41c7ccc7.394be4","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":530,"y":1460,"wires":[["a136610b.2a369"]]},{"id":"8da49db9.c9b8d","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":530,"y":1380,"wires":[["a136610b.2a369","efa720d6.08d7b"]]},{"id":"a9f758cb.7ee7e8","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":530,"y":1420,"wires":[["a136610b.2a369"]]},{"id":"a136610b.2a369","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":790,"y":1460,"wires":[["14024a3a.72ed16"]]},{"id":"14024a3a.72ed16","type":"join","z":"4f7a68fe.44caa8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"100","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":970,"y":1340,"wires":[["571b7303.ddebfc"]]},{"id":"571b7303.ddebfc","type":"function","z":"4f7a68fe.44caa8","name":"format","func":"msg.payload = {\n \"data\": {\n \"state\": msg.payload.price,\n \"attributes\": {\n \"Dato\": msg.payload.date,\n \"1 Måned\": msg.payload.month,\n \"1 År\": msg.payload.year,\n \"friendly_name\": \"DNB Pensjonsprofil 80\",\n \"unit_of_measurement\": \"kr\",\n \"icon\": msg.payload.icon\n }\n }\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":1400,"wires":[["48dc04b7.27059c"]]},{"id":"48dc04b7.27059c","type":"ha-api","z":"4f7a68fe.44caa8","name":"sensor","server":"dd6076c8.03e098","protocol":"http","method":"post","path":"/api/states/sensor.dnb_pensjonsprofil_80","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":1010,"y":1460,"wires":[[]]},{"id":"789c9e48.2f4eb","type":"change","z":"4f7a68fe.44caa8","name":"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":1400,"wires":[["14024a3a.72ed16"]]},{"id":"efa720d6.08d7b","type":"switch","z":"4f7a68fe.44caa8","name":"icon","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"0","vt":"str"},{"t":"lt","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":1380,"wires":[["ebd156f9.e97638"],["789c9e48.2f4eb"]]},{"id":"ebd156f9.e97638","type":"change","z":"4f7a68fe.44caa8","name":"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":810,"y":1360,"wires":[["14024a3a.72ed16"]]},{"id":"22bda0c9.0273a","type":"inject","z":"4f7a68fe.44caa8","name":"USA Indeks A","topic":"","payload":"F0GBR04OTI","payloadType":"str","repeat":"","crontab":"*/15 9-17 * * 1,2,3,4,5","once":true,"onceDelay":"60.1","x":120,"y":1080,"wires":[["10e6ae19.733402","f10ea986.ba6e48"]]},{"id":"10e6ae19.733402","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={{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":1080,"wires":[["4544ce80.b3f7d","8bb6c4d5.31b038"]]},{"id":"f10ea986.ba6e48","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={{{payload}}}&tab=1","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":1160,"wires":[["440d6916.b9fc38","c7f6278d.b70a78","8c0e9a20.5f1bf8","fb42cd61.79678"]]},{"id":"8bb6c4d5.31b038","type":"html","z":"4f7a68fe.44caa8","name":"dato","property":"payload","outproperty":"payload","tag":"#overviewQuickstatsDiv tr:nth-child(2) td.line.heading span","ret":"text","as":"single","x":490,"y":1080,"wires":[["cadd4870.aea768"]]},{"id":"4544ce80.b3f7d","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":1120,"wires":[["a1f013f4.7f6fa"]]},{"id":"440d6916.b9fc38","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":1160,"wires":[["2e900cb4.8a3094"]]},{"id":"c7f6278d.b70a78","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":1200,"wires":[["3dfe93d1.1a732c"]]},{"id":"8c0e9a20.5f1bf8","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":1240,"wires":[["63dc2ae2.019c44"]]},{"id":"fb42cd61.79678","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":1280,"wires":[["913dd99e.ad6168"]]},{"id":"2e900cb4.8a3094","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":1160,"wires":[["c85027f5.85f578","dacd4f63.e5756"]]},{"id":"3dfe93d1.1a732c","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":1200,"wires":[["c85027f5.85f578"]]},{"id":"63dc2ae2.019c44","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":1240,"wires":[["c85027f5.85f578"]]},{"id":"913dd99e.ad6168","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":1280,"wires":[["c85027f5.85f578"]]},{"id":"cadd4870.aea768","type":"change","z":"4f7a68fe.44caa8","name":"date","rules":[{"t":"set","p":"topic","pt":"msg","to":"date","tot":"str"},{"t":"move","p":"payload.0","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":1080,"wires":[["1a34ce9e.94f921"]]},{"id":"a1f013f4.7f6fa","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":1120,"wires":[["c85027f5.85f578"]]},{"id":"dacd4f63.e5756","type":"switch","z":"4f7a68fe.44caa8","name":"icon","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"0","vt":"str"},{"t":"lt","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":770,"y":1180,"wires":[["ae4449ab.440cd8"],["9cb355d0.d81f88"]]},{"id":"ae4449ab.440cd8","type":"change","z":"4f7a68fe.44caa8","name":"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":810,"y":1120,"wires":[["1a34ce9e.94f921"]]},{"id":"9cb355d0.d81f88","type":"change","z":"4f7a68fe.44caa8","name":"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":1240,"wires":[["1a34ce9e.94f921"]]},{"id":"c85027f5.85f578","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":790,"y":1280,"wires":[["1a34ce9e.94f921"]]},{"id":"1a34ce9e.94f921","type":"join","z":"4f7a68fe.44caa8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"60","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":970,"y":1080,"wires":[["84037aad.4bf268"]]},{"id":"84037aad.4bf268","type":"function","z":"4f7a68fe.44caa8","name":"format","func":"msg.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\": \"DNB USA Indeks A\",\n \"icon\": msg.payload.icon\n }\n }\n};\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":1140,"wires":[["c762bab2.e320b8"]]},{"id":"c762bab2.e320b8","type":"ha-api","z":"4f7a68fe.44caa8","name":"sensor","server":"dd6076c8.03e098","protocol":"http","method":"post","path":"/api/states/sensor.dnb_usa_indeks_a","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":1010,"y":1200,"wires":[[]]},{"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}]
The last one, pulling data from lt.morningstar.com (Pension fund) still works. Initially, i used the same flow for multiple funds, and had multiple inject nodes into the same flow sequence. That’t why the unique part of the url’s are in separate inject nodes before the http request nodes. Unfortunately, that ended up getting the data mixed, even with several tweak attempts. In the end, I ended up copy/paste for each sensor, at least that worked reliably for a month or two. If you use this and find the error(s), please share ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=9)