mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
Make single, right status icon possible (#640)
According to the [screensaver documentation](https://docs.nspanel.pky.eu/config-screensaver/), the `statusIcon2` option controls the status icon right of the date. However, if only `statusIcon2` is configured, it would have landed on the left side, instead of the right side. This commit adds padding for unconfigured status icons. Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
This commit is contained in:
@@ -190,6 +190,9 @@ class LuiPagesGen(object):
|
|||||||
color = self.get_entity_color(entity, ha_type=entityType, overwrite=statusIcon.get("color", None))
|
color = self.get_entity_color(entity, ha_type=entityType, overwrite=statusIcon.get("color", None))
|
||||||
status_res += f"~{icon}~{color}"
|
status_res += f"~{icon}~{color}"
|
||||||
altfont += f'~{statusIcon.get("altFont", "")}'
|
altfont += f'~{statusIcon.get("altFont", "")}'
|
||||||
|
else:
|
||||||
|
status_res += "~~"
|
||||||
|
altfont += "~"
|
||||||
|
|
||||||
self._send_mqtt_msg(f"weatherUpdate~{icon_cur}~{text_cur}{weather_res}{altLayout}{status_res}{altfont}")
|
self._send_mqtt_msg(f"weatherUpdate~{icon_cur}~{text_cur}{weather_res}{altLayout}{status_res}{altfont}")
|
||||||
# send color if configured in screensaver
|
# send color if configured in screensaver
|
||||||
|
|||||||
Reference in New Issue
Block a user