mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-20 05:04:44 +01:00
implements a new icon type that can be used to display home assistant templates
This commit is contained in:
@@ -6897,9 +6897,13 @@ icons = {
|
||||
'zodiac-virgo': '',
|
||||
}
|
||||
|
||||
import apis
|
||||
|
||||
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:",""))
|
||||
ma_name = ma_name.replace("mdi:","")
|
||||
if ma_name in icons:
|
||||
return icons[ma_name]
|
||||
|
||||
Reference in New Issue
Block a user