From f61f7618bc073ad447431124f08f9436e1fef4d7 Mon Sep 17 00:00:00 2001
From: "Edgar P. Burkhart" <git@edgarpierre.fr>
Date: Mon, 10 Mar 2025 00:03:52 +0100
Subject: [PATCH] Publish empty cover topic if artUrl is not found in MQTT
 response

---
 hasspy/mqtt.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hasspy/mqtt.py b/hasspy/mqtt.py
index 33bda54..e15fd6d 100644
--- a/hasspy/mqtt.py
+++ b/hasspy/mqtt.py
@@ -398,6 +398,7 @@ class HassUserClient(HassClient):
 
         artUrl = re.compile(r"mpris:artUrl\s+file://(.*)").search(out)
         if not artUrl:
+            self.publish(self.cover_topic, "")
             return
 
         art = artUrl.group(1)