This commit is contained in:
Edward Firmo
2023-12-18 14:58:33 +01:00
parent aa56ae21d5
commit ffd657db9f

View File

@@ -3967,19 +3967,19 @@ variables:
switch: "\uE97D" # mdi:light-switch
unknown: "\uE027" # mdi:alert-circle
weather:
lightning: "\uE592" # mdi:weather-lightning
protect: "\uF05C" # mdi:shield-sun
rain: "\uE595" # mdi:weather-pouring
sun: "\uE5A7" # mdi:white-balance-sunny
wind: "\uE59C" # mdi:weather-windy
gauge: "\uE299" # mdi:gauge
unknown: "\uE027" # mdi:alert-circle
lightning: "\uE592" # mdi:weather-lightning
protect: "\uF05C" # mdi:shield-sun
rain: "\uE595" # mdi:weather-pouring
sun: "\uE5A7" # mdi:white-balance-sunny
wind: "\uE59C" # mdi:weather-windy
gauge: "\uE299" # mdi:gauge
unknown: "\uE027" # mdi:alert-circle
pic:
button:
"off": "35"
"on": "36"
weather:
sunny: '{{ "2" if sun_is_up else "15"}}' # some weather providers returns "sunny" for "clear-night"
sunny: '{{ "2" if sun_is_up else "15"}}' # some weather providers returns "sunny" for "clear-night"
cloudy: "3"
rainy: "4"
pouring: "5"
@@ -4045,7 +4045,7 @@ variables:
}}
mui:
bg: # Bulgarian
bg: # Bulgarian
weekdays:
mon: Понеделник
tue: Вторник
@@ -4116,7 +4116,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
cs: # Czech
cs: # Czech
weekdays:
mon: Pondělí
tue: Úterý
@@ -4187,7 +4187,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
da: # Danish
da: # Danish
weekdays:
mon: Mandag
tue: Tirsdag
@@ -4258,7 +4258,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
de: # German
de: # German
weekdays:
mon: Montag
tue: Dienstag
@@ -4329,7 +4329,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
el: # Greek
el: # Greek
weekdays:
mon: Δευτέρα
tue: Τρίτη
@@ -4400,7 +4400,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
en: # English
en: # English
weekdays:
mon: Monday
tue: Tuesday
@@ -4471,7 +4471,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
es: # Spanish
es: # Spanish
weekdays:
mon: Lunes
tue: Martes
@@ -4542,7 +4542,7 @@ variables:
bright: Brillante
dimming: Atenuación
dim: Oscuro
et: # Estonian
et: # Estonian
weekdays:
mon: Esmaspäev
tue: Teisipäev
@@ -4613,7 +4613,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
fi: # Finnish
fi: # Finnish
weekdays:
mon: maanantai
tue: tiistai
@@ -4684,7 +4684,7 @@ variables:
bright: Kirkas
dimming: Himmennys
dim: Himmeä
fr: # French
fr: # French
weekdays:
mon: Lundi
tue: Mardi
@@ -4755,7 +4755,7 @@ variables:
bright: Clair
dimming: Atténuation # Not in use at the moment
dim: Sombre
he: # Hebrew
he: # Hebrew
weekdays:
mon: ינש
tue: ישילש
@@ -4826,7 +4826,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
hr: # Croatian
hr: # Croatian
weekdays:
mon: Ponedjeljak
tue: Utorak
@@ -4897,7 +4897,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
hu: # Hungarian
hu: # Hungarian
weekdays:
mon: Hétfő
tue: Kedd
@@ -4968,7 +4968,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
id: # Indonesian
id: # Indonesian
weekdays:
mon: Senin
tue: Selasa
@@ -5039,7 +5039,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
it: # Italian
it: # Italian
weekdays:
mon: Lunedì
tue: Martedì
@@ -5110,7 +5110,7 @@ variables:
bright: Modalità Luminosa
dimming: Regolazione
dim: Reg.
lt: # Lithuanian
lt: # Lithuanian
weekdays:
mon: Pirmadienis
tue: Antradienis
@@ -5181,7 +5181,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
lv: # Latvian
lv: # Latvian
weekdays:
mon: Pirmdiena
tue: Otrdiena
@@ -5252,7 +5252,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
nb: # Norwegian
nb: # Norwegian
weekdays:
mon: Mandag
tue: Tirsdag
@@ -5323,7 +5323,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
nl: # Dutch
nl: # Dutch
weekdays:
mon: Maandag
tue: Dinsdag
@@ -5394,7 +5394,7 @@ variables:
bright: Helder
dimming: Dimmen # Not in use at the moment
dim: Gedimd
pl: # Polish
pl: # Polish
weekdays:
mon: Poniedziałek
tue: Wtorek
@@ -5465,7 +5465,7 @@ variables:
bright: Jasny
dimming: Ściemnianie
dim: Ciemny
pt: # Portuguese
pt: # Portuguese
weekdays:
mon: Segunda-feira
tue: Terça-feira
@@ -5536,7 +5536,7 @@ variables:
bright: Claro
dimming: Escurecer
dim: Escuro
ro: # Romanian
ro: # Romanian
weekdays:
mon: Luni
tue: Marți
@@ -5607,7 +5607,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
ru: # Russian
ru: # Russian
weekdays:
mon: Понедельник
tue: Вторник
@@ -5678,7 +5678,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
sk: # Slovak
sk: # Slovak
weekdays:
mon: Pondelok
tue: Utorok
@@ -5749,7 +5749,7 @@ variables:
bright: Zosvetlenie
dimming: Stmavenie # Not in use at the moment
dim: Stmavenie
sl: # Slovenian
sl: # Slovenian
weekdays:
mon: Ponedeljek
tue: Torek
@@ -5820,7 +5820,7 @@ variables:
bright: Svetlo
dimming: Zatemnitev
dim: Temno
sv: # Swedish
sv: # Swedish
weekdays:
mon: Måndag
tue: Tisdag
@@ -5891,7 +5891,7 @@ variables:
bright: Ljust
dimming: Dimmning
dim: Dimma
tr: # Turkish
tr: # Turkish
weekdays:
mon: Pazartesi
tue: Salı
@@ -5962,7 +5962,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
uk: # Ukrainian
uk: # Ukrainian
weekdays:
mon: Понеділок
tue: Вівторок
@@ -6033,7 +6033,7 @@ variables:
bright: Bright
dimming: Dimming
dim: Dim
zh-tw: # T.Chinese
zh-tw: # T.Chinese
weekdays:
mon: 星期一
tue: 星期二
@@ -6106,7 +6106,7 @@ variables:
dim: 調光
##### WEATHER ####
weather_entity_tmp: !input 'weather_entity' # used only during the creation of weather in variables
weather_entity_tmp: !input 'weather_entity' # used only during the creation of weather in variables
weather_entity: >
{% if weather_entity_tmp is string and weather_entity_tmp | length > 0 %} {{ weather_entity_tmp }}
{% elif states.weather | list | count > 0 %} {{ states.weather | map(attribute="entity_id") | list | first }}
@@ -6118,32 +6118,32 @@ variables:
buttons:
hvac_mode:
- mode: auto
icon: calendar-sync # ee8d
color: green #'19818'
icon: calendar-sync
color: green
component: button01
- mode: heat_cool
icon: autorenew # e069
color: amber #'65024'
icon: autorenew
color: amber
component: button02
- mode: heat
icon: fire # e237
color: deep-orange #'64164'
icon: fire
color: deep-orange
component: button03
- mode: cool
icon: snowflake # e716
color: blue #'1055'
icon: snowflake
color: blue
component: button04
- mode: dry
icon: water-percent # e58d
color: orange #'64704'
icon: water-percent
color: orange
component: button05
- mode: fan_only
icon: fan # e20f
color: cyan #'1530'
icon: fan
color: cyan
component: button06
- mode: "off"
icon: power # e424
color: "off" #'35921'
icon: power
color: "off"
component: button07
###### SYNC SETTINGS #####
@@ -6161,7 +6161,7 @@ variables:
domain_automation_button_action: !input domain_automation_button_action
enum:
color_mode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py
color_mode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py
unknown: "[<ColorMode.UNKNOWN: 'unknown'>]"
onoff: "[<ColorMode.ONOFF: 'onoff'>]"
brightness: "[<ColorMode.BRIGHTNESS: 'brightness'>]"
@@ -6895,7 +6895,7 @@ condition:
##### START - Action #####
#############################################################
action:
- if: '{{ false }}' # Global anchor repository
- if: '{{ false }}' #### Global anchor repository ####
then:
- variables:
entity_id: '{{ None }}'
@@ -7089,16 +7089,16 @@ action:
variables:
chip_font_size: !input chip_font_size
bt_notific:
icon: !input 'home_button04_icon' # E1ED
icon: !input 'home_button04_icon'
color_normal: !input 'home_button04_icon_color01'
color_unread: !input 'home_button04_icon_color02'
bt_entities:
enabled: !input 'entitypages_enabled'
icon: !input 'home_button06_icon' # EDCF
icon: !input 'home_button06_icon'
color_rgb: !input 'home_button06_icon_color'
bt_qrcode:
enabled: !input 'qrcode_enabled'
icon: !input 'home_button05_icon' # E432
icon: !input 'home_button05_icon'
color_rgb: !input 'home_button05_icon_color'
title: !input 'qrcode_label'
qrcode: !input 'qrcode_value'
@@ -8014,7 +8014,7 @@ action:
- *delay-default
- service: '{{ nextion.command.show }}'
data:
component: '255' # all
component: '255' # all components
continue_on_error: true
##### NSPanel build Button page #####
@@ -8033,13 +8033,13 @@ action:
item_domain: '{{ repeat.item.entity.split(".")[0] | default("unknown") }}'
current_entity_state: '{{ states(repeat.item.entity) | default("unavailable") }}'
current_entity_state_available: '{{ current_entity_state not in ["unavailable"] }}'
btn_state: > # Button state (on = true or off = false)
btn_state: > # Button state (on = true or off = false)
{{
(current_entity_state in ["on", "open", "opening", "home", "playing"] and item_domain not in ["automation"])
or (item_domain == "climate" and current_entity_state != "off")
or (item_domain in ["button","input_button","scene","automation", "remote"] and trigger.id is match "current_state_entity")
}}
btn_icon_font: > # Foreground color for icon
btn_icon_font: > # Foreground color for icon
{% if not current_entity_state_available %}
{{ nextion.color.red }}
{% elif item_domain in ["light"] %}
@@ -8073,7 +8073,7 @@ action:
{{ [ repeat.item.icon_color_rgb ] if is_number(repeat.item.icon_color_rgb) else repeat.item.icon_color_rgb }}
{% else %}{{ nextion.color.red }}
{% endif %}
btn_icon: > # Button's icon
btn_icon: > # Button's icon
{% if not current_entity_state_available %}{{ nextion.icon.domain.unknown }}
{% elif repeat.item.icon | length > 0 %}
{{
@@ -8087,13 +8087,13 @@ action:
{{ nextion.icon.domain[repeat.item.entity.split(".")[0] if repeat.item.entity else "unknown"] }}
{% else %}{{ nextion.icon.domain.unknown }}
{% endif %}
btn_label_tmp: > # Button's label (aux)
btn_label_tmp: > # Button's label (aux)
{{
repeat.item.name
if repeat.item.name is string and repeat.item.name | length > 0
else state_attr(repeat.item.entity, "friendly_name")
}}
btn_label: > # Button's label
btn_label: > # Button's label
{{
btn_label_tmp
if btn_label_tmp is string and btn_label_tmp | length > 0
@@ -8104,7 +8104,7 @@ action:
else ""
)
}}
btn_bri_txt: > # Buttons's value (brightness, temperature, etc.)
btn_bri_txt: > # Buttons's value (brightness, temperature, etc.)
{% if not current_entity_state_available %} 0
{% elif item_domain == "light" and current_entity_state == "on" and state_attr(repeat.item.entity, "brightness") != None %}
{{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}%
@@ -8154,14 +8154,14 @@ action:
- *delay-default
- service: '{{ nextion.command.show }}'
data:
component: '255' # all
component: '255' # all components
continue_on_error: true
else:
###### Show empty page #####
- *delay-default
- service: '{{ nextion.command.show }}'
data:
component: '255' # all
component: '255' # all components
continue_on_error: true
## PAGE LIGHT ##
@@ -8462,7 +8462,7 @@ action:
until:
- or:
- '{{ wait_completed }}'
- '{{ states(currentpage) != page.media_player }}' # Don't replace this by page.current as this have to be evaluated all the time
- '{{ states(currentpage) != page.media_player }}' # Don't replace this by page.current as this have to be evaluated all the time
- '{{ nspanel_event.type != "page_changed" }}'
## PAGE ALARM ##
@@ -9279,7 +9279,7 @@ action:
then:
- service: '{{ nextion.command.text_printf }}'
data:
component: '{{ page_name }}.temperature' ### Temperature MIN/MAX ###
component: '{{ page_name }}.temperature' ### Temperature MIN/MAX ###
message: '{{ temperature_string }}'
continue_on_error: true
- *delay-default
@@ -9550,7 +9550,7 @@ action:
- '{{ nspanel_event.type == "generic"}}'
sequence:
- choose:
- alias: light settings # rgb_color, brightness, color_temp - This was kept until we find a solution to call with rgb_color directly from ESPHome
- alias: light settings # rgb_color, brightness, color_temp - This was kept until we find a solution to call with rgb_color directly from ESPHome
conditions:
- '{{ nspanel_event.page == page.light }}'
- '{{ nspanel_event.component in ["rgb_color", "brightness_pct", "color_temp"] }}'
@@ -9615,7 +9615,7 @@ action:
- automation_reloaded
- ha_started
sequence:
- delay: > # Prevents all panels updating simultaneously in large systems
- delay: > # Prevents all panels updating simultaneously in large systems
{% set entities_list = states.binary_sensor | selectattr("entity_id", "search", "nextion_display") | map(attribute="entity_id") | list %}
{{ (4 * entities_list.index(nextion_inited)) if (entities_list | count > 0 and nextion_inited in entities_list) else 0 }}
- if: '{{ states.sensor | selectattr("entity_id", "eq", currentpage) | list | count > 0 }}'
@@ -9715,7 +9715,7 @@ action:
- alias: "Button pages"
conditions:
- '{{ page.current in page.buttonpages }}'
sequence: #*refresh_page_buttonpage
sequence:
- *variables-page_buttons
- repeat:
for_each: >
@@ -9926,8 +9926,6 @@ action:
- chip05_state
- chip06_state
- chip07_state
#- '{{ page.current == page.home }}'
#- '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
sequence:
- *variables-home_page_status_bar
- repeat: