implement icon overwrite

This commit is contained in:
joBr99
2023-11-20 17:18:22 +01:00
parent b55d2b9c06
commit 8a1b583794
2 changed files with 3 additions and 2 deletions

View File

@@ -23,8 +23,7 @@ class HAEntity(panel_cards.Entity):
# HA Entities # HA Entities
entity_type_panel = "text" entity_type_panel = "text"
icon_char = ha_icons.get_icon_ha(self.etype, self.state, self.attributes.get( icon_char = ha_icons.get_icon_ha(self.etype, self.state, device_class=self.attributes.get("device_class", None), media_content_type=self.attributes.get("media_content_type", None), overwrite=self.config.get("icon"))
"device_class", None), self.attributes.get("media_content_type", None))
color = ha_colors.get_entity_color( color = ha_colors.get_entity_color(
self.etype, self.state, self.attributes) self.etype, self.state, self.attributes)
name = self.attributes.get("friendly_name", "unknown") name = self.attributes.get("friendly_name", "unknown")

View File

@@ -141,6 +141,8 @@ def setup_panels():
settings_panel["timeZone"] = settings.get("timeZone", "Europe/Berlin") settings_panel["timeZone"] = settings.get("timeZone", "Europe/Berlin")
if "locale" not in settings_panel: if "locale" not in settings_panel:
settings_panel["timezone"] = settings.get("locale", "en_US") settings_panel["timezone"] = settings.get("locale", "en_US")
if "hiddenCards" not in settings_panel:
settings_panel["hiddenCards"] = settings.get("hiddenCards", [])
panels[name] = LovelaceUIPanel(client, name, settings_panel) panels[name] = LovelaceUIPanel(client, name, settings_panel)
libs.panel_cmd.page_type( libs.panel_cmd.page_type(