mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-08 14:26:34 +01:00
fix icon
This commit is contained in:
@@ -355,10 +355,10 @@ class LuiPagesGen(object):
|
|||||||
value = get_translation(self._locale, f"frontend.state_badge.alarm_control_panel.{entity.state}")
|
value = get_translation(self._locale, f"frontend.state_badge.alarm_control_panel.{entity.state}")
|
||||||
elif entityType == "media_player":
|
elif entityType == "media_player":
|
||||||
entityTypePanel = "text"
|
entityTypePanel = "text"
|
||||||
icon = get_icon_id('speaker-off')
|
icon_id = get_icon_id('speaker-off')
|
||||||
if "media_content_type" in entity.attributes:
|
if "media_content_type" in entity.attributes:
|
||||||
if entity.attributes.media_content_type == "music":
|
if entity.attributes.media_content_type == "music":
|
||||||
icon = get_icon_id("music")
|
icon_id = get_icon_id("music")
|
||||||
value = entity.state
|
value = entity.state
|
||||||
elif entityType == "sun":
|
elif entityType == "sun":
|
||||||
entityTypePanel = "text"
|
entityTypePanel = "text"
|
||||||
@@ -482,6 +482,7 @@ class LuiPagesGen(object):
|
|||||||
if not apis.ha_api.entity_exists(item):
|
if not apis.ha_api.entity_exists(item):
|
||||||
command = f"entityUpd~Not found~{navigation}~{item}~{get_icon_id('alert-circle-outline')}~Please check your~apps.yaml in AppDaemon~~0~{get_icon_id('alert-circle-outline')}~~~disable"
|
command = f"entityUpd~Not found~{navigation}~{item}~{get_icon_id('alert-circle-outline')}~Please check your~apps.yaml in AppDaemon~~0~{get_icon_id('alert-circle-outline')}~~~disable"
|
||||||
else:
|
else:
|
||||||
|
media_icon = self.generate_entities_item(entity, "cardGrid")
|
||||||
entity = apis.ha_api.get_entity(item)
|
entity = apis.ha_api.get_entity(item)
|
||||||
heading = title if title != "unknown" else entity.attributes.friendly_name
|
heading = title if title != "unknown" else entity.attributes.friendly_name
|
||||||
title = get_attr_safe(entity, "media_title", "")
|
title = get_attr_safe(entity, "media_title", "")
|
||||||
@@ -503,8 +504,6 @@ class LuiPagesGen(object):
|
|||||||
elif shuffle == True:
|
elif shuffle == True:
|
||||||
shuffleBtn = get_icon_id('shuffle')
|
shuffleBtn = get_icon_id('shuffle')
|
||||||
|
|
||||||
media_icon = self.generate_entities_item(item, "cardGrid")
|
|
||||||
|
|
||||||
item_str = ""
|
item_str = ""
|
||||||
for item in entities:
|
for item in entities:
|
||||||
item_str += self.generate_entities_item(item, "cardGrid")
|
item_str += self.generate_entities_item(item, "cardGrid")
|
||||||
|
|||||||
Reference in New Issue
Block a user