Add some components to the new testing framework (G) (#6178)

This commit is contained in:
Keith Burzinski 2024-03-26 20:22:01 -05:00 committed by GitHub
parent 94e9476838
commit eee7146614
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
63 changed files with 2142 additions and 0 deletions

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 17
rx_pin: 16
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 17
rx_pin: 16
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,25 @@
uart:
- id: uart_gcja5
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
sensor:
- platform: gcja5
pm_1_0:
name: "Particulate Matter <1.0µm Concentration"
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
pmc_0_5:
name: "PMC 0.5"
pmc_1_0:
name: "PMC 1.0"
pmc_2_5:
name: "PMC 2.5"
pmc_5_0:
name: "PMC 5.0"
pmc_10_0:
name: "PMC 10.0"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,28 @@
esphome:
on_boot:
then:
- globals.set:
id: glob_int
value: "10"
globals:
- id: glob_int
type: int
restore_value: true
initial_value: "0"
- id: glob_float
type: float
restore_value: true
initial_value: "0.0f"
- id: glob_bool
type: bool
restore_value: false
initial_value: "true"
- id: glob_string
type: std::string
restore_value: false
# initial_value: ""
- id: glob_bool_processed
type: bool
restore_value: false
initial_value: "false"

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 5
sda: 4
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 5
sda: 4
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 16
sda: 17
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 16
sda: 17
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 5
sda: 4
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,20 @@
i2c:
- id: i2c_gp8403
scl: 5
sda: 4
gp8403:
- id: gp8403_5v
voltage: 5V
- id: gp8403_10v
voltage: 10V
output:
- platform: gp8403
id: gp8403_output_0
gp8403_id: gp8403_5v
channel: 0
- platform: gp8403
gp8403_id: gp8403_10v
id: gp8403_output_1
channel: 1

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 2
id: gpio_binary_sensor
output:
- platform: gpio
pin: 3
id: gpio_output
switch:
- platform: gpio
pin: 4
id: gpio_switch

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 2
id: gpio_binary_sensor
output:
- platform: gpio
pin: 3
id: gpio_output
switch:
- platform: gpio
pin: 4
id: gpio_switch

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 12
id: gpio_binary_sensor
output:
- platform: gpio
pin: 13
id: gpio_output
switch:
- platform: gpio
pin: 14
id: gpio_switch

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 12
id: gpio_binary_sensor
output:
- platform: gpio
pin: 13
id: gpio_output
switch:
- platform: gpio
pin: 14
id: gpio_switch

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 12
id: gpio_binary_sensor
output:
- platform: gpio
pin: 13
id: gpio_output
switch:
- platform: gpio
pin: 14
id: gpio_switch

View File

@ -0,0 +1,14 @@
binary_sensor:
- platform: gpio
pin: 2
id: gpio_binary_sensor
output:
- platform: gpio
pin: 3
id: gpio_output
switch:
- platform: gpio
pin: 4
id: gpio_switch

View File

@ -0,0 +1,14 @@
uart:
- id: uart_gps
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
gps:
time:
- platform: gps
on_time_sync:
then:
logger.log: "It's time!"

View File

@ -0,0 +1,14 @@
uart:
- id: uart_gps
tx_pin: 17
rx_pin: 16
baud_rate: 9600
parity: EVEN
gps:
time:
- platform: gps
on_time_sync:
then:
logger.log: "It's time!"

View File

@ -0,0 +1,14 @@
uart:
- id: uart_gps
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
gps:
time:
- platform: gps
on_time_sync:
then:
logger.log: "It's time!"

View File

@ -0,0 +1,14 @@
uart:
- id: uart_gps
tx_pin: 4
rx_pin: 5
baud_rate: 9600
parity: EVEN
gps:
time:
- platform: gps
on_time_sync:
then:
logger.log: "It's time!"

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 5
sda: 4
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 5
sda: 4
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 16
sda: 17
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 16
sda: 17
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 5
sda: 4
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,25 @@
i2c:
- id: i2c_graph
scl: 5
sda: 4
sensor:
- platform: template
id: some_sensor
graph:
- id: some_graph
sensor: some_sensor
duration: 1h
width: 100
height: 100
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 16
sda: 17
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 16
sda: 17
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,120 @@
i2c:
- id: i2c_graphical_display_menu
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
number:
- platform: template
id: test_number
min_value: 0
step: 1
max_value: 10
optimistic: true
select:
- platform: template
id: test_select
options:
- one
- two
optimistic: true
switch:
- platform: template
id: test_switch
optimistic: true
graphical_display_menu:
id: test_graphical_display_menu
display: ssd1306_display
font: roboto
active: false
mode: rotary
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "root leave");'
items:
- type: back
text: "Back"
- type: label
- type: menu
text: "Submenu 1"
items:
- type: back
text: "Back"
- type: menu
text: "Submenu 21"
items:
- type: back
text: "Back"
- type: command
text: "Show Main"
on_value:
then:
- display_menu.show_main: test_graphical_display_menu
- type: select
text: "Enum Item"
immediate_edit: true
select: test_select
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: number
text: "Number"
number: test_number
on_enter:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_leave:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
- type: command
text: "Hide"
on_value:
then:
- display_menu.hide: test_graphical_display_menu
- type: switch
text: "Switch"
switch: test_switch
on_text: "Bright"
off_text: "Dark"
immediate_edit: false
on_value:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "switch value: %s", it->get_value_text().c_str());'
- type: custom
text: !lambda 'return "Custom";'
value_lambda: 'return "Val";'
on_next:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom next: %s", it->get_text().c_str());'
on_prev:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "custom prev: %s", it->get_text().c_str());'

