mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 10:52:19 +01:00
Merge branch 'dev' into vornado-ir
This commit is contained in:
8
tests/components/matrix_keypad/common.yaml
Normal file
8
tests/components/matrix_keypad/common.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 15
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 4
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 4
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 15
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
15
tests/components/matrix_keypad/test.esp32-s3-idf.yaml
Normal file
15
tests/components/matrix_keypad/test.esp32-s3-idf.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
rows:
|
||||
- pin: 10
|
||||
- pin: 11
|
||||
columns:
|
||||
- pin: 12
|
||||
- pin: 13
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 15
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
@@ -1,11 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: matrix_keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
@@ -17,3 +11,5 @@ matrix_keypad:
|
||||
- pin: 4
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
293
tests/components/nextion/common.yaml
Normal file
293
tests/components/nextion/common.yaml
Normal file
@@ -0,0 +1,293 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
# Binary sensor publish action tests
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: True
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: True
|
||||
publish_state: True
|
||||
send_to_nextion: True
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: True
|
||||
publish_state: False
|
||||
send_to_nextion: True
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: True
|
||||
publish_state: True
|
||||
send_to_nextion: False
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: True
|
||||
publish_state: False
|
||||
send_to_nextion: False
|
||||
|
||||
# Templated
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: !lambda 'return true;'
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
- binary_sensor.nextion.publish:
|
||||
id: r0_sensor
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
# Sensor publish action tests
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: 42.0
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: 42.0
|
||||
publish_state: True
|
||||
send_to_nextion: True
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: 42.0
|
||||
publish_state: False
|
||||
send_to_nextion: True
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: 42.0
|
||||
publish_state: True
|
||||
send_to_nextion: False
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: 42.0
|
||||
publish_state: False
|
||||
send_to_nextion: False
|
||||
|
||||
# Templated
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: !lambda 'return 42.0;'
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: !lambda 'return 42.0;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: !lambda 'return 42.0;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: !lambda 'return 42.0;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
- sensor.nextion.publish:
|
||||
id: testnumber
|
||||
state: !lambda 'return 42.0;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
# Switch publish action tests
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: True
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: True
|
||||
publish_state: true
|
||||
send_to_nextion: true
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: True
|
||||
publish_state: false
|
||||
send_to_nextion: true
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: True
|
||||
publish_state: true
|
||||
send_to_nextion: false
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: True
|
||||
publish_state: false
|
||||
send_to_nextion: false
|
||||
|
||||
# Templated
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: !lambda 'return true;'
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
- switch.nextion.publish:
|
||||
id: r0
|
||||
state: !lambda 'return true;'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
# Test sensor publish action tests
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: 'Test'
|
||||
publish_state: true
|
||||
send_to_nextion: true
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: 'Test'
|
||||
publish_state: false
|
||||
send_to_nextion: true
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: 'Test'
|
||||
publish_state: true
|
||||
send_to_nextion: false
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: 'Test'
|
||||
publish_state: false
|
||||
send_to_nextion: false
|
||||
|
||||
# Templated
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: !lambda 'return "Test";'
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: !lambda 'return "Test";'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: !lambda 'return "Test";'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return true;'
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: !lambda 'return "Test";'
|
||||
publish_state: !lambda 'return true;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
- text_sensor.nextion.publish:
|
||||
id: text0
|
||||
state: !lambda 'return "Test";'
|
||||
publish_state: !lambda 'return false;'
|
||||
send_to_nextion: !lambda 'return false;'
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
uart:
|
||||
- id: uart_nextion
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
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
|
||||
|
||||
display:
|
||||
- platform: nextion
|
||||
id: main_lcd
|
||||
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!"
|
@@ -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!"
|
||||
|
@@ -1,63 +1,10 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
uart:
|
||||
- id: uart_nextion
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
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!"
|
||||
|
@@ -1,63 +1,10 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
uart:
|
||||
- id: uart_nextion
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
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!"
|
||||
|
@@ -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!"
|
||||
|
@@ -1,63 +1,10 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
uart:
|
||||
- id: uart_nextion
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
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!"
|
||||
|
@@ -1,58 +1,7 @@
|
||||
uart:
|
||||
- id: uart_nextion
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 115200
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
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
|
||||
packages:
|
||||
base: !include common.yaml
|
||||
|
||||
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
|
||||
|
||||
display:
|
||||
- platform: nextion
|
||||
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!"
|
||||
|
34
tests/components/seeed_mr60fda2/common.yaml
Normal file
34
tests/components/seeed_mr60fda2/common.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
uart:
|
||||
- id: seeed_mr60fda2_uart
|
||||
tx_pin: ${uart_tx_pin}
|
||||
rx_pin: ${uart_rx_pin}
|
||||
baud_rate: 115200
|
||||
parity: NONE
|
||||
stop_bits: 1
|
||||
|
||||
seeed_mr60fda2:
|
||||
id: my_seeed_mr60fda2
|
||||
uart_id: seeed_mr60fda2_uart
|
||||
|
||||
binary_sensor:
|
||||
- platform: seeed_mr60fda2
|
||||
people_exist:
|
||||
name: "Person Information"
|
||||
fall_detected:
|
||||
name: "Falling Information"
|
||||
|
||||
button:
|
||||
- platform: seeed_mr60fda2
|
||||
get_radar_parameters:
|
||||
name: "Get Radar Parameters"
|
||||
factory_reset:
|
||||
name: "Reset"
|
||||
|
||||
select:
|
||||
- platform: seeed_mr60fda2
|
||||
install_height:
|
||||
name: "Set Install Height"
|
||||
height_threshold:
|
||||
name: "Set Height Threshold"
|
||||
sensitivity:
|
||||
name: "Set Sensitivity"
|
5
tests/components/seeed_mr60fda2/test.esp32-c3-ard.yaml
Normal file
5
tests/components/seeed_mr60fda2/test.esp32-c3-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
uart_tx_pin: GPIO5
|
||||
uart_rx_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
5
tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml
Normal file
5
tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
uart_tx_pin: GPIO5
|
||||
uart_rx_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
11
tests/components/switch/common.yaml
Normal file
11
tests/components/switch/common.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
binary_sensor:
|
||||
- platform: switch
|
||||
id: some_binary_sensor
|
||||
name: "Template Switch State"
|
||||
source_id: the_switch
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "Template Switch"
|
||||
id: the_switch
|
||||
optimistic: true
|
2
tests/components/switch/test.bk72xx-ard.yaml
Normal file
2
tests/components/switch/test.bk72xx-ard.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp32-ard.yaml
Normal file
2
tests/components/switch/test.esp32-ard.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp32-c3-ard.yaml
Normal file
2
tests/components/switch/test.esp32-c3-ard.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp32-c3-idf.yaml
Normal file
2
tests/components/switch/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp32-idf.yaml
Normal file
2
tests/components/switch/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp32-s3-idf.yaml
Normal file
2
tests/components/switch/test.esp32-s3-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.esp8266-ard.yaml
Normal file
2
tests/components/switch/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/switch/test.rp2040-ard.yaml
Normal file
2
tests/components/switch/test.rp2040-ard.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
@@ -188,3 +188,20 @@ display:
|
||||
full_update_every: 30
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
model: 7.50in-bv3-bwr
|
||||
spi_id: spi_id_1
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO26
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO27
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO32
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -105,3 +105,19 @@ display:
|
||||
model: 1.54in-m5coreink-m09
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
model: 7.50in-bv3-bwr
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -105,3 +105,19 @@ display:
|
||||
model: 1.54in-m5coreink-m09
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
model: 7.50in-bv3-bwr
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -105,3 +105,19 @@ display:
|
||||
model: 1.54in-m5coreink-m09
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
model: 7.50in-bv3-bwr
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -105,3 +105,19 @@ display:
|
||||
model: 1.54in-m5coreink-m09
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
model: 7.50in-bv3-bwr
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -105,3 +105,19 @@ display:
|
||||
model: 1.54in-m5coreink-m09
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
- platform: waveshare_epaper
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
dc_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
busy_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
model: 7.50in-bv3-bwr
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
@@ -3,6 +3,13 @@ esphome:
|
||||
then:
|
||||
- wifi.disable
|
||||
- wifi.enable
|
||||
- wifi.configure:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
on_connect:
|
||||
- logger.log: "Connected to WiFi!"
|
||||
on_error:
|
||||
- logger.log: "Failed to connect to WiFi!"
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
|
Reference in New Issue
Block a user