fix: button to exit reparse-mode on factory-device
This commit is contained in:
@@ -59,10 +59,6 @@ wifi:
|
|||||||
esphome:
|
esphome:
|
||||||
name: ${device_name}
|
name: ${device_name}
|
||||||
min_version: 2022.10.2
|
min_version: 2022.10.2
|
||||||
on_boot:
|
|
||||||
priority: 601
|
|
||||||
then:
|
|
||||||
- lambda: id(disp1).send_command_printf("DRAKJHSUYDGBNCJHGJKSHBDN");
|
|
||||||
|
|
||||||
##### TYPE OF ESP BOARD #####
|
##### TYPE OF ESP BOARD #####
|
||||||
esp32:
|
esp32:
|
||||||
@@ -126,9 +122,24 @@ button:
|
|||||||
id: tft_update
|
id: tft_update
|
||||||
entity_category: config
|
entity_category: config
|
||||||
on_press:
|
on_press:
|
||||||
|
- switch.turn_off: nextion_init
|
||||||
- delay: 16ms
|
- delay: 16ms
|
||||||
- lambda: id(disp1).upload_tft();
|
- lambda: id(disp1).upload_tft();
|
||||||
|
|
||||||
|
##### EXIT REPARSE TFT DISPLAY #####
|
||||||
|
- platform: template
|
||||||
|
name: ${device_name} Exit reparse
|
||||||
|
icon: mdi:file-sync
|
||||||
|
id: tft_reparse_off
|
||||||
|
entity_category: config
|
||||||
|
on_press:
|
||||||
|
- uart.write:
|
||||||
|
id: tf_uart
|
||||||
|
data: "DRAKJHSUYDGBNCJHGJKSHBDN"
|
||||||
|
- uart.write:
|
||||||
|
id: tf_uart
|
||||||
|
data: [0xFF, 0xFF, 0xFF]
|
||||||
|
|
||||||
##### START - API CONFIGURATION #####
|
##### START - API CONFIGURATION #####
|
||||||
api:
|
api:
|
||||||
##### advanced config - activate to use api_password #####
|
##### advanced config - activate to use api_password #####
|
||||||
@@ -138,6 +149,7 @@ api:
|
|||||||
##### SERVICE TO UPDATE THE HMI FILE #####
|
##### SERVICE TO UPDATE THE HMI FILE #####
|
||||||
- service: upload_tft
|
- service: upload_tft
|
||||||
then:
|
then:
|
||||||
|
- switch.turn_off: nextion_init
|
||||||
- lambda: 'id(disp1)->upload_tft();'
|
- lambda: 'id(disp1)->upload_tft();'
|
||||||
|
|
||||||
##### SERVICE TO UPDATE THE TFT FILE from URL #####
|
##### SERVICE TO UPDATE THE TFT FILE from URL #####
|
||||||
@@ -145,6 +157,7 @@ api:
|
|||||||
variables:
|
variables:
|
||||||
url: string
|
url: string
|
||||||
then:
|
then:
|
||||||
|
- switch.turn_off: nextion_init
|
||||||
- lambda: 'id(disp1)->set_tft_url(url.c_str());'
|
- lambda: 'id(disp1)->set_tft_url(url.c_str());'
|
||||||
- lambda: 'id(disp1)->upload_tft();'
|
- lambda: 'id(disp1)->upload_tft();'
|
||||||
|
|
||||||
@@ -497,18 +510,6 @@ binary_sensor:
|
|||||||
on_click:
|
on_click:
|
||||||
- switch.toggle: sleep_modus
|
- switch.toggle: sleep_modus
|
||||||
|
|
||||||
##### Hotwater Charge #####
|
|
||||||
# - platform: nextion
|
|
||||||
# name: ${device_name} Hotwater Charge
|
|
||||||
# page_id: 6
|
|
||||||
# component_id: 20
|
|
||||||
# on_click:
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: switch.toggle
|
|
||||||
# data:
|
|
||||||
# entity_id: ${ha_hotwater_charge}
|
|
||||||
|
|
||||||
|
|
||||||
##### START - SENSOR CONFIGURATION #####
|
##### START - SENSOR CONFIGURATION #####
|
||||||
sensor:
|
sensor:
|
||||||
|
|
||||||
@@ -601,17 +602,6 @@ sensor:
|
|||||||
# 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));
|
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||||
|
|
||||||
###### Send current page to HA
|
|
||||||
# - platform: nextion
|
|
||||||
# id: current_page
|
|
||||||
# name: "${device_name} Current Page"
|
|
||||||
# variable_name: dp
|
|
||||||
# update_interval: 1s
|
|
||||||
# accuracy_decimals: 0
|
|
||||||
# filters:
|
|
||||||
# - delta: 1.0
|
|
||||||
# - lambda: return int(x);
|
|
||||||
|
|
||||||
|
|
||||||
##### START - TEXT SENSOR CONFIGURATION #####
|
##### START - TEXT SENSOR CONFIGURATION #####
|
||||||
text_sensor:
|
text_sensor:
|
||||||
@@ -788,14 +778,6 @@ text_sensor:
|
|||||||
##### START - SWITCH CONFIGURATION #####
|
##### START - SWITCH CONFIGURATION #####
|
||||||
switch:
|
switch:
|
||||||
|
|
||||||
# ##### Restart switch ######
|
|
||||||
# - platform: restart
|
|
||||||
# name: ${device_name} Restart
|
|
||||||
|
|
||||||
# ##### Restart in safe-mode #####
|
|
||||||
# - platform: safe_mode
|
|
||||||
# name: ${device_name} Restart (Safe Mode)
|
|
||||||
|
|
||||||
##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display #####
|
##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display #####
|
||||||
- platform: template
|
- platform: template
|
||||||
name: ${device_name} Nextion inited
|
name: ${device_name} Nextion inited
|
||||||
@@ -868,13 +850,13 @@ switch:
|
|||||||
- globals.set:
|
- globals.set:
|
||||||
id: sleep_modus_global
|
id: sleep_modus_global
|
||||||
value: '0'
|
value: '0'
|
||||||
- lambda: id(disp1).set_component_value("settings.a02",0);
|
- lambda: id(disp1).set_component_value("settings.bt1",0);
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
|
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
|
||||||
- globals.set:
|
- globals.set:
|
||||||
id: sleep_modus_global
|
id: sleep_modus_global
|
||||||
value: '1'
|
value: '1'
|
||||||
- lambda: id(disp1).set_component_value("settings.a02",1);
|
- lambda: id(disp1).set_component_value("settings.bt1",1);
|
||||||
|
|
||||||
##### Relay Local control Fallback #####
|
##### Relay Local control Fallback #####
|
||||||
- platform: template
|
- platform: template
|
||||||
|
|||||||
Reference in New Issue
Block a user