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:
Daniel Albert
2022-12-27 22:13:40 +01:00
committed by GitHub
parent dd2dac4eb6
commit 5b10a37aa7

View File

@@ -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