From c77eeb33755414cb70e493dc475e6078b7ab8a6b Mon Sep 17 00:00:00 2001 From: Johannes Date: Mon, 23 May 2022 16:33:19 +0200 Subject: [PATCH] move theme config to screensaver --- README.md | 6 ++---- apps/nspanel-lovelace-ui/luibackend/pages.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 79c61153..4e3a85c7 100644 --- a/README.md +++ b/README.md @@ -385,7 +385,6 @@ key | optional | type | default | description `dateAdditonalTemplate` | True | string | `" - {{ states('sun.sun') }}"` | Addional Text dispayed after Date, can contain Homeassistant Templates `dateFormat` | True | string | `%A, %d. %B %Y` | date format used if babel is not installed `cards` | False | complex | | configuration for cards that are displayed on panel -`theme` | True | complex | | configuration for theme `screensaver` | True | complex | | configuration for screensaver `hiddenCards` | True | complex | | configuration for cards that can be accessed though navigate items @@ -460,6 +459,7 @@ key | optional | type | default | description `weatherOverrideForecast4` | True | complex | `None` | sensor entity from home assistant here to override the forth weather forecast item on the screensaver `doubleTapToUnlock` | True | boolean | `False` | requires to tap screensaver two times `alternativeLayout` | True | boolean | `False` | alternative layout with humidity +`theme` | True | complex | | configuration for theme `defaultCard` | True | string | `None` | default page after exiting screensaver; only works with top level cards defined in cards; needs to be a navigation item, see subpages (navigate.type_key) This config option will also be evaluated as a HomeAssistant Template. `key` | True | string | `None` | Used by navigate items @@ -471,9 +471,7 @@ Example for the weatherOverride config options: name: name icon: lightbulb ``` -#### Possible configuration values for theme config - -This only works for the screensaver currently. +#### Possible configuration values for screensaver theme config key | option | type | default | description -- | -- | -- | -- | -- diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index eefb2820..f6db2aa0 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -438,7 +438,7 @@ class LuiPagesGen(object): if card.cardType == "screensaver": self.update_screensaver_weather() # send color if configured in theme - theme = self._config.get("theme") + theme = card.raw_config.get("theme") if theme is not None: self._send_mqtt_msg(get_screensaver_color_output(theme)) if card.cardType == "cardQR":