From 4fb3204f7316a05c876a31c5f9b3d77d7107ba02 Mon Sep 17 00:00:00 2001 From: illuzn Date: Thu, 26 May 2022 00:30:19 +0930 Subject: [PATCH] Better handling of screensaver-theme. --- README.md | 2 ++ appdaemon/README.md | 3 +++ appdaemon/appdaemon.yaml | 1 + appdaemon/apps.yaml | 39 +-------------------------- appdaemon/screensaver-theme.yaml | 46 ++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 38 deletions(-) create mode 100644 appdaemon/screensaver-theme.yaml diff --git a/README.md b/README.md index 08cb806e..dc6c16de 100644 --- a/README.md +++ b/README.md @@ -504,6 +504,8 @@ If `autoWeather: true` is set. You may also override the default color mapping f Specify colours as red green and blue values from 0-255 e.g. `[255, 0, 0]` for red or `[0, 0, 255]` for blue. These are translated internally to RGB565 (note that this has lower color depth so the colours may not appear the same). Also note that the screen has a low contrast ratio, so colors look sigificantly different at full display brightness and lowest brightness. +For complex theme setups, you may configure `theme: !include /config/appdaemon/apps/screensaver-theme.yaml` and download `screensaver-theme.yaml` from the appdaemon folder and place it in the same folder as `apps.yaml`. Note: this will cause AppDaemon to throw a warning that `screensaver-theme.yaml` is not a valid yaml file - this warning can be safely ignored or you can configure `invalid_yaml_warnings: 1` (see appdaemon.yaml in the appdaemon folder). + #### Schedule sleep brightness It is possible to schedule a brightness change for the screen at specific times. diff --git a/appdaemon/README.md b/appdaemon/README.md index 230a0804..b7599987 100644 --- a/appdaemon/README.md +++ b/appdaemon/README.md @@ -10,3 +10,6 @@ Example config for appademon itself "Simple" Example Config with all possible entity types +## screensaver-theme.yaml + +Example screensaver theme configuration. All entries are commented out but you can uncomment as appropriate to enable. \ No newline at end of file diff --git a/appdaemon/appdaemon.yaml b/appdaemon/appdaemon.yaml index 567a072b..c979b64e 100644 --- a/appdaemon/appdaemon.yaml +++ b/appdaemon/appdaemon.yaml @@ -5,6 +5,7 @@ appdaemon: longitude: 4.0 elevation: 2 time_zone: Europe/Berlin +# invalid_yaml_warnings: 1 plugins: HASS: type: hass diff --git a/appdaemon/apps.yaml b/appdaemon/apps.yaml index aabd85f6..8746a424 100644 --- a/appdaemon/apps.yaml +++ b/appdaemon/apps.yaml @@ -21,44 +21,7 @@ nspanel-1: name: name icon: lightbulb alternativeLayout: True - theme: - background: [0, 0, 0] - time: [220, 0, 255] - timeAMPM: [220, 0, 255] - date: [220, 0, 255] - tMainIcon: [220, 0, 255] - tMainText: [220, 0, 255] - tForecast1: [220, 0, 255] - tForecast2: [220, 0, 255] - tForecast3: [220, 0, 255] - tForecast4: [220, 0, 255] - tF1Icon: [220, 0, 255] - tF2Icon: [220, 0, 255] - tF3Icon: [220, 0, 255] - tF4Icon: [220, 0, 255] - tForecast1Val: [220, 0, 255] - tForecast2Val: [220, 0, 255] - tForecast3Val: [220, 0, 255] - tForecast4Val: [220, 0, 255] - bar: [220, 0, 255] - tMRIcon: [220, 0, 255] - tMR: [220, 0, 255] - autoWeather: true - clear-night: [220, 0, 255] - cloudy: [220, 0, 255] - exceptional: [220, 0, 255] - fog: [220, 0, 255] - hail: [220, 0, 255] - lightning: [220, 0, 255] - lightning-rainy: [220, 0, 255] - partlycloudy: [220, 0, 255] - pouring: [220, 0, 255] - rainy: [50, 50, 255] - snowy: [220, 0, 255] - snowy-rainy: [100, 100, 255] - sunny: [220, 0, 255] - windy: [220, 0, 255] - windy-variant: [220, 0, 255] +# theme: !include /config/appdaemon/apps/screensaver-theme.yaml cards: - type: cardEntities entities: diff --git a/appdaemon/screensaver-theme.yaml b/appdaemon/screensaver-theme.yaml new file mode 100644 index 00000000..89e17b50 --- /dev/null +++ b/appdaemon/screensaver-theme.yaml @@ -0,0 +1,46 @@ +#Uncomment by deleting the '#' and configure as you see fit. +#Colors are in the format [Red, Green, Blue] and can be numbers from 0-255 +#The items shoud be self-explanatory but tMRIcon affects the humidity icon and tMR affects the humidity text. + +#background: [220, 0, 0] +#time: [220, 0, 255] +#timeAMPM: [220, 0, 255] +#date: [220, 0, 255] +#tMainIcon: [220, 0, 255] +#tMainText: [220, 0, 255] +#tForecast1: [220, 0, 255] +#tForecast2: [220, 0, 255] +#tForecast3: [220, 0, 255] +#tForecast4: [220, 0, 255] +#tF1Icon: [220, 0, 255] +#tF2Icon: [220, 0, 255] +#tF3Icon: [220, 0, 255] +#tF4Icon: [220, 0, 255] +#tForecast1Val: [220, 0, 255] +#tForecast2Val: [220, 0, 255] +#tForecast3Val: [220, 0, 255] +#tForecast4Val: [220, 0, 255] +#bar: [220, 0, 255] +#tMRIcon: [220, 0, 255] +#tMR: [220, 0, 255] + +#autoWeather automatically colors the screensaver weather icons based upon weather. Uncomment the following line to enable. +#autoWeather: true + +#If you have enabled autoWeather, the following options allow you to customise the colors used for autoWeather. + +#clear-night: [150, 150, 100] +#cloudy: [75, 75, 75] +#exceptional: [255, 50, 50] +#fog: [150, 150, 150] +#hail: [200, 200, 200] +#lightning: [200, 200, 0] +#lightning-rainy: [200, 200, 150] +#partlycloudy: [150, 150, 150] +#pouring: [50, 50, 255] +#rainy: [100, 100, 255] +#snowy: [150, 150, 150] +#snowy-rainy: [150, 150, 255] +#sunny: [255, 255, 0] +#windy: [150, 150, 150] +#windy-variant: [255, 125, 125] \ No newline at end of file