View File

@ -0,0 +1,8 @@
remote_transmitter:
pin: 2
carrier_duty_percent: 50%
climate:
- platform: gree
name: GREE
model: generic

View File

@ -0,0 +1,8 @@
remote_transmitter:
pin: 2
carrier_duty_percent: 50%
climate:
- platform: gree
name: GREE
model: generic

View File

@ -0,0 +1,8 @@
remote_transmitter:
pin: 2
carrier_duty_percent: 50%
climate:
- platform: gree
name: GREE
model: generic

View File

@ -0,0 +1,8 @@
remote_transmitter:
pin: 2
carrier_duty_percent: 50%
climate:
- platform: gree
name: GREE
model: generic

View File

@ -0,0 +1,8 @@
remote_transmitter:
pin: 5
carrier_duty_percent: 50%
climate:
- platform: gree
name: GREE
model: generic

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 5
sda: 4
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 5
sda: 4
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 16
sda: 17
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 16
sda: 17
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 5
sda: 4
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,23 @@
esphome:
on_boot:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor
- grove_tb6612fng.stop:
channel: 1
id: test_motor
- grove_tb6612fng.break:
channel: 1
id: test_motor
i2c:
- id: i2c_grove_tb6612fng
scl: 5
sda: 4
grove_tb6612fng:
id: test_motor
address: 0x14

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 4
rx_pin: 5
baud_rate: 9600
modbus:
flow_control_pin: 3
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 4
rx_pin: 5
baud_rate: 9600
modbus:
flow_control_pin: 3
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 17
rx_pin: 16
baud_rate: 9600
modbus:
flow_control_pin: 13
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 17
rx_pin: 16
baud_rate: 9600
modbus:
flow_control_pin: 13
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 4
rx_pin: 5
baud_rate: 9600
modbus:
flow_control_pin: 13
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,62 @@
uart:
- id: uart_growatt_solar
tx_pin: 4
rx_pin: 5
baud_rate: 9600
modbus:
flow_control_pin: 3
sensor:
- platform: growatt_solar
update_interval: 10s
protocol_version: RTU
inverter_status:
name: Growatt Status Code
phase_a:
voltage:
name: Growatt Voltage Phase A
current:
name: Growatt Current Phase A
active_power:
name: Growatt Power Phase A
phase_b:
voltage:
name: Growatt Voltage Phase B
current:
name: Growatt Current Phase B
active_power:
name: Growatt Power Phase B
phase_c:
voltage:
name: Growatt Voltage Phase C
current:
name: Growatt Current Phase C
active_power:
name: Growatt Power Phase C
pv1:
voltage:
name: Growatt PV1 Voltage
current:
name: Growatt PV1 Current
active_power:
name: Growatt PV1 Active Power
pv2:
voltage:
name: Growatt PV2 Voltage
current:
name: Growatt PV2 Current
active_power:
name: Growatt PV2 Active Power
active_power:
name: Growatt Grid Active Power
pv_active_power:
name: Growatt PV Active Power
frequency:
name: Growatt Frequency
energy_production_day:
name: Growatt Today's Generation
total_energy_production:
name: Growatt Total Energy Production
inverter_module_temp:
name: Growatt Inverter Module Temp

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 6
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 6
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 16
sda: 17
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 14
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 16
sda: 17
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 14
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 13
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 12
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0

View File

@ -0,0 +1,24 @@
i2c:
- id: i2c_gt911
scl: 5
sda: 4
display:
- platform: ssd1306_i2c
id: ssd1306_display
model: SSD1306_128X64
reset_pin: 3
pages:
- id: page1
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: gt911
display: ssd1306_display
interrupt_pin: 6
binary_sensor:
- platform: gt911
id: touch_key_911
index: 0