From 5b10a37aa7c4913cd3ba73b52aa780170c32c7ae Mon Sep 17 00:00:00 2001 From: Daniel Albert <7432848+esclear@users.noreply.github.com> Date: Tue, 27 Dec 2022 22:13:40 +0100 Subject: [PATCH] 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 --- apps/nspanel-lovelace-ui/luibackend/pages.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 6bef5d10..b04ffb14 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -190,6 +190,9 @@ class LuiPagesGen(object): color = self.get_entity_color(entity, ha_type=entityType, overwrite=statusIcon.get("color", None)) status_res += f"~{icon}~{color}" 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}") # send color if configured in screensaver