implement name overwrite

This commit is contained in:
joBr99
2023-11-20 17:27:18 +01:00
parent deefe6b33a
commit 6af48209e6

View File

@@ -26,7 +26,7 @@ class HAEntity(panel_cards.Entity):
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")) 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"))
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.config.get("name", self.attributes.get("friendly_name", "unknown"))
value = "" value = ""
match self.etype: match self.etype: