This is the blockinfo (that works ok)
blocks[1285] = {}
blocks[1285]['title'] = 'Weer';
blocks[1285]['icon'] = 'fas fa-cloud-sun-rain';
blocks[1285]['hide_data'] = true;
blocks[1285]['width'] = 4;
blocks[1285]['switch'] =true;
And this is the first try of my first js script
Dont now how to change the icon
custom.js
function afterGetDevices(){
if (alldevices[1285].Data == 'bewolkt') {
blocks['1285']['icon'] = 'fa fa-cloud-rain';
}
elseif (alldevices[1285].Data == 'regen') {
blocks['1285']['icon'] = 'fa fa-cloud';
}
else {
blocks['1285']['icon'] = 'fa fa-cloud-rain';
}
}