Skip to content

A live bird collage card for your Home Assistant dashboard.

Fix custom image displaying when its not set

ehpersonal38cff6e9ae17b3
diff --git a/scripts/overview.php b/scripts/overview.php
index 56cf40b6..3246012c 100644
--- a/scripts/overview.php
+++ b/scripts/overview.php
@@ -461,7 +461,7 @@ window.setInterval(function(){
document.getElementById("spectrogramimage").src = "/spectrogram.png?nocache="+Date.now();
}, <?php echo $refresh; ?>*1000);
-<?php if(isset($config["CUSTOM_IMAGE"])){?>
+<?php if(isset($config["CUSTOM_IMAGE"]) && strlen($config["CUSTOM_IMAGE"]) > 2){?>
// every 1 second, this loop will run and refresh the custom image
window.setInterval(function(){
// Find the customimage element