mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 06:54:24 +01:00
.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||||
name: NSPanel Lovelace UI Addon
|
name: NSPanel Lovelace UI Addon
|
||||||
version: "4.7.49"
|
version: "4.7.51"
|
||||||
slug: nspanel-lovelace-ui
|
slug: nspanel-lovelace-ui
|
||||||
description: NSPanel Lovelace UI Addon
|
description: NSPanel Lovelace UI Addon
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ class HAEntity(panel_cards.Entity):
|
|||||||
|
|
||||||
def render(self, cardType=""):
|
def render(self, cardType=""):
|
||||||
|
|
||||||
if "icon" in self.config and self.config.get("icon").startswith("ha:"):
|
config_icon = self.config.get("icon", None)
|
||||||
self.icon_overwrite = libs.home_assistant.get_template(self.config.get("icon"))
|
if config_icon and isinstance(config_icon, str) and config_icon.startswith("ha:"):
|
||||||
if "color" in self.config and self.config.get("color").startswith("ha:"):
|
self.icon_overwrite = libs.home_assistant.get_template(config_icon)
|
||||||
self.color_overwrite = libs.home_assistant.get_template(self.config.get("color"))
|
config_color = self.config.get("color", None)
|
||||||
|
if config_color and isinstance(config_color, str) and config_color.startswith("ha:"):
|
||||||
|
self.color_overwrite = libs.home_assistant.get_template(config_color)
|
||||||
|
|
||||||
if self.etype in ["delete", "navigate", "iText"]:
|
if self.etype in ["delete", "navigate", "iText"]:
|
||||||
out = super().render()
|
out = super().render()
|
||||||
|
|||||||
Reference in New Issue
Block a user