Use pr5667 for Nextion
This commit is contained in:
@@ -18,19 +18,24 @@ substitutions:
|
||||
#############################
|
||||
|
||||
external_components:
|
||||
- source: github://pr#3256 # adds esp-idf support to http_request
|
||||
components:
|
||||
# - source: github://pr#3256 # adds esp-idf support to http_request
|
||||
# components:
|
||||
- http_request
|
||||
- source: github://pr#5484 #5660 # adds exit reparse to Nextion library
|
||||
- source: github://pr#5667 #5484 #5660 # adds exit reparse to Nextion library
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/edwardtfn/esphome
|
||||
# ref: nextion-esp-idf
|
||||
components:
|
||||
- nextion
|
||||
refresh: 300s
|
||||
|
||||
##### HTTP REQUEST #####
|
||||
# Enables http client #
|
||||
# for upload_tft. #
|
||||
########################
|
||||
http_request:
|
||||
id: httpclient
|
||||
#http_request:
|
||||
# id: httpclient
|
||||
|
||||
button:
|
||||
##### UPDATE TFT DISPLAY #####
|
||||
@@ -69,21 +74,28 @@ api:
|
||||
state: false
|
||||
- lambda: 'id(upload_tft).execute(url.c_str());'
|
||||
|
||||
#display:
|
||||
# - id: !extend disp1
|
||||
# tft_url: ${nextion_update_url}
|
||||
display:
|
||||
- id: !extend disp1
|
||||
tft_url: ${nextion_update_url}
|
||||
|
||||
script:
|
||||
- id: upload_tft_new
|
||||
- id: upload_tft
|
||||
mode: single
|
||||
parameters:
|
||||
url: string
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.upload_tft";
|
||||
ESP_LOGD(TAG, "Starting...");
|
||||
ESP_LOGVV(TAG, "Starting...");
|
||||
ESP_LOGV(TAG, "Setting Nextion protocol reparse mode to passive");
|
||||
id(disp1).set_protocol_reparse_mode(false);
|
||||
ESP_LOGV(TAG, "Setting TFT url: %s", url.c_str());
|
||||
id(disp1)->set_tft_url(url.c_str());
|
||||
ESP_LOGV(TAG, "Calling upload from Nextion component");
|
||||
id(disp1)->upload_tft();
|
||||
ESP_LOGVV(TAG, "Finished");
|
||||
|
||||
- id: upload_tft
|
||||
- id: upload_tft_working
|
||||
mode: single
|
||||
parameters:
|
||||
url: string
|
||||
|
||||
Reference in New Issue
Block a user