mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-23 16:04:25 +01:00
fix nav icon overwrite
* Fixes typo The logic doesn't quite work because if icon is a dict then it tries to call get_icon_id which expects a string icon. * Wrong code committed - my bad * Update icons.py * Update pages.py Co-authored-by: Johannes <johannes+develop+github@braun-rheingau.de>
This commit is contained in:
@@ -77,7 +77,7 @@ cover_mapping = {
|
||||
def map_to_mdi_name(ha_type, state=None, device_class="_", cardType=None):
|
||||
if ha_type == "weather":
|
||||
return weather_mapping[state] if state in weather_mapping else "alert-circle-outline"
|
||||
elif ha_type == "button":
|
||||
elif ha_type in ["button", "navigate"]:
|
||||
return "gesture-tap-button"
|
||||
elif ha_type == "scene":
|
||||
return "palette"
|
||||
|
||||
@@ -165,7 +165,7 @@ class LuiPagesGen(object):
|
||||
if entityType == "navigate":
|
||||
page_search_res = self._config.searchCard(entityId)
|
||||
if page_search_res is not None:
|
||||
icon_res = get_icon_id(icon) if icon is not None else get_icon_id("gesture-tap-button")
|
||||
icon_res = get_icon_id_ha("navigate", overwrite=icon)
|
||||
status_entity = None
|
||||
name = name if name is not None else page_search_res.title
|
||||
text = get_translation(self._locale, "frontend.ui.card.button.press")
|
||||
|
||||
Reference in New Issue
Block a user