Update page_id & component_id
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
##### ADVANCED CONFIGURATION - activate only when you know what you do ##############################
|
||||
# substitutions:
|
||||
# substitutions:
|
||||
# ## usage of secrets-file ## -> comment in ###### Change ME ######
|
||||
# device_name: "nspanel-name" # Wird im Blueprint benötigt!
|
||||
# wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file.
|
||||
@@ -36,7 +36,7 @@ wifi:
|
||||
ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
power_save_mode: none
|
||||
##### advanced config - uncomment to use static IP-Config #####
|
||||
##### advanced config - uncomment to use static IP-Config #####
|
||||
# manual_ip:
|
||||
# static_ip: ${ip}
|
||||
# gateway: ${gw}
|
||||
@@ -70,13 +70,13 @@ web_server:
|
||||
auth:
|
||||
username: admin
|
||||
password: ${wifi_password}
|
||||
##### advanced config - change to use web_password #####
|
||||
##### advanced config - change to use web_password #####
|
||||
# password: ${web_password}
|
||||
|
||||
##### OTA PASSWORD #####
|
||||
ota:
|
||||
password: ${wifi_password}
|
||||
##### advanced config - change to use ota_password #####
|
||||
##### advanced config - change to use ota_password #####
|
||||
# password: ${ota_password}
|
||||
safe_mode: true
|
||||
reboot_timeout: 3min
|
||||
@@ -126,7 +126,7 @@ button:
|
||||
|
||||
##### START - API CONFIGURATION #####
|
||||
api:
|
||||
##### advanced config - activate to use api_password #####
|
||||
##### advanced config - activate to use api_password #####
|
||||
# password: ${api_password}
|
||||
services:
|
||||
|
||||
@@ -142,7 +142,7 @@ api:
|
||||
then:
|
||||
- lambda: 'id(disp1)->set_tft_url(url.c_str());'
|
||||
- lambda: 'id(disp1)->upload_tft();'
|
||||
|
||||
|
||||
##### Service to send a command "printf" directly to the display #####
|
||||
- service: send_command_printf
|
||||
variables:
|
||||
@@ -204,7 +204,7 @@ api:
|
||||
- wait_until:
|
||||
switch.is_on: nextion_init
|
||||
- lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
|
||||
|
||||
|
||||
##### Service to send a command "background color" directly to the display #####
|
||||
- service: send_command_background_color
|
||||
variables:
|
||||
@@ -263,7 +263,7 @@ api:
|
||||
song_str: string
|
||||
then:
|
||||
- rtttl.play:
|
||||
rtttl: !lambda 'return song_str;'
|
||||
rtttl: !lambda 'return song_str;'
|
||||
|
||||
# Service to show a QR code on the display (ex. for WiFi password)
|
||||
- service: qr_code
|
||||
@@ -417,7 +417,7 @@ binary_sensor:
|
||||
- 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:
|
||||
@@ -443,7 +443,7 @@ binary_sensor:
|
||||
- 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:
|
||||
@@ -453,7 +453,7 @@ binary_sensor:
|
||||
- platform: nextion
|
||||
name: $device_name setting page
|
||||
page_id: 0
|
||||
component_id: 53
|
||||
component_id: 52
|
||||
internal: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
@@ -465,7 +465,7 @@ binary_sensor:
|
||||
- platform: nextion
|
||||
name: ${device_name} Restart
|
||||
page_id: 7
|
||||
component_id: 15
|
||||
component_id: 13
|
||||
internal: true
|
||||
on_click:
|
||||
- button.press: restart_nspanel
|
||||
@@ -474,7 +474,7 @@ binary_sensor:
|
||||
- platform: nextion
|
||||
name: ${device_name} Restart
|
||||
page_id: 8
|
||||
component_id: 5
|
||||
component_id: 4
|
||||
internal: true
|
||||
on_click:
|
||||
- button.press: restart_nspanel
|
||||
@@ -483,7 +483,7 @@ binary_sensor:
|
||||
- platform: nextion
|
||||
name: ${device_name} Sleep Modus
|
||||
page_id: 7
|
||||
component_id: 16
|
||||
component_id: 14
|
||||
internal: true
|
||||
on_click:
|
||||
- switch.toggle: sleep_modus
|
||||
@@ -573,7 +573,7 @@ sensor:
|
||||
- number.set:
|
||||
id: display_brightness
|
||||
value: !lambda 'return int(x);'
|
||||
# send text field percentage of current_lightslider_val
|
||||
# send text field percentage of current_lightslider_val
|
||||
- lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
||||
|
||||
###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER #####
|
||||
@@ -589,7 +589,7 @@ sensor:
|
||||
- number.set:
|
||||
id: display_dim_brightness
|
||||
value: !lambda 'return int(x);'
|
||||
# send text field percentage of current_lightslider_val
|
||||
# send text field percentage of current_lightslider_val
|
||||
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||
|
||||
###### Send current page to HA
|
||||
@@ -658,7 +658,7 @@ text_sensor:
|
||||
value: !lambda return x;
|
||||
- lambda: |-
|
||||
id(page_timer)->execute(int(id(page_timeout).state));
|
||||
|
||||
|
||||
##### last click lightsettings page, the main action variable - push to HA #####
|
||||
- platform: nextion
|
||||
nextion_id: disp1
|
||||
@@ -776,7 +776,7 @@ text_sensor:
|
||||
id(page_timer)->execute(int(id(page_timeout).state));
|
||||
|
||||
|
||||
##### START - SWITCH CONFIGURATION #####
|
||||
##### START - SWITCH CONFIGURATION #####
|
||||
switch:
|
||||
|
||||
# ##### Restart switch ######
|
||||
@@ -833,7 +833,7 @@ switch:
|
||||
id: relay_2
|
||||
pin:
|
||||
number: 19
|
||||
|
||||
|
||||
##### DISPLAY ALWAYS ON #####
|
||||
- platform: gpio
|
||||
name: ${device_name} Screen Power
|
||||
@@ -867,7 +867,7 @@ switch:
|
||||
value: '1'
|
||||
- lambda: id(disp1).set_component_value("settings.a02",1);
|
||||
|
||||
##### Relay Local control Fallback #####
|
||||
##### Relay Local control Fallback #####
|
||||
- platform: template
|
||||
name: ${device_name} Relay 1 Local Fallback
|
||||
id: relay1_fallback
|
||||
|
||||
Reference in New Issue
Block a user