@resoai … managed to struggle my way through and here is the final code… https://paste.ubuntu.com/p/G2hG6R4dRT/
Final thing I am trying to do is… change the background based on the current weather situation. Totally new to JS and managed to scrape this together but appreciate your thoughts…
var type = this.parseFieldValue('&sensor.dark_sky_precip_0.state');{
if(type == "Sunny"){
document.body.style.backgroundImage = sunny.png";
}
else if (type == "partly cloudy"){
document.body.style.backgroundImage = "partly-cloudy.png";
}
else if (type == "cloudy"){
document.body.style.backgroundImage = "cloudy.png";
}
else if (type == "clear"){
document.body.style.backgroundImage = "clear.png";
}
else if (type == "thunder"){
document.body.style.backgroundImage = "thunder.png";
}
}