mirror of
https://github.com/esphome/esphome.git
synced 2026-05-22 01:42:49 +08:00
[CI] Consolidate some tests (G) (#8196)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
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"
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
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"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
i2c:
|
||||
id: i2c_bus
|
||||
sda: ${i2c_sda}
|
||||
scl: ${i2c_scl}
|
||||
- id: i2c_gdk101
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
gdk101:
|
||||
id: my_gdk101
|
||||
i2c_id: i2c_bus
|
||||
|
||||
sensor:
|
||||
- platform: gdk101
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
i2c_scl: GPIO16
|
||||
i2c_sda: GPIO17
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
i2c_scl: GPIO16
|
||||
i2c_sda: GPIO17
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
i2c_scl: GPIO5
|
||||
i2c_sda: GPIO4
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
i2c_scl: GPIO5
|
||||
i2c_sda: GPIO4
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: adc_sensor
|
||||
pin: ${adc_pin}
|
||||
- platform: gp2y1010au0f
|
||||
sensor: adc_sensor
|
||||
name: Dust Sensor
|
||||
adc_voltage_offset: 0.2
|
||||
adc_voltage_multiplier: 3.3
|
||||
output: dust_sensor_led
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
id: dust_sensor_led
|
||||
pin: ${output_pin}
|
||||
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
adc_pin: A0
|
||||
output_pin: GPIO14
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
adc_pin: GPIO0
|
||||
output_pin: GPIO1
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
adc_pin: GPIO0
|
||||
output_pin: GPIO1
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,16 +1,5 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
pin: GPIO36
|
||||
id: adc_sensor
|
||||
substitutions:
|
||||
adc_pin: A0
|
||||
output_pin: GPIO14
|
||||
|
||||
- platform: gp2y1010au0f
|
||||
sensor: adc_sensor
|
||||
name: Dust Sensor
|
||||
adc_voltage_offset: 0.2
|
||||
adc_voltage_multiplier: 3.3
|
||||
output: dust_sensor_led
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
id: dust_sensor_led
|
||||
pin: GPIO32
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
adc_pin: A0
|
||||
output_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
adc_pin: GPIO26
|
||||
output_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1,20 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
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
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: ${binary_sensor_pin}
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: ${output_pin}
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: ${switch_pin}
|
||||
id: gpio_switch
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO12
|
||||
output_pin: GPIO13
|
||||
switch_pin: GPIO14
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO2
|
||||
output_pin: GPIO3
|
||||
switch_pin: GPIO4
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO2
|
||||
output_pin: GPIO3
|
||||
switch_pin: GPIO4
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO12
|
||||
output_pin: GPIO13
|
||||
switch_pin: GPIO14
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO12
|
||||
output_pin: GPIO13
|
||||
switch_pin: GPIO14
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
substitutions:
|
||||
binary_sensor_pin: GPIO2
|
||||
output_pin: GPIO3
|
||||
switch_pin: GPIO4
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
||||
@@ -1,14 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
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: ${reset_pin}
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO15
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
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());
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
i2c:
|
||||
- id: i2c_graphical_display_menu
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: ${reset_pin}
|
||||
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());'
|
||||
@@ -1,120 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graphical_display_menu
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
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());'
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,120 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graphical_display_menu
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
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());'
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,120 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graphical_display_menu
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
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());'
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,120 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_graphical_display_menu
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
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());'
|
||||
<<: !include common.yaml
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user