Here is a short flow showing how to load either 1 image code or an Array of image codes. The issue with the OpenWeatherMap
icons is that they are actually loaded as images NOT icons. You can use Material Design Icons (mdi) directly as icons so I have include 1 in the flow as an example.
[{"id":"e652f92a6aeb810f","type":"ui-template","z":"506727cd93754bdb","group":"090b012ba216c8fe","page":"","ui":"","name":"Icon","order":1,"width":0,"height":0,"head":"","format":"<template>\n <div>\n <h2>Icon</h2>\n <div>\n <v-img class = \"iconImage\" :src = \"iconSource\" :height = \"iconSize\" :width = \"iconSize\">\n </div>\n <div> \n <v-img class = \"iconImage\" :src = \"iconImageSource(0)\" :height = \"iconSize\" :width = \"iconSize\" style=\"display:true\">\n </div>\n <v-icon :size=\"iconSize\">{{mdiIcon}}</v-icon>\n </div>\n</template>\n\n\n<script>\n export default {\n data() {\n // define variables available component-wide\n // (in <template> and component functions)\n return {\n iconSize: 48,\n iconCode: '04d',\n\n iconSourceList: [],\n imageSourceURL: 'https://openweathermap.org/img/wn/',\n\n mdiIcon: 'mdi-cloud-outline'\n \n }\n },\n\n watch: {\n msg: function () {\n if (Array.isArray(this.msg.payload)) {\n this.createImageSourceList(this.msg.payload)\n\n } else {\n this.iconCode = this.msg.payload\n \n }\n\n },\n\n },\n\n computed: {\n // automatically compute this variable\n // whenever VueJS deems appropriate\n iconSource: function() {\n return `${this.imageSourceURL}${this.iconCode}.png`\n\n },\n \n },\n\n methods: {\n // Create all images for icon Array\n createImageSourceList(iconCodes) {\n this.iconSourceList = []\n iconCodes.forEach(iconCode => this.addImageSource(iconCode))\n\n },\n\n addImageSource(iconCode) {\n const source = `${this.imageSourceURL}${iconCode}.png`\n\n this.iconSourceList.push(source)\n\n },\n\n iconImageSource(iconNumber) {\n const source = this.iconSourceList[iconNumber]\n\n return source\n\n },\n }\n\n }\n</script>\n\n<style>\n .iconImage {\n background-color: grey;\n color: green;\n }\n</style>","storeOutMessages":true,"passthru":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":1410,"y":5100,"wires":[[]]},{"id":"9fc55f8d3a55a9ad","type":"inject","z":"506727cd93754bdb","name":"Image Array","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"02d\", \"10n\"]","payloadType":"json","x":1110,"y":5100,"wires":[["e652f92a6aeb810f"]]},{"id":"ea3d4f5786d9770d","type":"inject","z":"506727cd93754bdb","name":"Image Code","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"50d","payloadType":"str","x":1110,"y":5160,"wires":[["e652f92a6aeb810f"]]},{"id":"090b012ba216c8fe","type":"ui-group","name":"Icon","page":"c8690e5bce80ab2a","width":"3","height":1,"order":1,"showTitle":false,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"c8690e5bce80ab2a","type":"ui-page","name":"Analysis","ui":"b810194ea14e3502","path":"/analysis","icon":"database-eye","layout":"flex","theme":"5075a7d8e4947586","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"24"}],"order":7,"className":"","visible":"true","disabled":"false"},{"id":"b810194ea14e3502","type":"ui-base","name":"Dashboard 2 Examples","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-control","ui-notification"],"showPathInSidebar":false,"headerContent":"page","navigationStyle":"default","titleBarStyle":"default","showReconnectNotification":true,"notificationDisplayTime":5,"showDisconnectNotification":true,"allowInstall":true},{"id":"5075a7d8e4947586","type":"ui-theme","name":"Default Theme","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#ffffff","groupBg":"#eeeeee","groupOutline":"#cccccc"},"sizes":{"pagePadding":"12px","groupGap":"6px","groupBorderRadius":"4px","widgetGap":"12px","density":"default"}},{"id":"bf518c32f67d6fcd","type":"global-config","env":[],"modules":{"@flowfuse/node-red-dashboard":"1.26.0"}}]