diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_cards.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_cards.py
index 98a308d13..27a9c3ede 100644
--- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_cards.py
+++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_cards.py
@@ -18,7 +18,7 @@ def render(self, cardType=""):
if self.icon_overwrite and self.icon_overwrite.startswith("ha:"):
#icon_char = libs.home_assistant.render_template(self.icon_overwrite[3:])
- self.icon_overwrite = ha_template.render(self.icon_overwrite[3:])
+ self.icon_overwrite = ha_template.render(self.icon_overwrite)
if self.etype in ["delete", "navigate", "iText"]:
out = super().render()
diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py
index b6398634a..a291fd4de 100644
--- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py
+++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py
@@ -6904,16 +6904,14 @@
def get_icon_id(ma_name):
if isinstance(ma_name, re.Match):
ma_name = ma_name.group(0).replace('', '').replace('', '')
- print(f"testxxxx {ma_name}")
if "text:" in ma_name:
return ma_name.replace("text:", "")
- if "" in ma_name and "" in ma_name:
- print(f"testdddd {ma_name}")
- if isinstance(ma_name, str):
- ma_name = re.sub(r'.+?<\/I>', get_icon_id, ma_name)
- print(f"test123d {ma_name}")
- return ma_name
+ if "ha:" in ma_name:
+ if "" in ma_name and "" in ma_name:
+ if isinstance(ma_name, str):
+ ma_name = re.sub(r'.+?<\/I>', get_icon_id, ma_name)
+ return ma_name.replace("ha:", "")
ma_name = ma_name.replace("mdi:", "")
if ma_name in icons: