upd: v3.2.2
This commit is contained in:
@@ -35,7 +35,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
|
||||
🎉 Roadmap Roadmap can be found here [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap)
|
||||
|
||||
|
||||
ℹ️ Version: v.3.2.1
|
||||
ℹ️ Version: v.3.2.2
|
||||
|
||||
'
|
||||
|
||||
@@ -2356,7 +2356,7 @@ trigger_variables:
|
||||
|
||||
variables:
|
||||
##### GENERAL #####
|
||||
blueprint_version: "3.2.1"
|
||||
blueprint_version: "3.2.2"
|
||||
language: !input "language"
|
||||
date_format: !input "date_format"
|
||||
time_format: !input "time_format"
|
||||
@@ -4830,92 +4830,7 @@ action:
|
||||
{%- else -%} 0
|
||||
{%- endif -%}
|
||||
|
||||
# ##### SET Buttons Background ####
|
||||
# #
|
||||
# ##### SET Button PIC #####
|
||||
# - service: "{{ command_printf }}"
|
||||
# data:
|
||||
# cmd: "{{ repeat.item.button }}pic.pic={{ btn_pic }}"
|
||||
# ##### SET ICON Background #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_background_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}icon"
|
||||
# message: "{{ btn_bg }}"
|
||||
# ##### SET LABEL Background #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_background_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}text"
|
||||
# message: "{{ btn_bg }}"
|
||||
# ##### SET BRIGHTNESS Background Color #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_background_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}bri"
|
||||
# message: "{{ btn_bg }}"
|
||||
|
||||
# ##### SET Buttons Font Color ####
|
||||
# #
|
||||
# ##### SET ICON Font Color #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_font_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}icon"
|
||||
# message: "{{ btn_icon_font }}"
|
||||
# ##### SET LABEL Font Color #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_font_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}text"
|
||||
# message: "{{ btn_txt_font }}"
|
||||
# ##### SET BRIGHTNESS Font Color #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_font_color }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}bri"
|
||||
# message: "{{ btn_bri_font }}"
|
||||
|
||||
# ##### SET Buttons Text Value ####
|
||||
# #
|
||||
# ##### "ICON" Value #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_text_printf }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}icon"
|
||||
# message: "{{ btn_icon }}"
|
||||
# ##### "LABEL" Value #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - service: "{{ command_text_printf }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}text"
|
||||
# message: "{{ btn_label }}"
|
||||
|
||||
# ##### "BRIGHTNESS" Value #####
|
||||
# - delay:
|
||||
# milliseconds: "{{ delay_value }}"
|
||||
# - if:
|
||||
# - condition: template
|
||||
# value_template: "{{ btn_bri_txt == 0 }}"
|
||||
# then:
|
||||
# - service: "{{ command_text_printf }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}bri"
|
||||
# message: " "
|
||||
# else:
|
||||
# - service: "{{ command_text_printf }}"
|
||||
# data:
|
||||
# component: "{{ repeat.item.button }}bri"
|
||||
# message: "{{ btn_bri_txt }}"
|
||||
|
||||
##### Set buttton #####
|
||||
- service: "{{ command_set_button }}"
|
||||
data:
|
||||
btn_id: "{{ repeat.item.button }}"
|
||||
@@ -5094,91 +5009,19 @@ action:
|
||||
{%- else -%} 0
|
||||
{%- endif -%}
|
||||
|
||||
##### SET Buttons Background ####
|
||||
#
|
||||
##### SET Button PIC #####
|
||||
- service: "{{ command_printf }}"
|
||||
##### Set buttton #####
|
||||
- service: "{{ command_set_button }}"
|
||||
data:
|
||||
cmd: "{{ repeat.item.button }}pic.pic={{ btn_pic }}"
|
||||
##### SET ICON Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET LABEL Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET BRIGHTNESS Background Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bg }}"
|
||||
btn_id: "{{ repeat.item.button }}"
|
||||
btn_pic: "{{ btn_pic }}"
|
||||
btn_bg: "{{ btn_bg }}"
|
||||
btn_icon_font: "{{ btn_icon_font }}"
|
||||
btn_txt_font: "{{ btn_txt_font }}"
|
||||
btn_bri_font: "{{ btn_bri_font }}"
|
||||
btn_icon: "{{ btn_icon }}"
|
||||
btn_label: "{{ btn_label }}"
|
||||
btn_bri_txt: "{{ btn_bri_txt }}"
|
||||
|
||||
##### SET Buttons Font Color ####
|
||||
#
|
||||
##### SET ICON Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon_font }}"
|
||||
##### SET LABEL Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_txt_font }}"
|
||||
##### SET BRIGHTNESS Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_font }}"
|
||||
|
||||
##### SET Buttons Text Value ####
|
||||
#
|
||||
##### "ICON" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon }}"
|
||||
##### "LABEL" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_label }}"
|
||||
|
||||
##### "BRIGHTNESS" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ btn_bri_txt == 0 }}"
|
||||
then:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: " "
|
||||
else:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_txt }}"
|
||||
###### SHOW All component when page loading done #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
@@ -5345,91 +5188,19 @@ action:
|
||||
{%- else -%} 0
|
||||
{%- endif -%}
|
||||
|
||||
##### SET Buttons Background ####
|
||||
#
|
||||
##### SET Button PIC #####
|
||||
- service: "{{ command_printf }}"
|
||||
##### Set buttton #####
|
||||
- service: "{{ command_set_button }}"
|
||||
data:
|
||||
cmd: "{{ repeat.item.button }}pic.pic={{ btn_pic }}"
|
||||
##### SET ICON Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET LABEL Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET BRIGHTNESS Background Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bg }}"
|
||||
btn_id: "{{ repeat.item.button }}"
|
||||
btn_pic: "{{ btn_pic }}"
|
||||
btn_bg: "{{ btn_bg }}"
|
||||
btn_icon_font: "{{ btn_icon_font }}"
|
||||
btn_txt_font: "{{ btn_txt_font }}"
|
||||
btn_bri_font: "{{ btn_bri_font }}"
|
||||
btn_icon: "{{ btn_icon }}"
|
||||
btn_label: "{{ btn_label }}"
|
||||
btn_bri_txt: "{{ btn_bri_txt }}"
|
||||
|
||||
##### SET Buttons Font Color ####
|
||||
#
|
||||
##### SET ICON Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon_font }}"
|
||||
##### SET LABEL Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_txt_font }}"
|
||||
##### SET BRIGHTNESS Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_font }}"
|
||||
|
||||
##### SET Buttons Text Value ####
|
||||
#
|
||||
##### "ICON" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon }}"
|
||||
##### "LABEL" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_label }}"
|
||||
|
||||
##### "BRIGHTNESS" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ btn_bri_txt == 0 }}"
|
||||
then:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: " "
|
||||
else:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_txt }}"
|
||||
###### SHOW All component when page loading done #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
@@ -5596,91 +5367,19 @@ action:
|
||||
{%- else -%} 0
|
||||
{%- endif -%}
|
||||
|
||||
##### SET Buttons Background ####
|
||||
#
|
||||
##### SET Button PIC #####
|
||||
- service: "{{ command_printf }}"
|
||||
##### Set buttton #####
|
||||
- service: "{{ command_set_button }}"
|
||||
data:
|
||||
cmd: "{{ repeat.item.button }}pic.pic={{ btn_pic }}"
|
||||
##### SET ICON Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET LABEL Background #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_bg }}"
|
||||
##### SET BRIGHTNESS Background Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_background_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bg }}"
|
||||
btn_id: "{{ repeat.item.button }}"
|
||||
btn_pic: "{{ btn_pic }}"
|
||||
btn_bg: "{{ btn_bg }}"
|
||||
btn_icon_font: "{{ btn_icon_font }}"
|
||||
btn_txt_font: "{{ btn_txt_font }}"
|
||||
btn_bri_font: "{{ btn_bri_font }}"
|
||||
btn_icon: "{{ btn_icon }}"
|
||||
btn_label: "{{ btn_label }}"
|
||||
btn_bri_txt: "{{ btn_bri_txt }}"
|
||||
|
||||
##### SET Buttons Font Color ####
|
||||
#
|
||||
##### SET ICON Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon_font }}"
|
||||
##### SET LABEL Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_txt_font }}"
|
||||
##### SET BRIGHTNESS Font Color #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_font_color }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_font }}"
|
||||
|
||||
##### SET Buttons Text Value ####
|
||||
#
|
||||
##### "ICON" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}icon"
|
||||
message: "{{ btn_icon }}"
|
||||
##### "LABEL" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}text"
|
||||
message: "{{ btn_label }}"
|
||||
|
||||
##### "BRIGHTNESS" Value #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ btn_bri_txt == 0 }}"
|
||||
then:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: " "
|
||||
else:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.button }}bri"
|
||||
message: "{{ btn_bri_txt }}"
|
||||
###### SHOW All component when page loading done #####
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
|
||||
@@ -49,15 +49,19 @@ wifi:
|
||||
password: ${wifi_password}
|
||||
|
||||
##### Functionality for the Nextion display #####
|
||||
external_components:
|
||||
- source: github://pr#2956
|
||||
components: [nextion]
|
||||
refresh: 1h
|
||||
# external_components:
|
||||
# - source: github://pr#2956
|
||||
# components: [nextion]
|
||||
# refresh: 1h
|
||||
|
||||
##### ESPHOME CONFIGURATION #####
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
min_version: 2022.10.2
|
||||
on_boot:
|
||||
priority: 601
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("DRAKJHSUYDGBNCJHGJKSHBDN");
|
||||
|
||||
##### TYPE OF ESP BOARD #####
|
||||
esp32:
|
||||
@@ -415,13 +419,15 @@ binary_sensor:
|
||||
api.connected:
|
||||
then:
|
||||
- switch.toggle: relay_1
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=51");
|
||||
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=98");
|
||||
- if:
|
||||
- if:
|
||||
condition:
|
||||
switch.is_on: relay_1
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105");
|
||||
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
|
||||
else:
|
||||
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");
|
||||
|
||||
|
||||
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
||||
@@ -441,13 +447,15 @@ binary_sensor:
|
||||
api.connected:
|
||||
then:
|
||||
- switch.toggle: relay_2
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=51");
|
||||
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=98");
|
||||
- if:
|
||||
- if:
|
||||
condition:
|
||||
switch.is_on: relay_2
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106");
|
||||
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=78");
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000E3A8");
|
||||
else:
|
||||
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=77");
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000FFFF");
|
||||
|
||||
##### JUMP PAGE TO SETTING PAGE #####
|
||||
- platform: nextion
|
||||
@@ -960,7 +968,7 @@ display:
|
||||
on_setup:
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("page 8");
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ###
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2.2"); ### esphome-version ###
|
||||
- wait_until:
|
||||
api.connected
|
||||
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
||||
|
||||
Reference in New Issue
Block a user