mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22c39e4c74 | ||
|
|
f3633498ad | ||
|
|
ec242a3c87 | ||
|
|
5538681a55 | ||
|
|
dc4c9517a4 | ||
|
|
c26ffc1a8e | ||
|
|
35e4819213 |
12
README.md
12
README.md
@@ -498,13 +498,21 @@ key | option | type | default | description
|
||||
`tMainTextAlt` | True | list | White | `[R, G, B]`
|
||||
`tMRIcon` | True | list | White | `[R, G, B]`
|
||||
`tMR` | True | list | White | `[R, G, B]`
|
||||
`autoWeather` | True | string | None | Set to `true` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence.
|
||||
`autoWeather` | True | boolean | false | Set to `true` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence.
|
||||
|
||||
If `autoWeather: true` is set. You may also override the default color mapping for any valid weather state provided by homeassistant e.g. `rainy: [50, 50, 255]` or `sunny: [255, 255, 0]`
|
||||
|
||||
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).
|
||||
Example for the theme config:
|
||||
|
||||
```yaml
|
||||
screensaver:
|
||||
theme:
|
||||
autoWeather: true
|
||||
```
|
||||
|
||||
For complex setups where you want to reuse the theme over multiple panels see the config exmaples in the appdaemon folder.
|
||||
|
||||
#### Schedule sleep brightness
|
||||
|
||||
|
||||
@@ -6,10 +6,14 @@ This folder contains some example configs
|
||||
|
||||
Example config for appademon itself
|
||||
|
||||
## apps.yaml
|
||||
## apps-simple.yaml
|
||||
|
||||
"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.
|
||||
Example screensaver theme configuration. All entries are commented out but you can uncomment as appropriate to enable.
|
||||
|
||||
## screensaver-theme-include
|
||||
|
||||
Exmaple for screensaver theme configuration in seperate file to reuse it on muliple nspanels
|
||||
56
appdaemon/apps-theme.yaml
Normal file
56
appdaemon/apps-theme.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
nspanel-1:
|
||||
module: nspanel-lovelace-ui
|
||||
class: NsPanelLovelaceUIManager
|
||||
config:
|
||||
panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT"
|
||||
panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend"
|
||||
screensaver:
|
||||
entity: weather.k3ll3r
|
||||
theme: !include /config/appdaemon/apps/screensaver-theme.yaml
|
||||
#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]
|
||||
cards:
|
||||
- type: cardEntities
|
||||
entities:
|
||||
- entity: switch.example_item
|
||||
15
appdaemon/screensaver-theme-include/apps.yaml
Normal file
15
appdaemon/screensaver-theme-include/apps.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
nspanel-1:
|
||||
module: nspanel-lovelace-ui
|
||||
class: NsPanelLovelaceUIManager
|
||||
config:
|
||||
panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT"
|
||||
panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend"
|
||||
updateMode: "auto-notify"
|
||||
screensaver:
|
||||
entity: weather.k3ll3r
|
||||
theme: !include /config/appdaemon/apps/screensaver-theme.yaml
|
||||
cards:
|
||||
- type: cardEntities
|
||||
entities:
|
||||
- entity: switch.example_item
|
||||
@@ -20,6 +20,9 @@ translations = {
|
||||
'brightness': "Helderheid",
|
||||
'color_temperature': "Kleur temperatuur",
|
||||
'position': "Posisie",
|
||||
'state': "Toestand",
|
||||
'currently': "Tans",
|
||||
'operation': "Operasie",
|
||||
},
|
||||
'ar': {
|
||||
'ACTIVATE': "تفعيل",
|
||||
@@ -42,6 +45,9 @@ translations = {
|
||||
'brightness': "السطوع",
|
||||
'color_temperature': "درجة حرارة اللون",
|
||||
'position': "موضع",
|
||||
'state': "الحالة",
|
||||
'currently': "حاليا",
|
||||
'operation': "الوضع",
|
||||
},
|
||||
'bg': {
|
||||
'ACTIVATE': "Активирай",
|
||||
@@ -65,6 +71,9 @@ translations = {
|
||||
'brightness': "Яркост",
|
||||
'color_temperature': "Цветова температура",
|
||||
'position': "Позиция",
|
||||
'state': "Състояние",
|
||||
'currently': "В момента",
|
||||
'operation': "Режим",
|
||||
},
|
||||
'ca': {
|
||||
'PRESS': "Prem",
|
||||
@@ -89,6 +98,9 @@ translations = {
|
||||
'brightness': "Brillantor",
|
||||
'color_temperature': "Temperatura de color",
|
||||
'position': "Posició",
|
||||
'state': "Estat",
|
||||
'currently': "Actual",
|
||||
'operation': "Funcionament",
|
||||
},
|
||||
'cs': {
|
||||
'PRESS': "Stisknutí",
|
||||
@@ -113,6 +125,9 @@ translations = {
|
||||
'brightness': "Jas",
|
||||
'color_temperature': "Teplota barvy",
|
||||
'position': "Pozice",
|
||||
'state': "Stav",
|
||||
'currently': "Aktuálně",
|
||||
'operation': "Provoz",
|
||||
},
|
||||
'da': {
|
||||
'PRESS': "Tryk",
|
||||
@@ -137,6 +152,9 @@ translations = {
|
||||
'brightness': "Lysstyrke",
|
||||
'color_temperature': "Farvetemperatur",
|
||||
'position': "Position",
|
||||
'state': "Tilstand",
|
||||
'currently': "Aktuelt",
|
||||
'operation': "Drifttype",
|
||||
},
|
||||
'de': {
|
||||
'PRESS': "Drücken",
|
||||
@@ -161,6 +179,9 @@ translations = {
|
||||
'brightness': "Helligkeit",
|
||||
'color_temperature': "Farbtemperatur",
|
||||
'position': "Position",
|
||||
'state': "Zustand",
|
||||
'currently': "Aktuell",
|
||||
'operation': "Aktion",
|
||||
},
|
||||
'el': {
|
||||
'PRESS': "Πατήστε",
|
||||
@@ -185,6 +206,9 @@ translations = {
|
||||
'brightness': "Φωτεινότητα",
|
||||
'color_temperature': "Θερμοκρασία χρώματος",
|
||||
'position': "Θέση",
|
||||
'state': "Κατάσταση",
|
||||
'currently': "Αυτή τη στιγμή",
|
||||
'operation': "Λειτουργία",
|
||||
},
|
||||
'en': {
|
||||
'PRESS': "Press",
|
||||
@@ -209,6 +233,9 @@ translations = {
|
||||
'brightness': "Brightness",
|
||||
'color_temperature': "Color temperature",
|
||||
'position': "Position",
|
||||
'state': "State",
|
||||
'currently': "Currently",
|
||||
'operation': "Operation",
|
||||
},
|
||||
'es': {
|
||||
'PRESS': "Pulsa",
|
||||
@@ -233,6 +260,9 @@ translations = {
|
||||
'brightness': "Brillo",
|
||||
'color_temperature': "Temperatura del color",
|
||||
'position': "Posición",
|
||||
'state': "Estado",
|
||||
'currently': "Actualmente",
|
||||
'operation': "Modo",
|
||||
},
|
||||
'et': {
|
||||
'PRESS': "Vajuta nuppu",
|
||||
@@ -257,6 +287,9 @@ translations = {
|
||||
'brightness': "Heledus",
|
||||
'color_temperature': "Värvustemperatuur",
|
||||
'position': "Asend",
|
||||
'state': "Olek",
|
||||
'currently': "Hetkel",
|
||||
'operation': "Töörežiim",
|
||||
},
|
||||
'fa': {
|
||||
'ACTIVATE': "فعال سازی",
|
||||
@@ -279,6 +312,9 @@ translations = {
|
||||
'brightness': "روشنایی",
|
||||
'color_temperature': "دمای رنگ",
|
||||
'position': "موقعیت",
|
||||
'state': "حالت",
|
||||
'currently': "در حال حاضر",
|
||||
'operation': "عملیات",
|
||||
},
|
||||
'fi': {
|
||||
'PRESS': "Paina",
|
||||
@@ -303,6 +339,9 @@ translations = {
|
||||
'brightness': "Kirkkaus",
|
||||
'color_temperature': "Värilämpötila",
|
||||
'position': "Sijainti",
|
||||
'state': "Tila",
|
||||
'currently': "Tällä hetkellä",
|
||||
'operation': "Toiminto",
|
||||
},
|
||||
'fr': {
|
||||
'PRESS': "Appui",
|
||||
@@ -327,6 +366,9 @@ translations = {
|
||||
'brightness': "Luminosité",
|
||||
'color_temperature': "Température de couleur",
|
||||
'position': "Position",
|
||||
'state': "État",
|
||||
'currently': "Actuellement",
|
||||
'operation': "Opération",
|
||||
},
|
||||
'he': {
|
||||
'PRESS': "לחיצה",
|
||||
@@ -351,6 +393,9 @@ translations = {
|
||||
'brightness': "בהירות",
|
||||
'color_temperature': "טמפרטורת הצבע",
|
||||
'position': "מיקום",
|
||||
'state': "מצב",
|
||||
'currently': "כעת",
|
||||
'operation': "פעולה",
|
||||
},
|
||||
'hr': {
|
||||
'ACTIVATE': "Aktivirati",
|
||||
@@ -373,6 +418,9 @@ translations = {
|
||||
'brightness': "Svjetlina",
|
||||
'color_temperature': "Temperatura boje",
|
||||
'position': "Pozicija",
|
||||
'state': "Stanje",
|
||||
'currently': "Trenutno",
|
||||
'operation': "operacija",
|
||||
},
|
||||
'hu': {
|
||||
'PRESS': "Gombnyomás",
|
||||
@@ -397,6 +445,9 @@ translations = {
|
||||
'brightness': "Fényerő",
|
||||
'color_temperature': "Színhőmérséklet",
|
||||
'position': "Pozíció",
|
||||
'state': "Állapot",
|
||||
'currently': "Jelenleg",
|
||||
'operation': "Működés",
|
||||
},
|
||||
'hy': {
|
||||
'ACTIVATE': "Ակտիվացնել",
|
||||
@@ -418,6 +469,9 @@ translations = {
|
||||
'brightness': "Պայծառություն",
|
||||
'color_temperature': "Գունային ջերմաստիճան",
|
||||
'position': "Դիրք",
|
||||
'state': "Պետություն",
|
||||
'currently': "Ներկայումս",
|
||||
'operation': "Գործողություն",
|
||||
},
|
||||
'id': {
|
||||
'PRESS': "Tekan",
|
||||
@@ -442,6 +496,9 @@ translations = {
|
||||
'brightness': "Kecerahan",
|
||||
'color_temperature': "Temperatur warna",
|
||||
'position': "Posisi",
|
||||
'state': "Status",
|
||||
'currently': "Saat ini",
|
||||
'operation': "Operasi",
|
||||
},
|
||||
'is': {
|
||||
'PRESS': "Ýttu á",
|
||||
@@ -465,6 +522,9 @@ translations = {
|
||||
'brightness': "Birtustig",
|
||||
'color_temperature': "Litastig",
|
||||
'position': "Staðsetning",
|
||||
'state': "Staða",
|
||||
'currently': "Er núna",
|
||||
'operation': "Aðgerð",
|
||||
},
|
||||
'it': {
|
||||
'PRESS': "Premi",
|
||||
@@ -489,6 +549,9 @@ translations = {
|
||||
'brightness': "Luminosità",
|
||||
'color_temperature': "Temperatura colore",
|
||||
'position': "Apertura",
|
||||
'state': "Stato",
|
||||
'currently': "Attualmente",
|
||||
'operation': "Operazione",
|
||||
},
|
||||
'lb': {
|
||||
'ACTIVATE': "Aktivéieren",
|
||||
@@ -511,6 +574,9 @@ translations = {
|
||||
'brightness': "Hellegkeet",
|
||||
'color_temperature': "Faarf Temperatur",
|
||||
'position': "Positioun",
|
||||
'state': "Zoustand",
|
||||
'currently': "Momentan",
|
||||
'operation': "Aktioun",
|
||||
},
|
||||
'lt': {
|
||||
'ACTIVATE': "Suaktyvinti",
|
||||
@@ -532,6 +598,9 @@ translations = {
|
||||
'brightness': "Ryškumas",
|
||||
'color_temperature': "Spalvos temperatūra",
|
||||
'position': "Padėtis",
|
||||
'state': "Būsena",
|
||||
'currently': "Šiuo metu",
|
||||
'operation': "Operacija",
|
||||
},
|
||||
'lv': {
|
||||
'ACTIVATE': "Aktivizēt",
|
||||
@@ -553,6 +622,9 @@ translations = {
|
||||
'brightness': "Spilgtums",
|
||||
'color_temperature': "Krāsu temperatūra",
|
||||
'position': "Pozīcija",
|
||||
'state': "Stāvoklis",
|
||||
'currently': "Pašlaik",
|
||||
'operation': "Darbība",
|
||||
},
|
||||
'nb': {
|
||||
'PRESS': "trykk",
|
||||
@@ -577,6 +649,9 @@ translations = {
|
||||
'brightness': "Lysstyrke",
|
||||
'color_temperature': "Fargetemperatur",
|
||||
'position': "Posisjon",
|
||||
'state': "Tilstand",
|
||||
'currently': "Er nå",
|
||||
'operation': "Operasjon",
|
||||
},
|
||||
'nl': {
|
||||
'PRESS': "Klik",
|
||||
@@ -601,6 +676,9 @@ translations = {
|
||||
'brightness': "Helderheid",
|
||||
'color_temperature': "Kleurtemperatuur",
|
||||
'position': "Positie",
|
||||
'state': "Staat",
|
||||
'currently': "Momenteel",
|
||||
'operation': "Werking",
|
||||
},
|
||||
'nn': {
|
||||
'ACTIVATE': "Aktiver",
|
||||
@@ -624,6 +702,9 @@ translations = {
|
||||
'brightness': "Lysstyrke",
|
||||
'color_temperature': "Fargetemperatur",
|
||||
'position': "Posisjon",
|
||||
'state': "Tilstand",
|
||||
'currently': "Akkurat no",
|
||||
'operation': "Operasjon",
|
||||
},
|
||||
'pl': {
|
||||
'PRESS': "Naciśnij",
|
||||
@@ -648,6 +729,9 @@ translations = {
|
||||
'brightness': "Jasność",
|
||||
'color_temperature': "Temperatura barwy",
|
||||
'position': "Pozycja",
|
||||
'state': "Stan",
|
||||
'currently': "Obecnie",
|
||||
'operation': "Tryb pracy",
|
||||
},
|
||||
'pt': {
|
||||
'PRESS': "Pressione",
|
||||
@@ -671,6 +755,9 @@ translations = {
|
||||
'brightness': "Brilho",
|
||||
'color_temperature': "Temperatura de cor",
|
||||
'position': "Posição",
|
||||
'state': "Estado",
|
||||
'currently': "Atualmente",
|
||||
'operation': "Operação",
|
||||
},
|
||||
'ro': {
|
||||
'ACTIVATE': "Activați",
|
||||
@@ -694,6 +781,9 @@ translations = {
|
||||
'brightness': "Luminozitate",
|
||||
'color_temperature': "Temperatură de culoare",
|
||||
'position': "Poziţie",
|
||||
'state': "Status",
|
||||
'currently': "În prezent",
|
||||
'operation': "Operație",
|
||||
},
|
||||
'ru': {
|
||||
'PRESS': "Нажать",
|
||||
@@ -718,6 +808,9 @@ translations = {
|
||||
'brightness': "Яркость",
|
||||
'color_temperature': "Цветовая температура",
|
||||
'position': "Положение",
|
||||
'state': "Состояние",
|
||||
'currently': "Сейчас",
|
||||
'operation': "Режим работы",
|
||||
},
|
||||
'sk': {
|
||||
'ACTIVATE': "Aktivovať",
|
||||
@@ -741,6 +834,9 @@ translations = {
|
||||
'brightness': "Jas",
|
||||
'color_temperature': "Teplota farby",
|
||||
'position': "Poloha",
|
||||
'state': "Stav",
|
||||
'currently': "Aktuálne",
|
||||
'operation': "Prevádzka",
|
||||
},
|
||||
'sl': {
|
||||
'PRESS': "Pritisnite",
|
||||
@@ -764,6 +860,9 @@ translations = {
|
||||
'brightness': "Svetlost",
|
||||
'color_temperature': "Temperatura barve",
|
||||
'position': "Položaj",
|
||||
'state': "Stanje",
|
||||
'currently': "Trenutno",
|
||||
'operation': "Delovanje",
|
||||
},
|
||||
'sv': {
|
||||
'PRESS': "Tryck",
|
||||
@@ -788,6 +887,9 @@ translations = {
|
||||
'brightness': "Ljusstyrka",
|
||||
'color_temperature': "Färgtemperatur",
|
||||
'position': "Position",
|
||||
'state': "Tillstånd",
|
||||
'currently': "Nuvarande",
|
||||
'operation': "Driftläge",
|
||||
},
|
||||
'th': {
|
||||
'PRESS': "กด",
|
||||
@@ -810,6 +912,9 @@ translations = {
|
||||
'brightness': "ความสว่าง",
|
||||
'color_temperature': "อุณหภูมิสี",
|
||||
'position': "ตำแหน่ง",
|
||||
'state': "สถานะ",
|
||||
'currently': "ในขณะนี้",
|
||||
'operation': "การทำงาน",
|
||||
},
|
||||
'tr': {
|
||||
'PRESS': "Basınız",
|
||||
@@ -834,6 +939,9 @@ translations = {
|
||||
'brightness': "Parlaklık",
|
||||
'color_temperature': "Renk sıcaklığı",
|
||||
'position': "Pozisyon",
|
||||
'state': "Durum",
|
||||
'currently': "Şu an",
|
||||
'operation': "İşlem",
|
||||
},
|
||||
'uk': {
|
||||
'PRESS': "Натисніть",
|
||||
@@ -857,6 +965,9 @@ translations = {
|
||||
'brightness': "Яскравість",
|
||||
'color_temperature': "Кольорова температура",
|
||||
'position': "Положення",
|
||||
'state': "Статус",
|
||||
'currently': "В даний час",
|
||||
'operation': "Режим",
|
||||
},
|
||||
'vi': {
|
||||
'ACTIVATE': "Kích hoạt",
|
||||
@@ -879,6 +990,9 @@ translations = {
|
||||
'brightness': "Độ sáng",
|
||||
'color_temperature': "Nhiệt độ màu",
|
||||
'position': "Vị trí",
|
||||
'state': "Trạng thái",
|
||||
'currently': "Hiện tại",
|
||||
'operation': "Chế độ hoạt động",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -889,3 +1003,4 @@ def get_translation(locale, input):
|
||||
return translations.get(locale).get(input, en_fallback_res)
|
||||
else:
|
||||
return en_fallback_res
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ class LuiPagesGen(object):
|
||||
for mode in hvac_modes:
|
||||
icon_id = get_icon_id('alert-circle-outline')
|
||||
color_on = 64512
|
||||
if mode == "auto":
|
||||
if mode in ["auto", "heat_cool"]:
|
||||
icon_id = get_icon_id("calendar-sync")
|
||||
color_on = 1024
|
||||
if mode == "heat":
|
||||
@@ -305,7 +305,11 @@ class LuiPagesGen(object):
|
||||
padding_len = 8-len_hvac_modes
|
||||
icon_res = icon_res + "~"*4*padding_len
|
||||
|
||||
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{status}~{min_temp}~{max_temp}~{step_temp}{icon_res}~Currently~State~Action~{temperature_unit_icon}"
|
||||
currently_translation = get_translation(self._locale, "currently")
|
||||
state_translation = get_translation(self._locale, "state")
|
||||
action_translation = get_translation(self._locale, "operation")
|
||||
|
||||
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{status}~{min_temp}~{max_temp}~{step_temp}{icon_res}~{currently_translation}~{state_translation}~{action_translation}~{temperature_unit_icon}"
|
||||
self._send_mqtt_msg(command)
|
||||
|
||||
def generate_media_page(self, navigation, title, entity):
|
||||
|
||||
Reference in New Issue
Block a user