diff --git a/tests/components/i2c/common.yaml b/tests/components/i2c/common.yaml new file mode 100644 index 0000000000..d70cd595ad --- /dev/null +++ b/tests/components/i2c/common.yaml @@ -0,0 +1,4 @@ +i2c: + - id: i2c_i2c + scl: ${scl_pin} + sda: ${sda_pin} diff --git a/tests/components/i2c/test.esp32-ard.yaml b/tests/components/i2c/test.esp32-ard.yaml index 19114a9e5d..63c3bd6afd 100644 --- a/tests/components/i2c/test.esp32-ard.yaml +++ b/tests/components/i2c/test.esp32-ard.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/i2c/test.esp32-c3-ard.yaml b/tests/components/i2c/test.esp32-c3-ard.yaml index a881438faa..ee2c29ca4e 100644 --- a/tests/components/i2c/test.esp32-c3-ard.yaml +++ b/tests/components/i2c/test.esp32-c3-ard.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/i2c/test.esp32-c3-idf.yaml b/tests/components/i2c/test.esp32-c3-idf.yaml index a881438faa..ee2c29ca4e 100644 --- a/tests/components/i2c/test.esp32-c3-idf.yaml +++ b/tests/components/i2c/test.esp32-c3-idf.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/i2c/test.esp32-idf.yaml b/tests/components/i2c/test.esp32-idf.yaml index 19114a9e5d..63c3bd6afd 100644 --- a/tests/components/i2c/test.esp32-idf.yaml +++ b/tests/components/i2c/test.esp32-idf.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/i2c/test.esp8266-ard.yaml b/tests/components/i2c/test.esp8266-ard.yaml index a881438faa..ee2c29ca4e 100644 --- a/tests/components/i2c/test.esp8266-ard.yaml +++ b/tests/components/i2c/test.esp8266-ard.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/i2c/test.rp2040-ard.yaml b/tests/components/i2c/test.rp2040-ard.yaml index a881438faa..ee2c29ca4e 100644 --- a/tests/components/i2c/test.rp2040-ard.yaml +++ b/tests/components/i2c/test.rp2040-ard.yaml @@ -1,4 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/i2c_device/common.yaml b/tests/components/i2c_device/common.yaml new file mode 100644 index 0000000000..35a6f8f7f0 --- /dev/null +++ b/tests/components/i2c_device/common.yaml @@ -0,0 +1,8 @@ +i2c: + - id: i2c_i2c_device + scl: ${scl_pin} + sda: ${sda_pin} + +i2c_device: + id: i2cdev + address: 0x2C diff --git a/tests/components/i2c_device/test.esp32-ard.yaml b/tests/components/i2c_device/test.esp32-ard.yaml index 6169d113f8..63c3bd6afd 100644 --- a/tests/components/i2c_device/test.esp32-ard.yaml +++ b/tests/components/i2c_device/test.esp32-ard.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp32-c3-ard.yaml b/tests/components/i2c_device/test.esp32-c3-ard.yaml index 5d53d12208..ee2c29ca4e 100644 --- a/tests/components/i2c_device/test.esp32-c3-ard.yaml +++ b/tests/components/i2c_device/test.esp32-c3-ard.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp32-c3-idf.yaml b/tests/components/i2c_device/test.esp32-c3-idf.yaml index 5d53d12208..ee2c29ca4e 100644 --- a/tests/components/i2c_device/test.esp32-c3-idf.yaml +++ b/tests/components/i2c_device/test.esp32-c3-idf.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp32-idf.yaml b/tests/components/i2c_device/test.esp32-idf.yaml index 6169d113f8..63c3bd6afd 100644 --- a/tests/components/i2c_device/test.esp32-idf.yaml +++ b/tests/components/i2c_device/test.esp32-idf.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp8266-ard.yaml b/tests/components/i2c_device/test.esp8266-ard.yaml index 5d53d12208..ee2c29ca4e 100644 --- a/tests/components/i2c_device/test.esp8266-ard.yaml +++ b/tests/components/i2c_device/test.esp8266-ard.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2c_device/test.rp2040-ard.yaml b/tests/components/i2c_device/test.rp2040-ard.yaml index 5d53d12208..ee2c29ca4e 100644 --- a/tests/components/i2c_device/test.rp2040-ard.yaml +++ b/tests/components/i2c_device/test.rp2040-ard.yaml @@ -1,8 +1,5 @@ -i2c: - - id: i2c_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c_device: - id: i2cdev - address: 0x2C +<<: !include common.yaml diff --git a/tests/components/i2s_audio/common.yaml b/tests/components/i2s_audio/common.yaml new file mode 100644 index 0000000000..2cecdc93b7 --- /dev/null +++ b/tests/components/i2s_audio/common.yaml @@ -0,0 +1,4 @@ +i2s_audio: + i2s_bclk_pin: ${i2s_bclk_pin} + i2s_lrclk_pin: ${i2s_lrclk_pin} + i2s_mclk_pin: ${i2s_mclk_pin} diff --git a/tests/components/i2s_audio/test.esp32-ard.yaml b/tests/components/i2s_audio/test.esp32-ard.yaml index 938dd5c25f..ce751d7d4a 100644 --- a/tests/components/i2s_audio/test.esp32-ard.yaml +++ b/tests/components/i2s_audio/test.esp32-ard.yaml @@ -1,4 +1,6 @@ -i2s_audio: - i2s_bclk_pin: 27 - i2s_lrclk_pin: 26 - i2s_mclk_pin: 25 +substitutions: + i2s_bclk_pin: GPIO15 + i2s_lrclk_pin: GPIO16 + i2s_mclk_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/i2s_audio/test.esp32-c3-ard.yaml b/tests/components/i2s_audio/test.esp32-c3-ard.yaml index 08cd56b1a7..5490846ae9 100644 --- a/tests/components/i2s_audio/test.esp32-c3-ard.yaml +++ b/tests/components/i2s_audio/test.esp32-c3-ard.yaml @@ -1,4 +1,6 @@ -i2s_audio: - i2s_bclk_pin: 7 - i2s_lrclk_pin: 6 - i2s_mclk_pin: 5 +substitutions: + i2s_bclk_pin: GPIO5 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO7 + +<<: !include common.yaml diff --git a/tests/components/i2s_audio/test.esp32-c3-idf.yaml b/tests/components/i2s_audio/test.esp32-c3-idf.yaml index 08cd56b1a7..5490846ae9 100644 --- a/tests/components/i2s_audio/test.esp32-c3-idf.yaml +++ b/tests/components/i2s_audio/test.esp32-c3-idf.yaml @@ -1,4 +1,6 @@ -i2s_audio: - i2s_bclk_pin: 7 - i2s_lrclk_pin: 6 - i2s_mclk_pin: 5 +substitutions: + i2s_bclk_pin: GPIO5 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO7 + +<<: !include common.yaml diff --git a/tests/components/i2s_audio/test.esp32-idf.yaml b/tests/components/i2s_audio/test.esp32-idf.yaml index 938dd5c25f..ce751d7d4a 100644 --- a/tests/components/i2s_audio/test.esp32-idf.yaml +++ b/tests/components/i2s_audio/test.esp32-idf.yaml @@ -1,4 +1,6 @@ -i2s_audio: - i2s_bclk_pin: 27 - i2s_lrclk_pin: 26 - i2s_mclk_pin: 25 +substitutions: + i2s_bclk_pin: GPIO15 + i2s_lrclk_pin: GPIO16 + i2s_mclk_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/iaqcore/common.yaml b/tests/components/iaqcore/common.yaml new file mode 100644 index 0000000000..927b836c52 --- /dev/null +++ b/tests/components/iaqcore/common.yaml @@ -0,0 +1,11 @@ +i2c: + - id: i2c_iaqcore + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: iaqcore + co2: + name: iAQ Core CO2 Sensor + tvoc: + name: iAQ Core TVOC Sensor diff --git a/tests/components/iaqcore/test.esp32-ard.yaml b/tests/components/iaqcore/test.esp32-ard.yaml index 26b01dadf9..63c3bd6afd 100644 --- a/tests/components/iaqcore/test.esp32-ard.yaml +++ b/tests/components/iaqcore/test.esp32-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp32-c3-ard.yaml b/tests/components/iaqcore/test.esp32-c3-ard.yaml index a1809dffd7..ee2c29ca4e 100644 --- a/tests/components/iaqcore/test.esp32-c3-ard.yaml +++ b/tests/components/iaqcore/test.esp32-c3-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp32-c3-idf.yaml b/tests/components/iaqcore/test.esp32-c3-idf.yaml index a1809dffd7..ee2c29ca4e 100644 --- a/tests/components/iaqcore/test.esp32-c3-idf.yaml +++ b/tests/components/iaqcore/test.esp32-c3-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp32-idf.yaml b/tests/components/iaqcore/test.esp32-idf.yaml index 26b01dadf9..63c3bd6afd 100644 --- a/tests/components/iaqcore/test.esp32-idf.yaml +++ b/tests/components/iaqcore/test.esp32-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp8266-ard.yaml b/tests/components/iaqcore/test.esp8266-ard.yaml index a1809dffd7..ee2c29ca4e 100644 --- a/tests/components/iaqcore/test.esp8266-ard.yaml +++ b/tests/components/iaqcore/test.esp8266-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/iaqcore/test.rp2040-ard.yaml b/tests/components/iaqcore/test.rp2040-ard.yaml index a1809dffd7..ee2c29ca4e 100644 --- a/tests/components/iaqcore/test.rp2040-ard.yaml +++ b/tests/components/iaqcore/test.rp2040-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_iaqcore - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: iaqcore - co2: - name: iAQ Core CO2 Sensor - tvoc: - name: iAQ Core TVOC Sensor +<<: !include common.yaml diff --git a/tests/components/ili9xxx/common.yaml b/tests/components/ili9xxx/common.yaml new file mode 100644 index 0000000000..b182d110cd --- /dev/null +++ b/tests/components/ili9xxx/common.yaml @@ -0,0 +1,36 @@ +spi: + - id: spi_main_lcd + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ili9xxx + invert_colors: true + dimensions: 320x240 + transform: + swap_xy: true + mirror_x: true + mirror_y: false + model: TFT 2.4 + color_palette: GRAYSCALE + cs_pin: ${cs_pin1} + dc_pin: ${dc_pin1} + reset_pin: ${reset_pin1} + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: ili9xxx + invert_colors: false + color_palette: 8bit + dimensions: + width: 320 + height: 240 + offset_width: 20 + offset_height: 10 + model: TFT 2.4 + cs_pin: ${cs_pin2} + dc_pin: ${dc_pin2} + reset_pin: ${reset_pin2} + auto_clear_enabled: false + rotation: 90 + lambda: |- + it.fill(Color::WHITE); diff --git a/tests/components/ili9xxx/test.esp32-ard.yaml b/tests/components/ili9xxx/test.esp32-ard.yaml index c00c38ce3e..2e006d2521 100644 --- a/tests/components/ili9xxx/test.esp32-ard.yaml +++ b/tests/components/ili9xxx/test.esp32-ard.yaml @@ -1,36 +1,11 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin1: GPIO12 + dc_pin1: GPIO13 + reset_pin1: GPIO14 + cs_pin2: GPIO25 + dc_pin2: GPIO26 + reset_pin2: GPIO27 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: TFT 2.4 - color_palette: GRAYSCALE - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: ili9xxx - invert_colors: false - color_palette: 8bit - dimensions: - width: 320 - height: 240 - offset_width: 20 - offset_height: 10 - model: TFT 2.4 - cs_pin: 25 - dc_pin: 26 - reset_pin: 27 - auto_clear_enabled: false - rotation: 90 - lambda: |- - it.fill(Color::WHITE); +<<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp32-c3-ard.yaml b/tests/components/ili9xxx/test.esp32-c3-ard.yaml index fd03bd54b7..3037785e81 100644 --- a/tests/components/ili9xxx/test.esp32-c3-ard.yaml +++ b/tests/components/ili9xxx/test.esp32-c3-ard.yaml @@ -1,36 +1,12 @@ -spi: - - id: spi_main_lcd - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin1: GPIO8 + dc_pin1: GPIO9 + reset_pin1: GPIO10 + cs_pin2: GPIO2 + dc_pin2: GPIO3 + reset_pin2: GPIO4 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: TFT 2.4 - color_palette: GRAYSCALE - cs_pin: 8 - dc_pin: 9 - reset_pin: 10 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: ili9xxx - invert_colors: false - dimensions: - width: 320 - height: 240 - offset_width: 20 - offset_height: 10 - model: TFT 2.4 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - auto_clear_enabled: false - rotation: 90 - lambda: |- - it.fill(Color::WHITE); +<<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp32-c3-idf.yaml b/tests/components/ili9xxx/test.esp32-c3-idf.yaml index fd03bd54b7..3037785e81 100644 --- a/tests/components/ili9xxx/test.esp32-c3-idf.yaml +++ b/tests/components/ili9xxx/test.esp32-c3-idf.yaml @@ -1,36 +1,12 @@ -spi: - - id: spi_main_lcd - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin1: GPIO8 + dc_pin1: GPIO9 + reset_pin1: GPIO10 + cs_pin2: GPIO2 + dc_pin2: GPIO3 + reset_pin2: GPIO4 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: TFT 2.4 - color_palette: GRAYSCALE - cs_pin: 8 - dc_pin: 9 - reset_pin: 10 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: ili9xxx - invert_colors: false - dimensions: - width: 320 - height: 240 - offset_width: 20 - offset_height: 10 - model: TFT 2.4 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - auto_clear_enabled: false - rotation: 90 - lambda: |- - it.fill(Color::WHITE); +<<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp32-idf.yaml b/tests/components/ili9xxx/test.esp32-idf.yaml index 6da62f69d2..2e006d2521 100644 --- a/tests/components/ili9xxx/test.esp32-idf.yaml +++ b/tests/components/ili9xxx/test.esp32-idf.yaml @@ -1,23 +1,11 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin1: GPIO12 + dc_pin1: GPIO13 + reset_pin1: GPIO14 + cs_pin2: GPIO25 + dc_pin2: GPIO26 + reset_pin2: GPIO27 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: custom - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - init_sequence: - - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10] - - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp8266-ard.yaml b/tests/components/ili9xxx/test.esp8266-ard.yaml index b8192e69d1..5dee055fd4 100644 --- a/tests/components/ili9xxx/test.esp8266-ard.yaml +++ b/tests/components/ili9xxx/test.esp8266-ard.yaml @@ -1,36 +1,12 @@ -spi: - - id: spi_main_lcd - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin1: GPIO5 + dc_pin1: GPIO15 + reset_pin1: GPIO16 + cs_pin2: GPIO2 + dc_pin2: GPIO4 + reset_pin2: GPIO0 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: TFT 2.4 - color_palette: GRAYSCALE - cs_pin: 5 - dc_pin: 15 - reset_pin: 16 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: ili9xxx - invert_colors: false - dimensions: - width: 320 - height: 240 - offset_width: 20 - offset_height: 10 - model: TFT 2.4 - cs_pin: 2 - dc_pin: 4 - reset_pin: 0 - auto_clear_enabled: false - rotation: 90 - lambda: |- - it.fill(Color::WHITE); +<<: !include common.yaml diff --git a/tests/components/ili9xxx/test.rp2040-ard.yaml b/tests/components/ili9xxx/test.rp2040-ard.yaml index 0423f41a1c..74c9b906e9 100644 --- a/tests/components/ili9xxx/test.rp2040-ard.yaml +++ b/tests/components/ili9xxx/test.rp2040-ard.yaml @@ -1,36 +1,12 @@ -spi: - - id: spi_main_lcd - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin1: GPIO5 + dc_pin1: GPIO15 + reset_pin1: GPIO16 + cs_pin2: GPIO20 + dc_pin2: GPIO21 + reset_pin2: GPIO22 -display: - - platform: ili9xxx - invert_colors: true - dimensions: 320x240 - transform: - swap_xy: true - mirror_x: true - mirror_y: false - model: TFT 2.4 - color_palette: GRAYSCALE - cs_pin: 5 - dc_pin: 15 - reset_pin: 16 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: ili9xxx - invert_colors: false - dimensions: - width: 320 - height: 240 - offset_width: 20 - offset_height: 10 - model: TFT 2.4 - cs_pin: 20 - dc_pin: 21 - reset_pin: 22 - auto_clear_enabled: false - rotation: 90 - lambda: |- - it.fill(Color::WHITE); +<<: !include common.yaml diff --git a/tests/components/ina219/common.yaml b/tests/components/ina219/common.yaml new file mode 100644 index 0000000000..4ca4c9ed8f --- /dev/null +++ b/tests/components/ina219/common.yaml @@ -0,0 +1,20 @@ +i2c: + - id: i2c_ina219 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: ina219 + address: 0x40 + shunt_resistance: 0.1 ohm + current: + name: INA219 Current + power: + name: INA219 Power + bus_voltage: + name: INA219 Bus Voltage + shunt_voltage: + name: INA219 Shunt Voltage + max_voltage: 32.0V + max_current: 3.2A + update_interval: 15s diff --git a/tests/components/ina219/test.esp32-ard.yaml b/tests/components/ina219/test.esp32-ard.yaml index affbec67c4..63c3bd6afd 100644 --- a/tests/components/ina219/test.esp32-ard.yaml +++ b/tests/components/ina219/test.esp32-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina219/test.esp32-c3-ard.yaml b/tests/components/ina219/test.esp32-c3-ard.yaml index 586add9d16..ee2c29ca4e 100644 --- a/tests/components/ina219/test.esp32-c3-ard.yaml +++ b/tests/components/ina219/test.esp32-c3-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina219/test.esp32-c3-idf.yaml b/tests/components/ina219/test.esp32-c3-idf.yaml index 586add9d16..ee2c29ca4e 100644 --- a/tests/components/ina219/test.esp32-c3-idf.yaml +++ b/tests/components/ina219/test.esp32-c3-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina219/test.esp32-idf.yaml b/tests/components/ina219/test.esp32-idf.yaml index affbec67c4..63c3bd6afd 100644 --- a/tests/components/ina219/test.esp32-idf.yaml +++ b/tests/components/ina219/test.esp32-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina219/test.esp8266-ard.yaml b/tests/components/ina219/test.esp8266-ard.yaml index 586add9d16..ee2c29ca4e 100644 --- a/tests/components/ina219/test.esp8266-ard.yaml +++ b/tests/components/ina219/test.esp8266-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina219/test.rp2040-ard.yaml b/tests/components/ina219/test.rp2040-ard.yaml index 586add9d16..ee2c29ca4e 100644 --- a/tests/components/ina219/test.rp2040-ard.yaml +++ b/tests/components/ina219/test.rp2040-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_ina219 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA219 Current - power: - name: INA219 Power - bus_voltage: - name: INA219 Bus Voltage - shunt_voltage: - name: INA219 Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/common.yaml b/tests/components/ina226/common.yaml new file mode 100644 index 0000000000..8bcd038e50 --- /dev/null +++ b/tests/components/ina226/common.yaml @@ -0,0 +1,19 @@ +i2c: + - id: i2c_ina226 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: ina226 + address: 0x40 + shunt_resistance: 0.1 ohm + current: + name: INA226 Current + power: + name: INA226 Power + bus_voltage: + name: INA226 Bus Voltage + shunt_voltage: + name: INA226 Shunt Voltage + max_current: 3.2A + update_interval: 15s diff --git a/tests/components/ina226/test.esp32-ard.yaml b/tests/components/ina226/test.esp32-ard.yaml index feab5e146c..63c3bd6afd 100644 --- a/tests/components/ina226/test.esp32-ard.yaml +++ b/tests/components/ina226/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/test.esp32-c3-ard.yaml b/tests/components/ina226/test.esp32-c3-ard.yaml index 6581763294..ee2c29ca4e 100644 --- a/tests/components/ina226/test.esp32-c3-ard.yaml +++ b/tests/components/ina226/test.esp32-c3-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/test.esp32-c3-idf.yaml b/tests/components/ina226/test.esp32-c3-idf.yaml index 6581763294..ee2c29ca4e 100644 --- a/tests/components/ina226/test.esp32-c3-idf.yaml +++ b/tests/components/ina226/test.esp32-c3-idf.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/test.esp32-idf.yaml b/tests/components/ina226/test.esp32-idf.yaml index feab5e146c..63c3bd6afd 100644 --- a/tests/components/ina226/test.esp32-idf.yaml +++ b/tests/components/ina226/test.esp32-idf.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/test.esp8266-ard.yaml b/tests/components/ina226/test.esp8266-ard.yaml index 6581763294..ee2c29ca4e 100644 --- a/tests/components/ina226/test.esp8266-ard.yaml +++ b/tests/components/ina226/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina226/test.rp2040-ard.yaml b/tests/components/ina226/test.rp2040-ard.yaml index 6581763294..ee2c29ca4e 100644 --- a/tests/components/ina226/test.rp2040-ard.yaml +++ b/tests/components/ina226/test.rp2040-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina226 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina226 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: INA226 Current - power: - name: INA226 Power - bus_voltage: - name: INA226 Bus Voltage - shunt_voltage: - name: INA226 Shunt Voltage - max_current: 3.2A - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina260/common.yaml b/tests/components/ina260/common.yaml new file mode 100644 index 0000000000..ab94b2e509 --- /dev/null +++ b/tests/components/ina260/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_ina260 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: ina260 + address: 0x40 + current: + name: INA260 Current + power: + name: INA260 Power + bus_voltage: + name: INA260 Voltage + update_interval: 60s diff --git a/tests/components/ina260/test.esp32-ard.yaml b/tests/components/ina260/test.esp32-ard.yaml index be6cf73bff..63c3bd6afd 100644 --- a/tests/components/ina260/test.esp32-ard.yaml +++ b/tests/components/ina260/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina260/test.esp32-c3-ard.yaml b/tests/components/ina260/test.esp32-c3-ard.yaml index a1da63351d..ee2c29ca4e 100644 --- a/tests/components/ina260/test.esp32-c3-ard.yaml +++ b/tests/components/ina260/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina260/test.esp32-c3-idf.yaml b/tests/components/ina260/test.esp32-c3-idf.yaml index a1da63351d..ee2c29ca4e 100644 --- a/tests/components/ina260/test.esp32-c3-idf.yaml +++ b/tests/components/ina260/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina260/test.esp32-idf.yaml b/tests/components/ina260/test.esp32-idf.yaml index be6cf73bff..63c3bd6afd 100644 --- a/tests/components/ina260/test.esp32-idf.yaml +++ b/tests/components/ina260/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina260/test.esp8266-ard.yaml b/tests/components/ina260/test.esp8266-ard.yaml index a1da63351d..ee2c29ca4e 100644 --- a/tests/components/ina260/test.esp8266-ard.yaml +++ b/tests/components/ina260/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina260/test.rp2040-ard.yaml b/tests/components/ina260/test.rp2040-ard.yaml index a1da63351d..ee2c29ca4e 100644 --- a/tests/components/ina260/test.rp2040-ard.yaml +++ b/tests/components/ina260/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_ina260 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina260 - address: 0x40 - current: - name: INA260 Current - power: - name: INA260 Power - bus_voltage: - name: INA260 Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ina3221/common.yaml b/tests/components/ina3221/common.yaml new file mode 100644 index 0000000000..ba1abdfe3a --- /dev/null +++ b/tests/components/ina3221/common.yaml @@ -0,0 +1,19 @@ +i2c: + - id: i2c_ina3221 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: ina3221 + address: 0x40 + channel_1: + shunt_resistance: 0.1 ohm + current: + name: INA3221 Channel 1 Current + power: + name: INA3221 Channel 1 Power + bus_voltage: + name: INA3221 Channel 1 Bus Voltage + shunt_voltage: + name: INA3221 Channel 1 Shunt Voltage + update_interval: 15s diff --git a/tests/components/ina3221/test.esp32-ard.yaml b/tests/components/ina3221/test.esp32-ard.yaml index ad9cf79e38..63c3bd6afd 100644 --- a/tests/components/ina3221/test.esp32-ard.yaml +++ b/tests/components/ina3221/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina3221/test.esp32-c3-ard.yaml b/tests/components/ina3221/test.esp32-c3-ard.yaml index 55990871a0..ee2c29ca4e 100644 --- a/tests/components/ina3221/test.esp32-c3-ard.yaml +++ b/tests/components/ina3221/test.esp32-c3-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina3221/test.esp32-c3-idf.yaml b/tests/components/ina3221/test.esp32-c3-idf.yaml index 55990871a0..ee2c29ca4e 100644 --- a/tests/components/ina3221/test.esp32-c3-idf.yaml +++ b/tests/components/ina3221/test.esp32-c3-idf.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina3221/test.esp32-idf.yaml b/tests/components/ina3221/test.esp32-idf.yaml index ad9cf79e38..63c3bd6afd 100644 --- a/tests/components/ina3221/test.esp32-idf.yaml +++ b/tests/components/ina3221/test.esp32-idf.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina3221/test.esp8266-ard.yaml b/tests/components/ina3221/test.esp8266-ard.yaml index 55990871a0..ee2c29ca4e 100644 --- a/tests/components/ina3221/test.esp8266-ard.yaml +++ b/tests/components/ina3221/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/ina3221/test.rp2040-ard.yaml b/tests/components/ina3221/test.rp2040-ard.yaml index 55990871a0..ee2c29ca4e 100644 --- a/tests/components/ina3221/test.rp2040-ard.yaml +++ b/tests/components/ina3221/test.rp2040-ard.yaml @@ -1,19 +1,5 @@ -i2c: - - id: i2c_ina3221 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ina3221 - address: 0x40 - channel_1: - shunt_resistance: 0.1 ohm - current: - name: INA3221 Channel 1 Current - power: - name: INA3221 Channel 1 Power - bus_voltage: - name: INA3221 Channel 1 Bus Voltage - shunt_voltage: - name: INA3221 Channel 1 Shunt Voltage - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/integration/test.esp32-s2-ard.yaml b/tests/components/integration/common-esp32.yaml similarity index 78% rename from tests/components/integration/test.esp32-s2-ard.yaml rename to tests/components/integration/common-esp32.yaml index 1415952571..248106fd60 100644 --- a/tests/components/integration/test.esp32-s2-ard.yaml +++ b/tests/components/integration/common-esp32.yaml @@ -1,8 +1,8 @@ sensor: - platform: adc id: my_sensor - pin: 1 - attenuation: 11db + pin: ${pin} + attenuation: 12db - platform: integration sensor: my_sensor name: Integration Sensor diff --git a/tests/components/integration/test.esp32-ard.yaml b/tests/components/integration/test.esp32-ard.yaml index 0095fdb1ff..f84495e521 100644 --- a/tests/components/integration/test.esp32-ard.yaml +++ b/tests/components/integration/test.esp32-ard.yaml @@ -1,9 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: A0 - attenuation: 2.5db - - platform: integration - sensor: my_sensor - name: Integration Sensor - time_unit: s +substitutions: + pin: A0 + +<<: !include common-esp32.yaml diff --git a/tests/components/integration/test.esp32-c3-ard.yaml b/tests/components/integration/test.esp32-c3-ard.yaml index b68cb9f87d..5105e645f3 100644 --- a/tests/components/integration/test.esp32-c3-ard.yaml +++ b/tests/components/integration/test.esp32-c3-ard.yaml @@ -1,9 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 4 - attenuation: 11db - - platform: integration - sensor: my_sensor - name: Integration Sensor - time_unit: s +substitutions: + pin: GPIO1 + +<<: !include common-esp32.yaml diff --git a/tests/components/integration/test.esp32-c3-idf.yaml b/tests/components/integration/test.esp32-c3-idf.yaml new file mode 100644 index 0000000000..5105e645f3 --- /dev/null +++ b/tests/components/integration/test.esp32-c3-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO1 + +<<: !include common-esp32.yaml diff --git a/tests/components/integration/test.esp32-idf.yaml b/tests/components/integration/test.esp32-idf.yaml index 0095fdb1ff..f84495e521 100644 --- a/tests/components/integration/test.esp32-idf.yaml +++ b/tests/components/integration/test.esp32-idf.yaml @@ -1,9 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: A0 - attenuation: 2.5db - - platform: integration - sensor: my_sensor - name: Integration Sensor - time_unit: s +substitutions: + pin: A0 + +<<: !include common-esp32.yaml diff --git a/tests/components/integration/test.esp32-s3-ard.yaml b/tests/components/integration/test.esp32-s3-ard.yaml deleted file mode 100644 index 1415952571..0000000000 --- a/tests/components/integration/test.esp32-s3-ard.yaml +++ /dev/null @@ -1,9 +0,0 @@ -sensor: - - platform: adc - id: my_sensor - pin: 1 - attenuation: 11db - - platform: integration - sensor: my_sensor - name: Integration Sensor - time_unit: s diff --git a/tests/components/internal_temperature/common.yaml b/tests/components/internal_temperature/common.yaml new file mode 100644 index 0000000000..19f740339d --- /dev/null +++ b/tests/components/internal_temperature/common.yaml @@ -0,0 +1,3 @@ +sensor: + - platform: internal_temperature + name: Internal Temperature diff --git a/tests/components/internal_temperature/test.bk72xx-ard.yaml b/tests/components/internal_temperature/test.bk72xx-ard.yaml index 28df4a6d9f..dade44d145 100644 --- a/tests/components/internal_temperature/test.bk72xx-ard.yaml +++ b/tests/components/internal_temperature/test.bk72xx-ard.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: "Internal Temperature" +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-ard.yaml b/tests/components/internal_temperature/test.esp32-ard.yaml index 19f740339d..dade44d145 100644 --- a/tests/components/internal_temperature/test.esp32-ard.yaml +++ b/tests/components/internal_temperature/test.esp32-ard.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-c3-ard.yaml b/tests/components/internal_temperature/test.esp32-c3-ard.yaml index 19f740339d..dade44d145 100644 --- a/tests/components/internal_temperature/test.esp32-c3-ard.yaml +++ b/tests/components/internal_temperature/test.esp32-c3-ard.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-c3-idf.yaml b/tests/components/internal_temperature/test.esp32-c3-idf.yaml index 28df4a6d9f..dade44d145 100644 --- a/tests/components/internal_temperature/test.esp32-c3-idf.yaml +++ b/tests/components/internal_temperature/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: "Internal Temperature" +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-idf.yaml b/tests/components/internal_temperature/test.esp32-idf.yaml index 19f740339d..dade44d145 100644 --- a/tests/components/internal_temperature/test.esp32-idf.yaml +++ b/tests/components/internal_temperature/test.esp32-idf.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-s2-ard.yaml b/tests/components/internal_temperature/test.esp32-s2-ard.yaml index 19f740339d..dade44d145 100644 --- a/tests/components/internal_temperature/test.esp32-s2-ard.yaml +++ b/tests/components/internal_temperature/test.esp32-s2-ard.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-s2-idf.yaml b/tests/components/internal_temperature/test.esp32-s2-idf.yaml new file mode 100644 index 0000000000..dade44d145 --- /dev/null +++ b/tests/components/internal_temperature/test.esp32-s2-idf.yaml @@ -0,0 +1 @@ +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.esp32-s3-ard.yaml b/tests/components/internal_temperature/test.esp32-s3-ard.yaml index 9eb1ec0b0f..bdd704756c 100644 --- a/tests/components/internal_temperature/test.esp32-s3-ard.yaml +++ b/tests/components/internal_temperature/test.esp32-s3-ard.yaml @@ -1,6 +1,4 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml esp32: framework: diff --git a/tests/components/internal_temperature/test.esp32-s3-idf.yaml b/tests/components/internal_temperature/test.esp32-s3-idf.yaml new file mode 100644 index 0000000000..dade44d145 --- /dev/null +++ b/tests/components/internal_temperature/test.esp32-s3-idf.yaml @@ -0,0 +1 @@ +<<: !include common.yaml diff --git a/tests/components/internal_temperature/test.rp2040-ard.yaml b/tests/components/internal_temperature/test.rp2040-ard.yaml index 19f740339d..dade44d145 100644 --- a/tests/components/internal_temperature/test.rp2040-ard.yaml +++ b/tests/components/internal_temperature/test.rp2040-ard.yaml @@ -1,3 +1 @@ -sensor: - - platform: internal_temperature - name: Internal Temperature +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/common.yaml b/tests/components/jsn_sr04t/common.yaml new file mode 100644 index 0000000000..d6871d5e91 --- /dev/null +++ b/tests/components/jsn_sr04t/common.yaml @@ -0,0 +1,11 @@ +uart: + - id: uart_jsn_sr04t + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: jsn_sr04t + id: jsn_sr04t_sensor + name: jsn_sr04t Distance + update_interval: 1s diff --git a/tests/components/jsn_sr04t/test.esp32-ard.yaml b/tests/components/jsn_sr04t/test.esp32-ard.yaml index 32b4221b3f..f486544afa 100644 --- a/tests/components/jsn_sr04t/test.esp32-ard.yaml +++ b/tests/components/jsn_sr04t/test.esp32-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp32-c3-ard.yaml b/tests/components/jsn_sr04t/test.esp32-c3-ard.yaml index 5a37418a7d..b516342f3b 100644 --- a/tests/components/jsn_sr04t/test.esp32-c3-ard.yaml +++ b/tests/components/jsn_sr04t/test.esp32-c3-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml b/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml index 5a37418a7d..b516342f3b 100644 --- a/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml +++ b/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp32-idf.yaml b/tests/components/jsn_sr04t/test.esp32-idf.yaml index 32b4221b3f..f486544afa 100644 --- a/tests/components/jsn_sr04t/test.esp32-idf.yaml +++ b/tests/components/jsn_sr04t/test.esp32-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp8266-ard.yaml b/tests/components/jsn_sr04t/test.esp8266-ard.yaml index 5a37418a7d..b516342f3b 100644 --- a/tests/components/jsn_sr04t/test.esp8266-ard.yaml +++ b/tests/components/jsn_sr04t/test.esp8266-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.rp2040-ard.yaml b/tests/components/jsn_sr04t/test.rp2040-ard.yaml index 5a37418a7d..b516342f3b 100644 --- a/tests/components/jsn_sr04t/test.rp2040-ard.yaml +++ b/tests/components/jsn_sr04t/test.rp2040-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: jsn_sr04t - id: jsn_sr04t_sensor - name: "jsn_sr04t Distance" - uart_id: uart_jsn_sr04t - update_interval: 1s +<<: !include common.yaml