mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
implement icon overwrite
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user