mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-23 07:54:25 +01:00
fixes #863
This commit is contained in:
@@ -6903,7 +6903,10 @@ def get_icon_id(ma_name):
|
||||
if "text:" in ma_name:
|
||||
return ma_name.replace("text:","")
|
||||
if "ha:" in ma_name:
|
||||
return apis.ha_api.render_template(ma_name.replace("ha:",""))
|
||||
splitted_string = ma_name.replace("ha:","").rpartition('}')
|
||||
template_string = f"{splitted_string[0]}{splitted_string[1]}"
|
||||
templates_result = apis.ha_api.render_template(template_string)
|
||||
return f"{templates_result}{splitted_string[2]}"
|
||||
if "ha-i:" in ma_name:
|
||||
ma_name = apis.ha_api.render_template(ma_name.replace("ha-i:",""))
|
||||
ma_name = ma_name.replace("mdi:","")
|
||||
|
||||
Reference in New Issue
Block a user