1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

[nextion] Add publish actions (#7646)

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Petr Kejval
2024-11-23 05:52:02 +01:00
committed by GitHub
parent ef7c5c6055
commit dea297c8d7
13 changed files with 558 additions and 365 deletions

View File

@@ -1,63 +1,10 @@
wifi:
ssid: MySSID
password: password1
substitutions:
tx_pin: GPIO17
rx_pin: GPIO16
uart:
- id: uart_nextion
tx_pin: 17
rx_pin: 16
baud_rate: 115200
binary_sensor:
- platform: nextion
page_id: 0
component_id: 2
name: Nextion Touch Component
- platform: nextion
id: r0_sensor
name: R0 Sensor
component_name: page0.r0
sensor:
- platform: nextion
id: testnumber
name: testnumber
variable_name: testnumber
- platform: nextion
id: testwave
name: testwave
component_id: 2
wave_channel_id: 1
switch:
- platform: nextion
id: r0
name: R0 Switch
component_name: page0.r0
text_sensor:
- platform: nextion
name: text0
id: text0
update_interval: 4s
component_name: text0
packages:
base: !include common.yaml
display:
- platform: nextion
- id: !extend main_lcd
tft_url: http://esphome.io/default35.tft
update_interval: 5s
on_sleep:
then:
lambda: 'ESP_LOGD("display","Display went to sleep");'
on_wake:
then:
lambda: 'ESP_LOGD("display","Display woke up");'
on_setup:
then:
lambda: 'ESP_LOGD("display","Display setup completed");'
on_page:
then:
lambda: 'ESP_LOGD("display","Display shows new page %u", x);'
on_buffer_overflow:
then:
logger.log: "Nextion reported a buffer overflow!"