mirror of
https://github.com/esphome/esphome.git
synced 2025-03-12 13:48:14 +00:00
[CI] Consolidate some tests (Q, R) (#8205)
This commit is contained in:
parent
cecce0f3cb
commit
bf6874b52e
21
tests/components/qmc5883l/common.yaml
Normal file
21
tests/components/qmc5883l/common.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_qmc5883l
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: qmc5883l
|
||||||
|
address: 0x0D
|
||||||
|
field_strength_x:
|
||||||
|
name: QMC5883L Field Strength X
|
||||||
|
field_strength_y:
|
||||||
|
name: QMC5883L Field Strength Y
|
||||||
|
field_strength_z:
|
||||||
|
name: QMC5883L Field Strength Z
|
||||||
|
heading:
|
||||||
|
name: QMC5883L Heading
|
||||||
|
temperature:
|
||||||
|
name: QMC5883L Temperature
|
||||||
|
range: 800uT
|
||||||
|
oversampling: 256x
|
||||||
|
update_interval: 15s
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmc5883l
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmc5883l
|
|
||||||
address: 0x0D
|
|
||||||
field_strength_x:
|
|
||||||
name: QMC5883L Field Strength X
|
|
||||||
field_strength_y:
|
|
||||||
name: QMC5883L Field Strength Y
|
|
||||||
field_strength_z:
|
|
||||||
name: QMC5883L Field Strength Z
|
|
||||||
heading:
|
|
||||||
name: QMC5883L Heading
|
|
||||||
temperature:
|
|
||||||
name: QMC5883L Temperature
|
|
||||||
range: 800uT
|
|
||||||
oversampling: 256x
|
|
||||||
update_interval: 15s
|
|
||||||
|
16
tests/components/qmp6988/common.yaml
Normal file
16
tests/components/qmp6988/common.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_qmp6988
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: qmp6988
|
||||||
|
temperature:
|
||||||
|
name: QMP6988 Temperature
|
||||||
|
oversampling: 32x
|
||||||
|
pressure:
|
||||||
|
name: QMP6988 Pressure
|
||||||
|
oversampling: 2x
|
||||||
|
address: 0x70
|
||||||
|
update_interval: 30s
|
||||||
|
iir_filter: 16x
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qmp6988
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: qmp6988
|
|
||||||
temperature:
|
|
||||||
name: QMP6988 Temperature
|
|
||||||
oversampling: 32x
|
|
||||||
pressure:
|
|
||||||
name: QMP6988 Pressure
|
|
||||||
oversampling: 2x
|
|
||||||
address: 0x70
|
|
||||||
update_interval: 30s
|
|
||||||
iir_filter: 16x
|
|
||||||
|
24
tests/components/qr_code/common.yaml
Normal file
24
tests/components/qr_code/common.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_main_lcd
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
|
||||||
|
display:
|
||||||
|
- platform: ili9xxx
|
||||||
|
id: main_lcd
|
||||||
|
model: ili9342
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
dc_pin: ${dc_pin}
|
||||||
|
reset_pin: ${reset_pin}
|
||||||
|
invert_colors: false
|
||||||
|
lambda: |-
|
||||||
|
// Draw a QR code in the center of the screen
|
||||||
|
auto scale = 2;
|
||||||
|
auto size = id(homepage_qr).get_size() * scale;
|
||||||
|
auto x = (it.get_width() / 2) - (size / 2);
|
||||||
|
auto y = (it.get_height() / 2) - (size / 2);
|
||||||
|
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
||||||
|
|
||||||
|
qr_code:
|
||||||
|
- id: homepage_qr
|
||||||
|
value: https://esphome.io/index.html
|
@ -1,25 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
cs_pin: GPIO12
|
||||||
miso_pin: 15
|
dc_pin: GPIO13
|
||||||
|
reset_pin: GPIO14
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 12
|
|
||||||
dc_pin: 13
|
|
||||||
reset_pin: 21
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
dc_pin: GPIO9
|
||||||
|
reset_pin: GPIO10
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 8
|
|
||||||
dc_pin: 9
|
|
||||||
reset_pin: 10
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
dc_pin: GPIO9
|
||||||
|
reset_pin: GPIO10
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 8
|
|
||||||
dc_pin: 9
|
|
||||||
reset_pin: 10
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
@ -1,25 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
cs_pin: GPIO12
|
||||||
miso_pin: 15
|
dc_pin: GPIO13
|
||||||
|
reset_pin: GPIO14
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 12
|
|
||||||
dc_pin: 13
|
|
||||||
reset_pin: 21
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO5
|
||||||
|
dc_pin: GPIO15
|
||||||
|
reset_pin: GPIO16
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 5
|
|
||||||
dc_pin: 15
|
|
||||||
reset_pin: 16
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_main_lcd
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
dc_pin: GPIO15
|
||||||
|
reset_pin: GPIO16
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: ili9xxx
|
|
||||||
id: main_lcd
|
|
||||||
model: ili9342
|
|
||||||
cs_pin: 20
|
|
||||||
dc_pin: 21
|
|
||||||
reset_pin: 22
|
|
||||||
invert_colors: false
|
|
||||||
lambda: |-
|
|
||||||
// Draw a QR code in the center of the screen
|
|
||||||
auto scale = 2;
|
|
||||||
auto size = id(homepage_qr).get_size() * scale;
|
|
||||||
auto x = (it.get_width() / 2) - (size / 2);
|
|
||||||
auto y = (it.get_height() / 2) - (size / 2);
|
|
||||||
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale);
|
|
||||||
|
|
||||||
qr_code:
|
|
||||||
- id: homepage_qr
|
|
||||||
value: https://esphome.io/index.html
|
|
||||||
|
8
tests/components/qwiic_pir/common.yaml
Normal file
8
tests/components/qwiic_pir/common.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_qwiic_pir
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: qwiic_pir
|
||||||
|
name: Qwiic PIR Motion Sensor
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_qwiic_pir
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: qwiic_pir
|
|
||||||
name: Qwiic PIR Motion Sensor
|
|
||||||
|
17
tests/components/rc522_i2c/common.yaml
Normal file
17
tests/components/rc522_i2c/common.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_rc522
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
rc522_i2c:
|
||||||
|
- id: rc522_nfcc
|
||||||
|
update_interval: 1s
|
||||||
|
on_tag:
|
||||||
|
- lambda: |-
|
||||||
|
ESP_LOGD("main", "Found tag %s", x.c_str());
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: rc522
|
||||||
|
rc522_id: rc522_nfcc
|
||||||
|
name: RC522 NFC Tag
|
||||||
|
uid: 74-10-37-94
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_rc522
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
rc522_i2c:
|
<<: !include common.yaml
|
||||||
- id: rc522_nfcc
|
|
||||||
update_interval: 1s
|
|
||||||
on_tag:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: RC522 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
15
tests/components/rc522_spi/common.yaml
Normal file
15
tests/components/rc522_spi/common.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_rc522
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
rc522_spi:
|
||||||
|
id: rc522_nfcc
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: rc522
|
||||||
|
rc522_id: rc522_nfcc
|
||||||
|
name: PN532 NFC Tag
|
||||||
|
uid: 74-10-37-94
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 12
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 4
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 12
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 15
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_rc522
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
rc522_spi:
|
<<: !include common.yaml
|
||||||
id: rc522_nfcc
|
|
||||||
cs_pin: 6
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rc522
|
|
||||||
rc522_id: rc522_nfcc
|
|
||||||
name: PN532 NFC Tag
|
|
||||||
uid: 74-10-37-94
|
|
||||||
|
12
tests/components/rdm6300/common.yaml
Normal file
12
tests/components/rdm6300/common.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
uart:
|
||||||
|
- id: uart_rdm6300
|
||||||
|
tx_pin: ${tx_pin}
|
||||||
|
rx_pin: ${rx_pin}
|
||||||
|
baud_rate: 115200
|
||||||
|
|
||||||
|
rdm6300:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: rdm6300
|
||||||
|
uid: 7616525
|
||||||
|
name: RDM6300 NFC Tag
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO17
|
||||||
tx_pin: 17
|
rx_pin: GPIO16
|
||||||
rx_pin: 16
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO17
|
||||||
tx_pin: 17
|
rx_pin: GPIO16
|
||||||
rx_pin: 16
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rdm6300
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rdm6300:
|
<<: !include common.yaml
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: rdm6300
|
|
||||||
uid: 7616525
|
|
||||||
name: RDM6300 NFC Tag
|
|
||||||
|
11
tests/components/resistance/common.yaml
Normal file
11
tests/components/resistance/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
sensor:
|
||||||
|
- platform: adc
|
||||||
|
id: my_sensor
|
||||||
|
pin: ${pin}
|
||||||
|
- platform: resistance
|
||||||
|
sensor: my_sensor
|
||||||
|
configuration: DOWNSTREAM
|
||||||
|
resistor: 10kΩ
|
||||||
|
reference_voltage: 3.3V
|
||||||
|
name: Resistance
|
||||||
|
id: resist
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
pin: GPIO32
|
||||||
id: my_sensor
|
|
||||||
pin: 32
|
<<: !include common.yaml
|
||||||
attenuation: 11db
|
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
pin: GPIO4
|
||||||
id: my_sensor
|
|
||||||
pin: 4
|
<<: !include common.yaml
|
||||||
attenuation: 11db
|
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
4
tests/components/resistance/test.esp32-c3-idf.yaml
Normal file
4
tests/components/resistance/test.esp32-c3-idf.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO4
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
pin: GPIO32
|
||||||
id: my_sensor
|
|
||||||
pin: 32
|
<<: !include common.yaml
|
||||||
attenuation: 11db
|
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
pin: GPIO1
|
||||||
id: my_sensor
|
|
||||||
pin: 1
|
<<: !include common.yaml
|
||||||
attenuation: 11db
|
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
4
tests/components/resistance/test.esp32-s2-idf.yaml
Normal file
4
tests/components/resistance/test.esp32-s2-idf.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO1
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
pin: GPIO1
|
||||||
id: my_sensor
|
|
||||||
pin: 1
|
<<: !include common.yaml
|
||||||
attenuation: 11db
|
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
4
tests/components/resistance/test.esp32-s3-idf.yaml
Normal file
4
tests/components/resistance/test.esp32-s3-idf.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO1
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
@ -1,11 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
|
||||||
id: my_sensor
|
|
||||||
pin: VCC
|
pin: VCC
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
<<: !include common.yaml
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: adc
|
|
||||||
id: my_sensor
|
|
||||||
name: VSYS
|
|
||||||
pin: VCC
|
pin: VCC
|
||||||
- platform: resistance
|
|
||||||
sensor: my_sensor
|
<<: !include common.yaml
|
||||||
configuration: DOWNSTREAM
|
|
||||||
resistor: 10kΩ
|
|
||||||
reference_voltage: 3.3V
|
|
||||||
name: Resistance
|
|
||||||
id: resist
|
|
||||||
|
35
tests/components/rf_bridge/common.yaml
Normal file
35
tests/components/rf_bridge/common.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
uart:
|
||||||
|
- id: uart_rf_bridge
|
||||||
|
tx_pin: ${tx_pin}
|
||||||
|
rx_pin: ${rx_pin}
|
||||||
|
baud_rate: 115200
|
||||||
|
|
||||||
|
rf_bridge:
|
||||||
|
on_code_received:
|
||||||
|
- lambda: |-
|
||||||
|
uint32_t test;
|
||||||
|
test = data.sync;
|
||||||
|
test = data.low;
|
||||||
|
test = data.high;
|
||||||
|
test = data.code;
|
||||||
|
- rf_bridge.send_code:
|
||||||
|
sync: 0x1234
|
||||||
|
low: 0x1234
|
||||||
|
high: 0x1234
|
||||||
|
code: 0x123456
|
||||||
|
- rf_bridge.learn
|
||||||
|
on_advanced_code_received:
|
||||||
|
- lambda: |-
|
||||||
|
uint32_t test;
|
||||||
|
std::string test_code;
|
||||||
|
test = data.length;
|
||||||
|
test = data.protocol;
|
||||||
|
test_code = data.code;
|
||||||
|
- rf_bridge.start_advanced_sniffing:
|
||||||
|
- rf_bridge.stop_advanced_sniffing:
|
||||||
|
- rf_bridge.send_advanced_code:
|
||||||
|
length: 0x04
|
||||||
|
protocol: 0x01
|
||||||
|
code: "ABC123"
|
||||||
|
- rf_bridge.send_raw:
|
||||||
|
raw: "AAA5070008001000ABC12355"
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO17
|
||||||
tx_pin: 17
|
rx_pin: GPIO16
|
||||||
rx_pin: 16
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO17
|
||||||
tx_pin: 17
|
rx_pin: GPIO16
|
||||||
rx_pin: 16
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_rf_bridge
|
tx_pin: GPIO4
|
||||||
tx_pin: 4
|
rx_pin: GPIO5
|
||||||
rx_pin: 5
|
|
||||||
baud_rate: 115200
|
|
||||||
|
|
||||||
rf_bridge:
|
<<: !include common.yaml
|
||||||
on_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
test = data.sync;
|
|
||||||
test = data.low;
|
|
||||||
test = data.high;
|
|
||||||
test = data.code;
|
|
||||||
- rf_bridge.send_code:
|
|
||||||
sync: 0x1234
|
|
||||||
low: 0x1234
|
|
||||||
high: 0x1234
|
|
||||||
code: 0x123456
|
|
||||||
- rf_bridge.learn
|
|
||||||
on_advanced_code_received:
|
|
||||||
- lambda: |-
|
|
||||||
uint32_t test;
|
|
||||||
std::string test_code;
|
|
||||||
test = data.length;
|
|
||||||
test = data.protocol;
|
|
||||||
test_code = data.code;
|
|
||||||
- rf_bridge.start_advanced_sniffing:
|
|
||||||
- rf_bridge.stop_advanced_sniffing:
|
|
||||||
- rf_bridge.send_advanced_code:
|
|
||||||
length: 0x04
|
|
||||||
protocol: 0x01
|
|
||||||
code: "ABC123"
|
|
||||||
- rf_bridge.send_raw:
|
|
||||||
raw: "AAA5070008001000ABC12355"
|
|
||||||
|
18
tests/components/rgb/common.yaml
Normal file
18
tests/components/rgb/common.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin2}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_3
|
||||||
|
pin: ${pin3}
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: rgb
|
||||||
|
name: RGB Light
|
||||||
|
id: rgb_light
|
||||||
|
red: light_output_1
|
||||||
|
green: light_output_2
|
||||||
|
blue: light_output_3
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
|
||||||
pin: 13
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
|
||||||
pin: 2
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
|
||||||
pin: 2
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
|
||||||
pin: 13
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: esp8266_pwm
|
light_platform: esp8266_pwm
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: esp8266_pwm
|
pin3: GPIO14
|
||||||
id: light_output_2
|
|
||||||
pin: 13
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: rp2040_pwm
|
light_platform: rp2040_pwm
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 12
|
pin2: GPIO3
|
||||||
- platform: rp2040_pwm
|
pin3: GPIO4
|
||||||
id: light_output_2
|
|
||||||
pin: 13
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgb
|
|
||||||
name: RGB Light
|
|
||||||
id: rgb_light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
|
28
tests/components/rgbct/common.yaml
Normal file
28
tests/components/rgbct/common.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin2}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_3
|
||||||
|
pin: ${pin3}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_4
|
||||||
|
pin: ${pin4}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_5
|
||||||
|
pin: ${pin5}
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: rgbct
|
||||||
|
name: RGBCT Light
|
||||||
|
red: light_output_1
|
||||||
|
green: light_output_2
|
||||||
|
blue: light_output_3
|
||||||
|
color_temperature: light_output_4
|
||||||
|
white_brightness: light_output_5
|
||||||
|
cold_white_color_temperature: 153 mireds
|
||||||
|
warm_white_color_temperature: 500 mireds
|
||||||
|
color_interlock: true
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
pin5: GPIO6
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 5
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
pin5: GPIO6
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 5
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: esp8266_pwm
|
light_platform: esp8266_pwm
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: esp8266_pwm
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: rp2040_pwm
|
light_platform: rp2040_pwm
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 12
|
pin2: GPIO3
|
||||||
- platform: rp2040_pwm
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 13
|
pin5: GPIO6
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbct
|
|
||||||
name: RGBCT Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
color_temperature: light_output_4
|
|
||||||
white_brightness: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
22
tests/components/rgbw/common.yaml
Normal file
22
tests/components/rgbw/common.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin2}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_3
|
||||||
|
pin: ${pin3}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_4
|
||||||
|
pin: ${pin4}
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: rgbw
|
||||||
|
name: RGBW Light
|
||||||
|
red: light_output_1
|
||||||
|
green: light_output_2
|
||||||
|
blue: light_output_3
|
||||||
|
white: light_output_4
|
||||||
|
color_interlock: true
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: esp8266_pwm
|
light_platform: esp8266_pwm
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: esp8266_pwm
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: rp2040_pwm
|
light_platform: rp2040_pwm
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 12
|
pin2: GPIO3
|
||||||
- platform: rp2040_pwm
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 13
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbw
|
|
||||||
name: RGBW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
white: light_output_4
|
|
||||||
color_interlock: true
|
|
||||||
|
28
tests/components/rgbww/common.yaml
Normal file
28
tests/components/rgbww/common.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin2}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_3
|
||||||
|
pin: ${pin3}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_4
|
||||||
|
pin: ${pin4}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_5
|
||||||
|
pin: ${pin5}
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: rgbww
|
||||||
|
name: RGBWW Light
|
||||||
|
red: light_output_1
|
||||||
|
green: light_output_2
|
||||||
|
blue: light_output_3
|
||||||
|
cold_white: light_output_4
|
||||||
|
warm_white: light_output_5
|
||||||
|
cold_white_color_temperature: 153 mireds
|
||||||
|
warm_white_color_temperature: 500 mireds
|
||||||
|
color_interlock: true
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
pin5: GPIO6
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 5
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 1
|
pin2: GPIO3
|
||||||
- platform: ledc
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 2
|
pin5: GPIO6
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 3
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 4
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 5
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ledc
|
light_platform: ledc
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: ledc
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: ledc
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: ledc
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: esp8266_pwm
|
light_platform: esp8266_pwm
|
||||||
id: light_output_1
|
pin1: GPIO12
|
||||||
pin: 12
|
pin2: GPIO13
|
||||||
- platform: esp8266_pwm
|
pin3: GPIO14
|
||||||
id: light_output_2
|
pin4: GPIO15
|
||||||
pin: 13
|
pin5: GPIO16
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: esp8266_pwm
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
@ -1,28 +1,9 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: rp2040_pwm
|
light_platform: rp2040_pwm
|
||||||
id: light_output_1
|
pin1: GPIO2
|
||||||
pin: 12
|
pin2: GPIO3
|
||||||
- platform: rp2040_pwm
|
pin3: GPIO4
|
||||||
id: light_output_2
|
pin4: GPIO5
|
||||||
pin: 13
|
pin5: GPIO6
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_3
|
|
||||||
pin: 14
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_4
|
|
||||||
pin: 15
|
|
||||||
- platform: rp2040_pwm
|
|
||||||
id: light_output_5
|
|
||||||
pin: 16
|
|
||||||
|
|
||||||
light:
|
<<: !include common.yaml
|
||||||
- platform: rgbww
|
|
||||||
name: RGBWW Light
|
|
||||||
red: light_output_1
|
|
||||||
green: light_output_2
|
|
||||||
blue: light_output_3
|
|
||||||
cold_white: light_output_4
|
|
||||||
warm_white: light_output_5
|
|
||||||
cold_white_color_temperature: 153 mireds
|
|
||||||
warm_white_color_temperature: 500 mireds
|
|
||||||
color_interlock: true
|
|
||||||
|
25
tests/components/rotary_encoder/common.yaml
Normal file
25
tests/components/rotary_encoder/common.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
sensor:
|
||||||
|
- platform: rotary_encoder
|
||||||
|
name: Rotary Encoder
|
||||||
|
id: rotary_encoder1
|
||||||
|
pin_a: ${pin_a}
|
||||||
|
pin_b: ${pin_b}
|
||||||
|
pin_reset: ${pin_reset}
|
||||||
|
filters:
|
||||||
|
- or:
|
||||||
|
- debounce: 0.1s
|
||||||
|
- delta: 10
|
||||||
|
resolution: 4
|
||||||
|
min_value: -10
|
||||||
|
max_value: 30
|
||||||
|
on_value:
|
||||||
|
- sensor.rotary_encoder.set_value:
|
||||||
|
id: rotary_encoder1
|
||||||
|
value: 10
|
||||||
|
- sensor.rotary_encoder.set_value:
|
||||||
|
id: rotary_encoder1
|
||||||
|
value: !lambda "return -1;"
|
||||||
|
on_clockwise:
|
||||||
|
- logger.log: Clockwise
|
||||||
|
on_anticlockwise:
|
||||||
|
- logger.log: Anticlockwise
|
@ -1,25 +1,6 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: rotary_encoder
|
pin_a: GPIO12
|
||||||
name: Rotary Encoder
|
pin_b: GPIO13
|
||||||
id: rotary_encoder1
|
pin_reset: GPIO14
|
||||||
pin_a: 13
|
|
||||||
pin_b: 14
|
<<: !include common.yaml
|
||||||
pin_reset: 15
|
|
||||||
filters:
|
|
||||||
- or:
|
|
||||||
- debounce: 0.1s
|
|
||||||
- delta: 10
|
|
||||||
resolution: 4
|
|
||||||
min_value: -10
|
|
||||||
max_value: 30
|
|
||||||
on_value:
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: 10
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: !lambda "return -1;"
|
|
||||||
on_clockwise:
|
|
||||||
- logger.log: Clockwise
|
|
||||||
on_anticlockwise:
|
|
||||||
- logger.log: Anticlockwise
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: rotary_encoder
|
pin_a: GPIO2
|
||||||
name: Rotary Encoder
|
pin_b: GPIO3
|
||||||
id: rotary_encoder1
|
pin_reset: GPIO4
|
||||||
pin_a: 3
|
|
||||||
pin_b: 4
|
<<: !include common.yaml
|
||||||
pin_reset: 5
|
|
||||||
filters:
|
|
||||||
- or:
|
|
||||||
- debounce: 0.1s
|
|
||||||
- delta: 10
|
|
||||||
resolution: 4
|
|
||||||
min_value: -10
|
|
||||||
max_value: 30
|
|
||||||
on_value:
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: 10
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: !lambda "return -1;"
|
|
||||||
on_clockwise:
|
|
||||||
- logger.log: Clockwise
|
|
||||||
on_anticlockwise:
|
|
||||||
- logger.log: Anticlockwise
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: rotary_encoder
|
pin_a: GPIO2
|
||||||
name: Rotary Encoder
|
pin_b: GPIO3
|
||||||
id: rotary_encoder1
|
pin_reset: GPIO4
|
||||||
pin_a: 3
|
|
||||||
pin_b: 4
|
<<: !include common.yaml
|
||||||
pin_reset: 5
|
|
||||||
filters:
|
|
||||||
- or:
|
|
||||||
- debounce: 0.1s
|
|
||||||
- delta: 10
|
|
||||||
resolution: 4
|
|
||||||
min_value: -10
|
|
||||||
max_value: 30
|
|
||||||
on_value:
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: 10
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: !lambda "return -1;"
|
|
||||||
on_clockwise:
|
|
||||||
- logger.log: Clockwise
|
|
||||||
on_anticlockwise:
|
|
||||||
- logger.log: Anticlockwise
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
sensor:
|
substitutions:
|
||||||
- platform: rotary_encoder
|
pin_a: GPIO12
|
||||||
name: Rotary Encoder
|
pin_b: GPIO13
|
||||||
id: rotary_encoder1
|
pin_reset: GPIO14
|
||||||
pin_a: 13
|
|
||||||
pin_b: 14
|
<<: !include common.yaml
|
||||||
pin_reset: 15
|
|
||||||
filters:
|
|
||||||
- or:
|
|
||||||
- debounce: 0.1s
|
|
||||||
- delta: 10
|
|
||||||
resolution: 4
|
|
||||||
min_value: -10
|
|
||||||
max_value: 30
|
|
||||||
on_value:
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: 10
|
|
||||||
- sensor.rotary_encoder.set_value:
|
|
||||||
id: rotary_encoder1
|
|
||||||
value: !lambda "return -1;"
|
|
||||||
on_clockwise:
|
|
||||||
- logger.log: Clockwise
|
|
||||||
on_anticlockwise:
|
|
||||||
- logger.log: Anticlockwise
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user