From d4ac2d3c7edfa7a4a30b50820e0eeb9bd198b036 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Tue, 4 Feb 2025 17:04:53 -0600 Subject: [PATCH] [CI] Consolidate some tests (A) (#8184) --- tests/components/a02yyuw/common.yaml | 11 +++ tests/components/a02yyuw/test.esp32-ard.yaml | 16 +--- .../components/a02yyuw/test.esp32-c3-ard.yaml | 16 +--- .../components/a02yyuw/test.esp32-c3-idf.yaml | 16 +--- tests/components/a02yyuw/test.esp32-idf.yaml | 16 +--- .../components/a02yyuw/test.esp8266-ard.yaml | 16 +--- tests/components/a02yyuw/test.rp2040-ard.yaml | 16 +--- tests/components/a4988/common.yaml | 9 ++ tests/components/a4988/test.esp32-ard.yaml | 18 ++-- tests/components/a4988/test.esp32-c3-ard.yaml | 18 ++-- tests/components/a4988/test.esp32-c3-idf.yaml | 18 ++-- tests/components/a4988/test.esp32-idf.yaml | 18 ++-- tests/components/a4988/test.esp8266-ard.yaml | 18 ++-- tests/components/a4988/test.rp2040-ard.yaml | 18 ++-- tests/components/ac_dimmer/common.yaml | 5 + .../components/ac_dimmer/test.esp32-ard.yaml | 12 +-- .../ac_dimmer/test.esp32-c3-ard.yaml | 12 +-- .../ac_dimmer/test.esp8266-ard.yaml | 12 +-- .../components/ac_dimmer/test.rp2040-ard.yaml | 12 +-- tests/components/adc/test.esp32-c3-ard.yaml | 2 +- tests/components/adc/test.esp32-s2-ard.yaml | 2 +- tests/components/adc/test.esp32-s3-ard.yaml | 2 +- tests/components/adc128s102/common.yaml | 14 +++ .../components/adc128s102/test.esp32-ard.yaml | 19 ++-- .../adc128s102/test.esp32-c3-ard.yaml | 19 ++-- .../adc128s102/test.esp32-c3-idf.yaml | 19 ++-- .../components/adc128s102/test.esp32-idf.yaml | 19 ++-- .../adc128s102/test.esp8266-ard.yaml | 19 ++-- .../adc128s102/test.rp2040-ard.yaml | 19 ++-- ...ml => common-ard-esp32_rmt_led_strip.yaml} | 2 +- ...esp32-ard.yaml => common-ard-fastled.yaml} | 2 +- ...ml => common-idf-esp32_rmt_led_strip.yaml} | 2 +- .../esp32_rmt_led_strip.esp32-ard.yaml | 4 + .../esp32_rmt_led_strip.esp32-c3-ard.yaml | 4 + .../esp32_rmt_led_strip.esp32-c3-idf.yaml | 4 + .../esp32_rmt_led_strip.esp32-idf.yaml | 4 + .../fastled_clockless.esp32-ard.yaml | 4 + .../addressable_light/test.esp32-idf.yaml | 30 ------ tests/components/ade7953_i2c/common.yaml | 34 +++++++ .../ade7953_i2c/test.esp32-ard.yaml | 38 +------- .../ade7953_i2c/test.esp32-c3-ard.yaml | 38 +------- .../ade7953_i2c/test.esp32-c3-idf.yaml | 38 +------- .../ade7953_i2c/test.esp32-idf.yaml | 38 +------- .../ade7953_i2c/test.esp8266-ard.yaml | 38 +------- .../ade7953_i2c/test.rp2040-ard.yaml | 38 +------- tests/components/ade7953_spi/common.yaml | 36 +++++++ .../ade7953_spi/test.esp32-ard.yaml | 42 ++------ .../ade7953_spi/test.esp32-c3-ard.yaml | 42 ++------ .../ade7953_spi/test.esp32-c3-idf.yaml | 42 ++------ .../ade7953_spi/test.esp32-idf.yaml | 42 ++------ .../ade7953_spi/test.esp8266-ard.yaml | 42 ++------ .../ade7953_spi/test.rp2040-ard.yaml | 42 ++------ tests/components/ads1115/common.yaml | 14 +++ tests/components/ads1115/test.esp32-ard.yaml | 17 +--- .../components/ads1115/test.esp32-c3-ard.yaml | 17 +--- .../components/ads1115/test.esp32-c3-idf.yaml | 17 +--- tests/components/ads1115/test.esp32-idf.yaml | 17 +--- .../components/ads1115/test.esp8266-ard.yaml | 17 +--- tests/components/ads1115/test.rp2040-ard.yaml | 17 +--- tests/components/ags10/common.yaml | 12 +++ tests/components/ags10/test.esp32-ard.yaml | 15 +-- tests/components/ags10/test.esp32-c3-ard.yaml | 15 +-- tests/components/ags10/test.esp32-c3-idf.yaml | 15 +-- tests/components/ags10/test.esp32-idf.yaml | 15 +-- tests/components/ags10/test.esp8266-ard.yaml | 15 +-- tests/components/aht10/common.yaml | 11 +++ tests/components/aht10/test.esp32-ard.yaml | 14 +-- tests/components/aht10/test.esp32-c3-ard.yaml | 14 +-- tests/components/aht10/test.esp32-c3-idf.yaml | 14 +-- tests/components/aht10/test.esp32-idf.yaml | 14 +-- tests/components/aht10/test.esp8266-ard.yaml | 14 +-- tests/components/aht10/test.rp2040-ard.yaml | 14 +-- tests/components/am2315c/common.yaml | 11 +++ tests/components/am2315c/test.esp32-ard.yaml | 14 +-- .../components/am2315c/test.esp32-c3-ard.yaml | 14 +-- .../components/am2315c/test.esp32-c3-idf.yaml | 14 +-- tests/components/am2315c/test.esp32-idf.yaml | 14 +-- .../components/am2315c/test.esp8266-ard.yaml | 14 +-- tests/components/am2315c/test.rp2040-ard.yaml | 14 +-- tests/components/am2320/common.yaml | 11 +++ tests/components/am2320/test.esp32-ard.yaml | 14 +-- .../components/am2320/test.esp32-c3-ard.yaml | 14 +-- .../components/am2320/test.esp32-c3-idf.yaml | 14 +-- tests/components/am2320/test.esp32-idf.yaml | 14 +-- tests/components/am2320/test.esp8266-ard.yaml | 14 +-- tests/components/am2320/test.rp2040-ard.yaml | 14 +-- tests/components/apds9960/common.yaml | 48 ++++++++++ tests/components/apds9960/test.esp32-ard.yaml | 51 +--------- .../apds9960/test.esp32-c3-ard.yaml | 51 +--------- .../apds9960/test.esp32-c3-idf.yaml | 51 +--------- tests/components/apds9960/test.esp32-idf.yaml | 51 +--------- .../components/apds9960/test.esp8266-ard.yaml | 51 +--------- .../components/apds9960/test.rp2040-ard.yaml | 51 +--------- tests/components/as3935_i2c/common.yaml | 18 ++++ .../components/as3935_i2c/test.esp32-ard.yaml | 22 +---- .../as3935_i2c/test.esp32-c3-ard.yaml | 22 +---- .../as3935_i2c/test.esp32-c3-idf.yaml | 22 +---- .../components/as3935_i2c/test.esp32-idf.yaml | 22 +---- .../as3935_i2c/test.esp8266-ard.yaml | 22 +---- .../as3935_i2c/test.rp2040-ard.yaml | 22 +---- tests/components/as3935_spi/common.yaml | 20 ++++ .../components/as3935_spi/test.esp32-ard.yaml | 26 ++--- .../as3935_spi/test.esp32-c3-ard.yaml | 26 ++--- .../as3935_spi/test.esp32-c3-idf.yaml | 26 ++--- .../components/as3935_spi/test.esp32-idf.yaml | 26 ++--- .../as3935_spi/test.esp8266-ard.yaml | 26 ++--- .../as3935_spi/test.rp2040-ard.yaml | 26 ++--- tests/components/as5600/common.yaml | 27 ++++++ tests/components/as5600/test.esp32-ard.yaml | 31 +----- .../components/as5600/test.esp32-c3-ard.yaml | 31 +----- .../components/as5600/test.esp32-c3-idf.yaml | 31 +----- tests/components/as5600/test.esp32-idf.yaml | 31 +----- tests/components/as5600/test.esp8266-ard.yaml | 31 +----- tests/components/as5600/test.rp2040-ard.yaml | 31 +----- tests/components/as7341/common.yaml | 31 ++++++ tests/components/as7341/test.esp32-ard.yaml | 34 +------ .../components/as7341/test.esp32-c3-ard.yaml | 34 +------ .../components/as7341/test.esp32-c3-idf.yaml | 34 +------ tests/components/as7341/test.esp32-idf.yaml | 34 +------ tests/components/as7341/test.esp8266-ard.yaml | 34 +------ tests/components/as7341/test.rp2040-ard.yaml | 34 +------ tests/components/at581x/common.yaml | 28 ++++++ tests/components/at581x/test.esp32-ard.yaml | 41 +------- .../components/at581x/test.esp32-c3-ard.yaml | 41 +------- .../components/at581x/test.esp32-c3-idf.yaml | 41 +------- tests/components/at581x/test.esp32-idf.yaml | 41 +------- tests/components/at581x/test.esp8266-ard.yaml | 41 +------- tests/components/at581x/test.rp2040-ard.yaml | 41 +------- tests/components/atm90e26/common.yaml | 26 +++++ tests/components/atm90e26/test.esp32-ard.yaml | 31 ++---- .../atm90e26/test.esp32-c3-ard.yaml | 31 ++---- .../atm90e26/test.esp32-c3-idf.yaml | 31 ++---- tests/components/atm90e26/test.esp32-idf.yaml | 31 ++---- .../components/atm90e26/test.esp8266-ard.yaml | 31 ++---- .../components/atm90e26/test.rp2040-ard.yaml | 31 ++---- tests/components/atm90e32/common.yaml | 61 ++++++++++++ tests/components/atm90e32/test.esp32-ard.yaml | 65 ++----------- .../atm90e32/test.esp32-c3-ard.yaml | 65 ++----------- .../atm90e32/test.esp32-c3-idf.yaml | 65 ++----------- tests/components/atm90e32/test.esp32-idf.yaml | 65 ++----------- .../components/atm90e32/test.esp8266-ard.yaml | 96 ++----------------- .../components/atm90e32/test.rp2040-ard.yaml | 65 ++----------- 142 files changed, 1003 insertions(+), 2598 deletions(-) create mode 100644 tests/components/a02yyuw/common.yaml create mode 100644 tests/components/a4988/common.yaml create mode 100644 tests/components/ac_dimmer/common.yaml create mode 100644 tests/components/adc128s102/common.yaml rename tests/components/addressable_light/{test.esp32-c3-ard.yaml => common-ard-esp32_rmt_led_strip.yaml} (98%) rename tests/components/addressable_light/{test.esp32-ard.yaml => common-ard-fastled.yaml} (98%) rename tests/components/addressable_light/{test.esp32-c3-idf.yaml => common-idf-esp32_rmt_led_strip.yaml} (98%) create mode 100644 tests/components/addressable_light/esp32_rmt_led_strip.esp32-ard.yaml create mode 100644 tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-ard.yaml create mode 100644 tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-idf.yaml create mode 100644 tests/components/addressable_light/esp32_rmt_led_strip.esp32-idf.yaml create mode 100644 tests/components/addressable_light/fastled_clockless.esp32-ard.yaml delete mode 100644 tests/components/addressable_light/test.esp32-idf.yaml create mode 100644 tests/components/ade7953_i2c/common.yaml create mode 100644 tests/components/ade7953_spi/common.yaml create mode 100644 tests/components/ads1115/common.yaml create mode 100644 tests/components/ags10/common.yaml create mode 100644 tests/components/aht10/common.yaml create mode 100644 tests/components/am2315c/common.yaml create mode 100644 tests/components/am2320/common.yaml create mode 100644 tests/components/apds9960/common.yaml create mode 100644 tests/components/as3935_i2c/common.yaml create mode 100644 tests/components/as3935_spi/common.yaml create mode 100644 tests/components/as5600/common.yaml create mode 100644 tests/components/as7341/common.yaml create mode 100644 tests/components/at581x/common.yaml create mode 100644 tests/components/atm90e26/common.yaml create mode 100644 tests/components/atm90e32/common.yaml diff --git a/tests/components/a02yyuw/common.yaml b/tests/components/a02yyuw/common.yaml new file mode 100644 index 0000000000..b2e5927ff4 --- /dev/null +++ b/tests/components/a02yyuw/common.yaml @@ -0,0 +1,11 @@ +uart: + - id: uart_a02yyuw + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: a02yyuw + id: a02yyuw_sensor + name: a02yyuw Distance + uart_id: uart_a02yyuw diff --git a/tests/components/a02yyuw/test.esp32-ard.yaml b/tests/components/a02yyuw/test.esp32-ard.yaml index 98d6a266b3..f486544afa 100644 --- a/tests/components/a02yyuw/test.esp32-ard.yaml +++ b/tests/components/a02yyuw/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a02yyuw/test.esp32-c3-ard.yaml b/tests/components/a02yyuw/test.esp32-c3-ard.yaml index 76e1ad8ee1..b516342f3b 100644 --- a/tests/components/a02yyuw/test.esp32-c3-ard.yaml +++ b/tests/components/a02yyuw/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a02yyuw/test.esp32-c3-idf.yaml b/tests/components/a02yyuw/test.esp32-c3-idf.yaml index 76e1ad8ee1..b516342f3b 100644 --- a/tests/components/a02yyuw/test.esp32-c3-idf.yaml +++ b/tests/components/a02yyuw/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a02yyuw/test.esp32-idf.yaml b/tests/components/a02yyuw/test.esp32-idf.yaml index 98d6a266b3..f486544afa 100644 --- a/tests/components/a02yyuw/test.esp32-idf.yaml +++ b/tests/components/a02yyuw/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a02yyuw/test.esp8266-ard.yaml b/tests/components/a02yyuw/test.esp8266-ard.yaml index 76e1ad8ee1..b516342f3b 100644 --- a/tests/components/a02yyuw/test.esp8266-ard.yaml +++ b/tests/components/a02yyuw/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a02yyuw/test.rp2040-ard.yaml b/tests/components/a02yyuw/test.rp2040-ard.yaml index 76e1ad8ee1..b516342f3b 100644 --- a/tests/components/a02yyuw/test.rp2040-ard.yaml +++ b/tests/components/a02yyuw/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a02yyuw - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a02yyuw - id: a02yyuw_sensor - name: a02yyuw Distance - uart_id: uart_a02yyuw +<<: !include common.yaml diff --git a/tests/components/a4988/common.yaml b/tests/components/a4988/common.yaml new file mode 100644 index 0000000000..b85f2f41c6 --- /dev/null +++ b/tests/components/a4988/common.yaml @@ -0,0 +1,9 @@ +stepper: + - platform: a4988 + id: a4988_stepper + step_pin: ${step_pin} + dir_pin: ${dir_pin} + sleep_pin: ${sleep_pin} + max_speed: 250 steps/s + acceleration: 100 steps/s^2 + deceleration: 200 steps/s^2 diff --git a/tests/components/a4988/test.esp32-ard.yaml b/tests/components/a4988/test.esp32-ard.yaml index 0ca5e3f504..1ca8c0c084 100644 --- a/tests/components/a4988/test.esp32-ard.yaml +++ b/tests/components/a4988/test.esp32-ard.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 22 - dir_pin: - number: 23 - sleep_pin: - number: 25 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO22 + dir_pin: GPIO23 + sleep_pin: GPIO25 + +<<: !include common.yaml diff --git a/tests/components/a4988/test.esp32-c3-ard.yaml b/tests/components/a4988/test.esp32-c3-ard.yaml index af4e4fa32b..25caba75b5 100644 --- a/tests/components/a4988/test.esp32-c3-ard.yaml +++ b/tests/components/a4988/test.esp32-c3-ard.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 2 - dir_pin: - number: 3 - sleep_pin: - number: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO2 + dir_pin: GPIO3 + sleep_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/a4988/test.esp32-c3-idf.yaml b/tests/components/a4988/test.esp32-c3-idf.yaml index af4e4fa32b..25caba75b5 100644 --- a/tests/components/a4988/test.esp32-c3-idf.yaml +++ b/tests/components/a4988/test.esp32-c3-idf.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 2 - dir_pin: - number: 3 - sleep_pin: - number: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO2 + dir_pin: GPIO3 + sleep_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/a4988/test.esp32-idf.yaml b/tests/components/a4988/test.esp32-idf.yaml index 0ca5e3f504..1ca8c0c084 100644 --- a/tests/components/a4988/test.esp32-idf.yaml +++ b/tests/components/a4988/test.esp32-idf.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 22 - dir_pin: - number: 23 - sleep_pin: - number: 25 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO22 + dir_pin: GPIO23 + sleep_pin: GPIO25 + +<<: !include common.yaml diff --git a/tests/components/a4988/test.esp8266-ard.yaml b/tests/components/a4988/test.esp8266-ard.yaml index f4c1886fc5..22b5677d27 100644 --- a/tests/components/a4988/test.esp8266-ard.yaml +++ b/tests/components/a4988/test.esp8266-ard.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 1 - dir_pin: - number: 2 - sleep_pin: - number: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO1 + dir_pin: GPIO2 + sleep_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/a4988/test.rp2040-ard.yaml b/tests/components/a4988/test.rp2040-ard.yaml index af4e4fa32b..25caba75b5 100644 --- a/tests/components/a4988/test.rp2040-ard.yaml +++ b/tests/components/a4988/test.rp2040-ard.yaml @@ -1,12 +1,6 @@ -stepper: - - platform: a4988 - id: a4988_stepper - step_pin: - number: 2 - dir_pin: - number: 3 - sleep_pin: - number: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +substitutions: + step_pin: GPIO2 + dir_pin: GPIO3 + sleep_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/ac_dimmer/common.yaml b/tests/components/ac_dimmer/common.yaml new file mode 100644 index 0000000000..8f93066838 --- /dev/null +++ b/tests/components/ac_dimmer/common.yaml @@ -0,0 +1,5 @@ +output: + - platform: ac_dimmer + id: ac_dimmer_1 + gate_pin: ${gate_pin} + zero_cross_pin: ${zero_cross_pin} diff --git a/tests/components/ac_dimmer/test.esp32-ard.yaml b/tests/components/ac_dimmer/test.esp32-ard.yaml index cc17201666..3ec069f430 100644 --- a/tests/components/ac_dimmer/test.esp32-ard.yaml +++ b/tests/components/ac_dimmer/test.esp32-ard.yaml @@ -1,7 +1,5 @@ -output: - - platform: ac_dimmer - id: ac_dimmer_1 - gate_pin: - number: 12 - zero_cross_pin: - number: 13 +substitutions: + gate_pin: GPIO18 + zero_cross_pin: GPIO19 + +<<: !include common.yaml diff --git a/tests/components/ac_dimmer/test.esp32-c3-ard.yaml b/tests/components/ac_dimmer/test.esp32-c3-ard.yaml index f411d376be..5d2d42b713 100644 --- a/tests/components/ac_dimmer/test.esp32-c3-ard.yaml +++ b/tests/components/ac_dimmer/test.esp32-c3-ard.yaml @@ -1,7 +1,5 @@ -output: - - platform: ac_dimmer - id: ac_dimmer_1 - gate_pin: - number: 5 - zero_cross_pin: - number: 6 +substitutions: + gate_pin: GPIO5 + zero_cross_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ac_dimmer/test.esp8266-ard.yaml b/tests/components/ac_dimmer/test.esp8266-ard.yaml index af18d11c5f..5d2d42b713 100644 --- a/tests/components/ac_dimmer/test.esp8266-ard.yaml +++ b/tests/components/ac_dimmer/test.esp8266-ard.yaml @@ -1,7 +1,5 @@ -output: - - platform: ac_dimmer - id: ac_dimmer_1 - gate_pin: - number: 5 - zero_cross_pin: - number: 4 +substitutions: + gate_pin: GPIO5 + zero_cross_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ac_dimmer/test.rp2040-ard.yaml b/tests/components/ac_dimmer/test.rp2040-ard.yaml index f411d376be..5d2d42b713 100644 --- a/tests/components/ac_dimmer/test.rp2040-ard.yaml +++ b/tests/components/ac_dimmer/test.rp2040-ard.yaml @@ -1,7 +1,5 @@ -output: - - platform: ac_dimmer - id: ac_dimmer_1 - gate_pin: - number: 5 - zero_cross_pin: - number: 6 +substitutions: + gate_pin: GPIO5 + zero_cross_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/adc/test.esp32-c3-ard.yaml b/tests/components/adc/test.esp32-c3-ard.yaml index 18e5ab3561..e74477c582 100644 --- a/tests/components/adc/test.esp32-c3-ard.yaml +++ b/tests/components/adc/test.esp32-c3-ard.yaml @@ -2,4 +2,4 @@ sensor: - platform: adc id: my_sensor pin: 4 - attenuation: 11db + attenuation: 12db diff --git a/tests/components/adc/test.esp32-s2-ard.yaml b/tests/components/adc/test.esp32-s2-ard.yaml index 0119ad5e4d..e1a6bc22e5 100644 --- a/tests/components/adc/test.esp32-s2-ard.yaml +++ b/tests/components/adc/test.esp32-s2-ard.yaml @@ -2,4 +2,4 @@ sensor: - platform: adc id: my_sensor pin: 1 - attenuation: 11db + attenuation: 12db diff --git a/tests/components/adc/test.esp32-s3-ard.yaml b/tests/components/adc/test.esp32-s3-ard.yaml index 0119ad5e4d..e1a6bc22e5 100644 --- a/tests/components/adc/test.esp32-s3-ard.yaml +++ b/tests/components/adc/test.esp32-s3-ard.yaml @@ -2,4 +2,4 @@ sensor: - platform: adc id: my_sensor pin: 1 - attenuation: 11db + attenuation: 12db diff --git a/tests/components/adc128s102/common.yaml b/tests/components/adc128s102/common.yaml new file mode 100644 index 0000000000..5f1638a7e2 --- /dev/null +++ b/tests/components/adc128s102/common.yaml @@ -0,0 +1,14 @@ +spi: + - id: spi_adc128s102 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +adc128s102: + cs_pin: ${cs_pin} + id: adc128s102_adc + +sensor: + - platform: adc128s102 + id: adc128s102_channel_0 + channel: 0 diff --git a/tests/components/adc128s102/test.esp32-ard.yaml b/tests/components/adc128s102/test.esp32-ard.yaml index 005fbccc34..aba72f0614 100644 --- a/tests/components/adc128s102/test.esp32-ard.yaml +++ b/tests/components/adc128s102/test.esp32-ard.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO12 -adc128s102: - cs_pin: 12 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp32-c3-ard.yaml b/tests/components/adc128s102/test.esp32-c3-ard.yaml index 8edf745e58..24da4b5452 100644 --- a/tests/components/adc128s102/test.esp32-c3-ard.yaml +++ b/tests/components/adc128s102/test.esp32-c3-ard.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO2 -adc128s102: - cs_pin: 8 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp32-c3-idf.yaml b/tests/components/adc128s102/test.esp32-c3-idf.yaml index 8edf745e58..24da4b5452 100644 --- a/tests/components/adc128s102/test.esp32-c3-idf.yaml +++ b/tests/components/adc128s102/test.esp32-c3-idf.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO2 -adc128s102: - cs_pin: 8 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp32-idf.yaml b/tests/components/adc128s102/test.esp32-idf.yaml index 005fbccc34..aba72f0614 100644 --- a/tests/components/adc128s102/test.esp32-idf.yaml +++ b/tests/components/adc128s102/test.esp32-idf.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO12 -adc128s102: - cs_pin: 12 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp8266-ard.yaml b/tests/components/adc128s102/test.esp8266-ard.yaml index 09a51caec1..dbd158d030 100644 --- a/tests/components/adc128s102/test.esp8266-ard.yaml +++ b/tests/components/adc128s102/test.esp8266-ard.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO15 -adc128s102: - cs_pin: 15 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/adc128s102/test.rp2040-ard.yaml b/tests/components/adc128s102/test.rp2040-ard.yaml index a7d54cbfe6..f6c3f1eeca 100644 --- a/tests/components/adc128s102/test.rp2040-ard.yaml +++ b/tests/components/adc128s102/test.rp2040-ard.yaml @@ -1,14 +1,7 @@ -spi: - - id: spi_adc128s102 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 -adc128s102: - cs_pin: 5 - id: adc128s102_adc - -sensor: - - platform: adc128s102 - id: adc128s102_channel_0 - channel: 0 +<<: !include common.yaml diff --git a/tests/components/addressable_light/test.esp32-c3-ard.yaml b/tests/components/addressable_light/common-ard-esp32_rmt_led_strip.yaml similarity index 98% rename from tests/components/addressable_light/test.esp32-c3-ard.yaml rename to tests/components/addressable_light/common-ard-esp32_rmt_led_strip.yaml index f587113fac..9c5e63cdc6 100644 --- a/tests/components/addressable_light/test.esp32-c3-ard.yaml +++ b/tests/components/addressable_light/common-ard-esp32_rmt_led_strip.yaml @@ -5,7 +5,7 @@ light: chipset: ws2812 rgb_order: GRB num_leds: 256 - pin: 2 + pin: ${pin} rmt_channel: 0 display: diff --git a/tests/components/addressable_light/test.esp32-ard.yaml b/tests/components/addressable_light/common-ard-fastled.yaml similarity index 98% rename from tests/components/addressable_light/test.esp32-ard.yaml rename to tests/components/addressable_light/common-ard-fastled.yaml index f7717be610..77a5c5fe12 100644 --- a/tests/components/addressable_light/test.esp32-ard.yaml +++ b/tests/components/addressable_light/common-ard-fastled.yaml @@ -3,7 +3,7 @@ light: id: led_matrix_32x8 name: led_matrix_32x8 chipset: WS2812B - pin: 2 + pin: ${pin} num_leds: 256 rgb_order: GRB default_transition_length: 0s diff --git a/tests/components/addressable_light/test.esp32-c3-idf.yaml b/tests/components/addressable_light/common-idf-esp32_rmt_led_strip.yaml similarity index 98% rename from tests/components/addressable_light/test.esp32-c3-idf.yaml rename to tests/components/addressable_light/common-idf-esp32_rmt_led_strip.yaml index 7b3516345d..a071f9df91 100644 --- a/tests/components/addressable_light/test.esp32-c3-idf.yaml +++ b/tests/components/addressable_light/common-idf-esp32_rmt_led_strip.yaml @@ -5,7 +5,7 @@ light: chipset: ws2812 rgb_order: GRB num_leds: 256 - pin: 2 + pin: ${pin} display: - platform: addressable_light diff --git a/tests/components/addressable_light/esp32_rmt_led_strip.esp32-ard.yaml b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-ard.yaml new file mode 100644 index 0000000000..d93c554dae --- /dev/null +++ b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-ard.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO2 + +<<: !include common-ard-esp32_rmt_led_strip.yaml diff --git a/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-ard.yaml b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-ard.yaml new file mode 100644 index 0000000000..d93c554dae --- /dev/null +++ b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-ard.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO2 + +<<: !include common-ard-esp32_rmt_led_strip.yaml diff --git a/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-idf.yaml b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-idf.yaml new file mode 100644 index 0000000000..ca2c244d80 --- /dev/null +++ b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-c3-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO2 + +<<: !include common-idf-esp32_rmt_led_strip.yaml diff --git a/tests/components/addressable_light/esp32_rmt_led_strip.esp32-idf.yaml b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-idf.yaml new file mode 100644 index 0000000000..ca2c244d80 --- /dev/null +++ b/tests/components/addressable_light/esp32_rmt_led_strip.esp32-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO2 + +<<: !include common-idf-esp32_rmt_led_strip.yaml diff --git a/tests/components/addressable_light/fastled_clockless.esp32-ard.yaml b/tests/components/addressable_light/fastled_clockless.esp32-ard.yaml new file mode 100644 index 0000000000..78eb5d7fdb --- /dev/null +++ b/tests/components/addressable_light/fastled_clockless.esp32-ard.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO2 + +<<: !include common-ard-fastled.yaml diff --git a/tests/components/addressable_light/test.esp32-idf.yaml b/tests/components/addressable_light/test.esp32-idf.yaml deleted file mode 100644 index 7b3516345d..0000000000 --- a/tests/components/addressable_light/test.esp32-idf.yaml +++ /dev/null @@ -1,30 +0,0 @@ -light: - - platform: esp32_rmt_led_strip - id: led_matrix_32x8 - default_transition_length: 500ms - chipset: ws2812 - rgb_order: GRB - num_leds: 256 - pin: 2 - -display: - - platform: addressable_light - id: led_matrix_32x8_display - addressable_light_id: led_matrix_32x8 - width: 32 - height: 8 - pixel_mapper: |- - if (x % 2 == 0) { - return (x * 8) + y; - } - return (x * 8) + (7 - y); - lambda: |- - Color red = Color(0xFF0000); - Color green = Color(0x00FF00); - Color blue = Color(0x0000FF); - it.rectangle(0, 0, it.get_width(), it.get_height(), red); - it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green); - it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue); - it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red); - rotation: 0° - update_interval: 16ms diff --git a/tests/components/ade7953_i2c/common.yaml b/tests/components/ade7953_i2c/common.yaml new file mode 100644 index 0000000000..a2d163567d --- /dev/null +++ b/tests/components/ade7953_i2c/common.yaml @@ -0,0 +1,34 @@ +i2c: + - id: i2c_ade7953 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: ade7953_i2c + irq_pin: ${irq_pin} + voltage: + name: ADE7953 Voltage + id: ade7953_voltage + current_a: + name: ADE7953 Current A + id: ade7953_current_a + current_b: + name: ADE7953 Current B + id: ade7953_current_b + power_factor_a: + name: ADE7953 Power Factor A + power_factor_b: + name: ADE7953 Power Factor B + apparent_power_a: + name: ADE7953 Apparent Power A + apparent_power_b: + name: ADE7953 Apparent Power B + active_power_a: + name: ADE7953 Active Power A + active_power_b: + name: ADE7953 Active Power B + reactive_power_a: + name: ADE7953 Reactive Power A + reactive_power_b: + name: ADE7953 Reactive Power B + update_interval: 1s diff --git a/tests/components/ade7953_i2c/test.esp32-ard.yaml b/tests/components/ade7953_i2c/test.esp32-ard.yaml index 71602f20a3..2c57d412f6 100644 --- a/tests/components/ade7953_i2c/test.esp32-ard.yaml +++ b/tests/components/ade7953_i2c/test.esp32-ard.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO15 -sensor: - - platform: ade7953_i2c - irq_pin: 15 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp32-c3-ard.yaml b/tests/components/ade7953_i2c/test.esp32-c3-ard.yaml index d7b365a7e1..799acabd5a 100644 --- a/tests/components/ade7953_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/ade7953_i2c/test.esp32-c3-ard.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -sensor: - - platform: ade7953_i2c - irq_pin: 6 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml b/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml index d7b365a7e1..799acabd5a 100644 --- a/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -sensor: - - platform: ade7953_i2c - irq_pin: 6 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp32-idf.yaml b/tests/components/ade7953_i2c/test.esp32-idf.yaml index 71602f20a3..2c57d412f6 100644 --- a/tests/components/ade7953_i2c/test.esp32-idf.yaml +++ b/tests/components/ade7953_i2c/test.esp32-idf.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO15 -sensor: - - platform: ade7953_i2c - irq_pin: 15 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp8266-ard.yaml b/tests/components/ade7953_i2c/test.esp8266-ard.yaml index 6903cd1953..c8e6a43f44 100644 --- a/tests/components/ade7953_i2c/test.esp8266-ard.yaml +++ b/tests/components/ade7953_i2c/test.esp8266-ard.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO15 -sensor: - - platform: ade7953_i2c - irq_pin: 15 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.rp2040-ard.yaml b/tests/components/ade7953_i2c/test.rp2040-ard.yaml index d7b365a7e1..799acabd5a 100644 --- a/tests/components/ade7953_i2c/test.rp2040-ard.yaml +++ b/tests/components/ade7953_i2c/test.rp2040-ard.yaml @@ -1,34 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -sensor: - - platform: ade7953_i2c - irq_pin: 6 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/common.yaml b/tests/components/ade7953_spi/common.yaml new file mode 100644 index 0000000000..706f31f22c --- /dev/null +++ b/tests/components/ade7953_spi/common.yaml @@ -0,0 +1,36 @@ +spi: + - id: spi_ade7953 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +sensor: + - platform: ade7953_spi + cs_pin: ${cs_pin} + irq_pin: ${irq_pin} + voltage: + name: ADE7953 Voltage + id: ade7953_voltage + current_a: + name: ADE7953 Current A + id: ade7953_current_a + current_b: + name: ADE7953 Current B + id: ade7953_current_b + power_factor_a: + name: ADE7953 Power Factor A + power_factor_b: + name: ADE7953 Power Factor B + apparent_power_a: + name: ADE7953 Apparent Power A + apparent_power_b: + name: ADE7953 Apparent Power B + active_power_a: + name: ADE7953 Active Power A + active_power_b: + name: ADE7953 Active Power B + reactive_power_a: + name: ADE7953 Reactive Power A + reactive_power_b: + name: ADE7953 Reactive Power B + update_interval: 1s diff --git a/tests/components/ade7953_spi/test.esp32-ard.yaml b/tests/components/ade7953_spi/test.esp32-ard.yaml index e9ef7e4116..e00f522dd4 100644 --- a/tests/components/ade7953_spi/test.esp32-ard.yaml +++ b/tests/components/ade7953_spi/test.esp32-ard.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + irq_pin: GPIO13 + cs_pin: GPIO5 -sensor: - - platform: ade7953_spi - cs_pin: 5 - irq_pin: 13 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp32-c3-ard.yaml b/tests/components/ade7953_spi/test.esp32-c3-ard.yaml index a967f28d9c..fcf35f528e 100644 --- a/tests/components/ade7953_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ade7953_spi/test.esp32-c3-ard.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + irq_pin: GPIO9 + cs_pin: GPIO8 -sensor: - - platform: ade7953_spi - cs_pin: 8 - irq_pin: 9 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp32-c3-idf.yaml b/tests/components/ade7953_spi/test.esp32-c3-idf.yaml index a967f28d9c..fcf35f528e 100644 --- a/tests/components/ade7953_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ade7953_spi/test.esp32-c3-idf.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + irq_pin: GPIO9 + cs_pin: GPIO8 -sensor: - - platform: ade7953_spi - cs_pin: 8 - irq_pin: 9 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp32-idf.yaml b/tests/components/ade7953_spi/test.esp32-idf.yaml index e9ef7e4116..e00f522dd4 100644 --- a/tests/components/ade7953_spi/test.esp32-idf.yaml +++ b/tests/components/ade7953_spi/test.esp32-idf.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + irq_pin: GPIO13 + cs_pin: GPIO5 -sensor: - - platform: ade7953_spi - cs_pin: 5 - irq_pin: 13 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp8266-ard.yaml b/tests/components/ade7953_spi/test.esp8266-ard.yaml index b36b4445ab..b90e661ec0 100644 --- a/tests/components/ade7953_spi/test.esp8266-ard.yaml +++ b/tests/components/ade7953_spi/test.esp8266-ard.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + irq_pin: GPIO5 + cs_pin: GPIO15 -sensor: - - platform: ade7953_spi - cs_pin: 15 - irq_pin: 5 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.rp2040-ard.yaml b/tests/components/ade7953_spi/test.rp2040-ard.yaml index 319abd4613..8f5941e1b2 100644 --- a/tests/components/ade7953_spi/test.rp2040-ard.yaml +++ b/tests/components/ade7953_spi/test.rp2040-ard.yaml @@ -1,36 +1,8 @@ -spi: - - id: spi_ade7953 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + irq_pin: GPIO5 + cs_pin: GPIO6 -sensor: - - platform: ade7953_spi - cs_pin: 5 - irq_pin: 6 - voltage: - name: ADE7953 Voltage - id: ade7953_voltage - current_a: - name: ADE7953 Current A - id: ade7953_current_a - current_b: - name: ADE7953 Current B - id: ade7953_current_b - power_factor_a: - name: ADE7953 Power Factor A - power_factor_b: - name: ADE7953 Power Factor B - apparent_power_a: - name: ADE7953 Apparent Power A - apparent_power_b: - name: ADE7953 Apparent Power B - active_power_a: - name: ADE7953 Active Power A - active_power_b: - name: ADE7953 Active Power B - reactive_power_a: - name: ADE7953 Reactive Power A - reactive_power_b: - name: ADE7953 Reactive Power B - update_interval: 1s +<<: !include common.yaml diff --git a/tests/components/ads1115/common.yaml b/tests/components/ads1115/common.yaml new file mode 100644 index 0000000000..297877d2d8 --- /dev/null +++ b/tests/components/ads1115/common.yaml @@ -0,0 +1,14 @@ +i2c: + - id: i2c_ads1115 + scl: ${scl_pin} + sda: ${sda_pin} + +ads1115: + address: 0x48 + +sensor: + - platform: ads1115 + multiplexer: A0_A1 + gain: 1.024 + sample_rate: 128 + id: ads1115_sensor diff --git a/tests/components/ads1115/test.esp32-ard.yaml b/tests/components/ads1115/test.esp32-ard.yaml index 0fdaeff275..63c3bd6afd 100644 --- a/tests/components/ads1115/test.esp32-ard.yaml +++ b/tests/components/ads1115/test.esp32-ard.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ads1115/test.esp32-c3-ard.yaml b/tests/components/ads1115/test.esp32-c3-ard.yaml index 265d2cad2c..ee2c29ca4e 100644 --- a/tests/components/ads1115/test.esp32-c3-ard.yaml +++ b/tests/components/ads1115/test.esp32-c3-ard.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ads1115/test.esp32-c3-idf.yaml b/tests/components/ads1115/test.esp32-c3-idf.yaml index 265d2cad2c..ee2c29ca4e 100644 --- a/tests/components/ads1115/test.esp32-c3-idf.yaml +++ b/tests/components/ads1115/test.esp32-c3-idf.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ads1115/test.esp32-idf.yaml b/tests/components/ads1115/test.esp32-idf.yaml index 0fdaeff275..63c3bd6afd 100644 --- a/tests/components/ads1115/test.esp32-idf.yaml +++ b/tests/components/ads1115/test.esp32-idf.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ads1115/test.esp8266-ard.yaml b/tests/components/ads1115/test.esp8266-ard.yaml index 265d2cad2c..ee2c29ca4e 100644 --- a/tests/components/ads1115/test.esp8266-ard.yaml +++ b/tests/components/ads1115/test.esp8266-ard.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ads1115/test.rp2040-ard.yaml b/tests/components/ads1115/test.rp2040-ard.yaml index 265d2cad2c..ee2c29ca4e 100644 --- a/tests/components/ads1115/test.rp2040-ard.yaml +++ b/tests/components/ads1115/test.rp2040-ard.yaml @@ -1,14 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -ads1115: - address: 0x48 - -sensor: - - platform: ads1115 - multiplexer: A0_A1 - gain: 1.024 - sample_rate: 128 - id: ads1115_sensor +<<: !include common.yaml diff --git a/tests/components/ags10/common.yaml b/tests/components/ags10/common.yaml new file mode 100644 index 0000000000..0c4c3513cf --- /dev/null +++ b/tests/components/ags10/common.yaml @@ -0,0 +1,12 @@ +i2c: + - id: i2c_ags10 + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + +sensor: + - platform: ags10 + id: ags10_1 + tvoc: + name: AGS10 TVOC + update_interval: 60s diff --git a/tests/components/ags10/test.esp32-ard.yaml b/tests/components/ags10/test.esp32-ard.yaml index b3b53c0d31..63c3bd6afd 100644 --- a/tests/components/ags10/test.esp32-ard.yaml +++ b/tests/components/ags10/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_ags10 - scl: 16 - sda: 17 - frequency: 10kHz +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ags10 - id: ags10_1 - tvoc: - name: AGS10 TVOC - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ags10/test.esp32-c3-ard.yaml b/tests/components/ags10/test.esp32-c3-ard.yaml index e338fc78e0..ee2c29ca4e 100644 --- a/tests/components/ags10/test.esp32-c3-ard.yaml +++ b/tests/components/ags10/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_ags10 - scl: 5 - sda: 4 - frequency: 10kHz +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ags10 - id: ags10_1 - tvoc: - name: AGS10 TVOC - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ags10/test.esp32-c3-idf.yaml b/tests/components/ags10/test.esp32-c3-idf.yaml index e338fc78e0..ee2c29ca4e 100644 --- a/tests/components/ags10/test.esp32-c3-idf.yaml +++ b/tests/components/ags10/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_ags10 - scl: 5 - sda: 4 - frequency: 10kHz +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ags10 - id: ags10_1 - tvoc: - name: AGS10 TVOC - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ags10/test.esp32-idf.yaml b/tests/components/ags10/test.esp32-idf.yaml index b3b53c0d31..63c3bd6afd 100644 --- a/tests/components/ags10/test.esp32-idf.yaml +++ b/tests/components/ags10/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_ags10 - scl: 16 - sda: 17 - frequency: 10kHz +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: ags10 - id: ags10_1 - tvoc: - name: AGS10 TVOC - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/ags10/test.esp8266-ard.yaml b/tests/components/ags10/test.esp8266-ard.yaml index e338fc78e0..ee2c29ca4e 100644 --- a/tests/components/ags10/test.esp8266-ard.yaml +++ b/tests/components/ags10/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_ags10 - scl: 5 - sda: 4 - frequency: 10kHz +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: ags10 - id: ags10_1 - tvoc: - name: AGS10 TVOC - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/aht10/common.yaml b/tests/components/aht10/common.yaml new file mode 100644 index 0000000000..721af09bb4 --- /dev/null +++ b/tests/components/aht10/common.yaml @@ -0,0 +1,11 @@ +i2c: + - id: i2c_aht10 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: aht10 + temperature: + name: Temperature + humidity: + name: Humidity diff --git a/tests/components/aht10/test.esp32-ard.yaml b/tests/components/aht10/test.esp32-ard.yaml index 499e69e5d3..63c3bd6afd 100644 --- a/tests/components/aht10/test.esp32-ard.yaml +++ b/tests/components/aht10/test.esp32-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/aht10/test.esp32-c3-ard.yaml b/tests/components/aht10/test.esp32-c3-ard.yaml index 2e5f505476..ee2c29ca4e 100644 --- a/tests/components/aht10/test.esp32-c3-ard.yaml +++ b/tests/components/aht10/test.esp32-c3-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/aht10/test.esp32-c3-idf.yaml b/tests/components/aht10/test.esp32-c3-idf.yaml index 2e5f505476..ee2c29ca4e 100644 --- a/tests/components/aht10/test.esp32-c3-idf.yaml +++ b/tests/components/aht10/test.esp32-c3-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/aht10/test.esp32-idf.yaml b/tests/components/aht10/test.esp32-idf.yaml index 499e69e5d3..63c3bd6afd 100644 --- a/tests/components/aht10/test.esp32-idf.yaml +++ b/tests/components/aht10/test.esp32-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/aht10/test.esp8266-ard.yaml b/tests/components/aht10/test.esp8266-ard.yaml index 2e5f505476..ee2c29ca4e 100644 --- a/tests/components/aht10/test.esp8266-ard.yaml +++ b/tests/components/aht10/test.esp8266-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/aht10/test.rp2040-ard.yaml b/tests/components/aht10/test.rp2040-ard.yaml index 2e5f505476..ee2c29ca4e 100644 --- a/tests/components/aht10/test.rp2040-ard.yaml +++ b/tests/components/aht10/test.rp2040-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_aht10 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: aht10 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/common.yaml b/tests/components/am2315c/common.yaml new file mode 100644 index 0000000000..ab4656c17d --- /dev/null +++ b/tests/components/am2315c/common.yaml @@ -0,0 +1,11 @@ +i2c: + - id: i2c_am2315c + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: am2315c + temperature: + name: Temperature + humidity: + name: Humidity diff --git a/tests/components/am2315c/test.esp32-ard.yaml b/tests/components/am2315c/test.esp32-ard.yaml index ed6b65f787..63c3bd6afd 100644 --- a/tests/components/am2315c/test.esp32-ard.yaml +++ b/tests/components/am2315c/test.esp32-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/test.esp32-c3-ard.yaml b/tests/components/am2315c/test.esp32-c3-ard.yaml index d09bffb7a4..ee2c29ca4e 100644 --- a/tests/components/am2315c/test.esp32-c3-ard.yaml +++ b/tests/components/am2315c/test.esp32-c3-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/test.esp32-c3-idf.yaml b/tests/components/am2315c/test.esp32-c3-idf.yaml index d09bffb7a4..ee2c29ca4e 100644 --- a/tests/components/am2315c/test.esp32-c3-idf.yaml +++ b/tests/components/am2315c/test.esp32-c3-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/test.esp32-idf.yaml b/tests/components/am2315c/test.esp32-idf.yaml index ed6b65f787..63c3bd6afd 100644 --- a/tests/components/am2315c/test.esp32-idf.yaml +++ b/tests/components/am2315c/test.esp32-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/test.esp8266-ard.yaml b/tests/components/am2315c/test.esp8266-ard.yaml index d09bffb7a4..ee2c29ca4e 100644 --- a/tests/components/am2315c/test.esp8266-ard.yaml +++ b/tests/components/am2315c/test.esp8266-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2315c/test.rp2040-ard.yaml b/tests/components/am2315c/test.rp2040-ard.yaml index d09bffb7a4..ee2c29ca4e 100644 --- a/tests/components/am2315c/test.rp2040-ard.yaml +++ b/tests/components/am2315c/test.rp2040-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_am2315c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2315c - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/common.yaml b/tests/components/am2320/common.yaml new file mode 100644 index 0000000000..c0982b8818 --- /dev/null +++ b/tests/components/am2320/common.yaml @@ -0,0 +1,11 @@ +i2c: + - id: i2c_am2320 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: am2320 + temperature: + name: Temperature + humidity: + name: Humidity diff --git a/tests/components/am2320/test.esp32-ard.yaml b/tests/components/am2320/test.esp32-ard.yaml index 99f4173b85..63c3bd6afd 100644 --- a/tests/components/am2320/test.esp32-ard.yaml +++ b/tests/components/am2320/test.esp32-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/test.esp32-c3-ard.yaml b/tests/components/am2320/test.esp32-c3-ard.yaml index 6acfe8d4fd..ee2c29ca4e 100644 --- a/tests/components/am2320/test.esp32-c3-ard.yaml +++ b/tests/components/am2320/test.esp32-c3-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/test.esp32-c3-idf.yaml b/tests/components/am2320/test.esp32-c3-idf.yaml index 6acfe8d4fd..ee2c29ca4e 100644 --- a/tests/components/am2320/test.esp32-c3-idf.yaml +++ b/tests/components/am2320/test.esp32-c3-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/test.esp32-idf.yaml b/tests/components/am2320/test.esp32-idf.yaml index 99f4173b85..63c3bd6afd 100644 --- a/tests/components/am2320/test.esp32-idf.yaml +++ b/tests/components/am2320/test.esp32-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/test.esp8266-ard.yaml b/tests/components/am2320/test.esp8266-ard.yaml index 6acfe8d4fd..ee2c29ca4e 100644 --- a/tests/components/am2320/test.esp8266-ard.yaml +++ b/tests/components/am2320/test.esp8266-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/am2320/test.rp2040-ard.yaml b/tests/components/am2320/test.rp2040-ard.yaml index 6acfe8d4fd..ee2c29ca4e 100644 --- a/tests/components/am2320/test.rp2040-ard.yaml +++ b/tests/components/am2320/test.rp2040-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: am2320 - temperature: - name: Temperature - humidity: - name: Humidity +<<: !include common.yaml diff --git a/tests/components/apds9960/common.yaml b/tests/components/apds9960/common.yaml new file mode 100644 index 0000000000..de7706648a --- /dev/null +++ b/tests/components/apds9960/common.yaml @@ -0,0 +1,48 @@ +i2c: + - id: i2c_apds9960 + scl: ${scl_pin} + sda: ${sda_pin} + +apds9960: + address: 0x20 + update_interval: 60s + +binary_sensor: + - platform: apds9960 + id: apds9960_binary_sensor + direction: up + name: APDS9960 Up + device_class: motion + filters: + - invert + - delayed_on: 20ms + - delayed_off: 20ms + - lambda: "return false;" + on_state: + - logger.log: New state + - platform: apds9960 + direction: down + name: APDS9960 Down + - platform: apds9960 + direction: left + name: APDS9960 Left + - platform: apds9960 + direction: right + name: APDS9960 Right + +sensor: + - platform: apds9960 + type: proximity + name: APDS9960 Proximity + - platform: apds9960 + type: clear + name: APDS9960 Clear + - platform: apds9960 + type: red + name: APDS9960 Red + - platform: apds9960 + type: green + name: APDS9960 Green + - platform: apds9960 + type: blue + name: APDS9960 Blue diff --git a/tests/components/apds9960/test.esp32-ard.yaml b/tests/components/apds9960/test.esp32-ard.yaml index 7ff70a4d47..63c3bd6afd 100644 --- a/tests/components/apds9960/test.esp32-ard.yaml +++ b/tests/components/apds9960/test.esp32-ard.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/apds9960/test.esp32-c3-ard.yaml b/tests/components/apds9960/test.esp32-c3-ard.yaml index f6b6f7bac0..ee2c29ca4e 100644 --- a/tests/components/apds9960/test.esp32-c3-ard.yaml +++ b/tests/components/apds9960/test.esp32-c3-ard.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/apds9960/test.esp32-c3-idf.yaml b/tests/components/apds9960/test.esp32-c3-idf.yaml index f6b6f7bac0..ee2c29ca4e 100644 --- a/tests/components/apds9960/test.esp32-c3-idf.yaml +++ b/tests/components/apds9960/test.esp32-c3-idf.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/apds9960/test.esp32-idf.yaml b/tests/components/apds9960/test.esp32-idf.yaml index 7ff70a4d47..63c3bd6afd 100644 --- a/tests/components/apds9960/test.esp32-idf.yaml +++ b/tests/components/apds9960/test.esp32-idf.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/apds9960/test.esp8266-ard.yaml b/tests/components/apds9960/test.esp8266-ard.yaml index f6b6f7bac0..ee2c29ca4e 100644 --- a/tests/components/apds9960/test.esp8266-ard.yaml +++ b/tests/components/apds9960/test.esp8266-ard.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/apds9960/test.rp2040-ard.yaml b/tests/components/apds9960/test.rp2040-ard.yaml index f6b6f7bac0..ee2c29ca4e 100644 --- a/tests/components/apds9960/test.rp2040-ard.yaml +++ b/tests/components/apds9960/test.rp2040-ard.yaml @@ -1,48 +1,5 @@ -i2c: - - id: i2c_bme280 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -apds9960: - address: 0x20 - update_interval: 60s - -binary_sensor: - - platform: apds9960 - id: apds9960_binary_sensor - direction: up - name: APDS9960 Up - device_class: motion - filters: - - invert - - delayed_on: 20ms - - delayed_off: 20ms - - lambda: "return false;" - on_state: - - logger.log: New state - - platform: apds9960 - direction: down - name: APDS9960 Down - - platform: apds9960 - direction: left - name: APDS9960 Left - - platform: apds9960 - direction: right - name: APDS9960 Right - -sensor: - - platform: apds9960 - type: proximity - name: APDS9960 Proximity - - platform: apds9960 - type: clear - name: APDS9960 Clear - - platform: apds9960 - type: red - name: APDS9960 Red - - platform: apds9960 - type: green - name: APDS9960 Green - - platform: apds9960 - type: blue - name: APDS9960 Blue +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/common.yaml b/tests/components/as3935_i2c/common.yaml new file mode 100644 index 0000000000..d76cc37fc1 --- /dev/null +++ b/tests/components/as3935_i2c/common.yaml @@ -0,0 +1,18 @@ +i2c: + - id: i2c_as3935 + scl: ${scl_pin} + sda: ${sda_pin} + +as3935_i2c: + irq_pin: ${irq_pin} + +binary_sensor: + - platform: as3935 + name: Storm Alert + +sensor: + - platform: as3935 + lightning_energy: + name: Lightning Energy + distance: + name: Distance Storm diff --git a/tests/components/as3935_i2c/test.esp32-ard.yaml b/tests/components/as3935_i2c/test.esp32-ard.yaml index fad703bee5..2c57d412f6 100644 --- a/tests/components/as3935_i2c/test.esp32-ard.yaml +++ b/tests/components/as3935_i2c/test.esp32-ard.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO15 -as3935_i2c: - irq_pin: 12 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp32-c3-ard.yaml b/tests/components/as3935_i2c/test.esp32-c3-ard.yaml index c72556dbac..799acabd5a 100644 --- a/tests/components/as3935_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/as3935_i2c/test.esp32-c3-ard.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -as3935_i2c: - irq_pin: 6 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp32-c3-idf.yaml b/tests/components/as3935_i2c/test.esp32-c3-idf.yaml index c72556dbac..799acabd5a 100644 --- a/tests/components/as3935_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/as3935_i2c/test.esp32-c3-idf.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -as3935_i2c: - irq_pin: 6 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp32-idf.yaml b/tests/components/as3935_i2c/test.esp32-idf.yaml index fad703bee5..2c57d412f6 100644 --- a/tests/components/as3935_i2c/test.esp32-idf.yaml +++ b/tests/components/as3935_i2c/test.esp32-idf.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO15 -as3935_i2c: - irq_pin: 12 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp8266-ard.yaml b/tests/components/as3935_i2c/test.esp8266-ard.yaml index adba9e440f..c8e6a43f44 100644 --- a/tests/components/as3935_i2c/test.esp8266-ard.yaml +++ b/tests/components/as3935_i2c/test.esp8266-ard.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO15 -as3935_i2c: - irq_pin: 15 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.rp2040-ard.yaml b/tests/components/as3935_i2c/test.rp2040-ard.yaml index c72556dbac..799acabd5a 100644 --- a/tests/components/as3935_i2c/test.rp2040-ard.yaml +++ b/tests/components/as3935_i2c/test.rp2040-ard.yaml @@ -1,18 +1,6 @@ -i2c: - - id: i2c_as3935 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 -as3935_i2c: - irq_pin: 6 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/common.yaml b/tests/components/as3935_spi/common.yaml new file mode 100644 index 0000000000..c3fb93dff1 --- /dev/null +++ b/tests/components/as3935_spi/common.yaml @@ -0,0 +1,20 @@ +spi: + - id: spi_as3935 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +as3935_spi: + cs_pin: ${cs_pin} + irq_pin: ${irq_pin} + +binary_sensor: + - platform: as3935 + name: Storm Alert + +sensor: + - platform: as3935 + lightning_energy: + name: Lightning Energy + distance: + name: Distance Storm diff --git a/tests/components/as3935_spi/test.esp32-ard.yaml b/tests/components/as3935_spi/test.esp32-ard.yaml index 813a39cb23..e00f522dd4 100644 --- a/tests/components/as3935_spi/test.esp32-ard.yaml +++ b/tests/components/as3935_spi/test.esp32-ard.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + irq_pin: GPIO13 + cs_pin: GPIO5 -as3935_spi: - cs_pin: 12 - irq_pin: 13 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp32-c3-ard.yaml b/tests/components/as3935_spi/test.esp32-c3-ard.yaml index 7a4a01aeea..fcf35f528e 100644 --- a/tests/components/as3935_spi/test.esp32-c3-ard.yaml +++ b/tests/components/as3935_spi/test.esp32-c3-ard.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + irq_pin: GPIO9 + cs_pin: GPIO8 -as3935_spi: - cs_pin: 2 - irq_pin: 3 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp32-c3-idf.yaml b/tests/components/as3935_spi/test.esp32-c3-idf.yaml index 7a4a01aeea..fcf35f528e 100644 --- a/tests/components/as3935_spi/test.esp32-c3-idf.yaml +++ b/tests/components/as3935_spi/test.esp32-c3-idf.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + irq_pin: GPIO9 + cs_pin: GPIO8 -as3935_spi: - cs_pin: 2 - irq_pin: 3 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp32-idf.yaml b/tests/components/as3935_spi/test.esp32-idf.yaml index 813a39cb23..e00f522dd4 100644 --- a/tests/components/as3935_spi/test.esp32-idf.yaml +++ b/tests/components/as3935_spi/test.esp32-idf.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + irq_pin: GPIO13 + cs_pin: GPIO5 -as3935_spi: - cs_pin: 12 - irq_pin: 13 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp8266-ard.yaml b/tests/components/as3935_spi/test.esp8266-ard.yaml index 38a40b0833..b90e661ec0 100644 --- a/tests/components/as3935_spi/test.esp8266-ard.yaml +++ b/tests/components/as3935_spi/test.esp8266-ard.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + irq_pin: GPIO5 + cs_pin: GPIO15 -as3935_spi: - cs_pin: 15 - irq_pin: 16 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as3935_spi/test.rp2040-ard.yaml b/tests/components/as3935_spi/test.rp2040-ard.yaml index 528759d97d..8f5941e1b2 100644 --- a/tests/components/as3935_spi/test.rp2040-ard.yaml +++ b/tests/components/as3935_spi/test.rp2040-ard.yaml @@ -1,20 +1,8 @@ -spi: - - id: spi_as3935 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + irq_pin: GPIO5 + cs_pin: GPIO6 -as3935_spi: - cs_pin: 6 - irq_pin: 7 - -binary_sensor: - - platform: as3935 - name: Storm Alert - -sensor: - - platform: as3935 - lightning_energy: - name: Lightning Energy - distance: - name: Distance Storm +<<: !include common.yaml diff --git a/tests/components/as5600/common.yaml b/tests/components/as5600/common.yaml new file mode 100644 index 0000000000..860f5bf803 --- /dev/null +++ b/tests/components/as5600/common.yaml @@ -0,0 +1,27 @@ +i2c: + - id: i2c_as5600 + scl: ${scl_pin} + sda: ${sda_pin} + +as5600: + dir_pin: ${dir_pin} + direction: clockwise + start_position: 90deg + range: 180deg + watchdog: true + power_mode: low1 + hysteresis: lsb1 + slow_filter: 8x + fast_filter: lsb6 + +sensor: + - platform: as5600 + name: AS5600 Position + raw_position: + name: AS5600 Raw Position + gain: + name: AS5600 Gain + magnitude: + name: AS5600 Magnitude + status: + name: AS5600 Status diff --git a/tests/components/as5600/test.esp32-ard.yaml b/tests/components/as5600/test.esp32-ard.yaml index 312ee9ad04..fa08763501 100644 --- a/tests/components/as5600/test.esp32-ard.yaml +++ b/tests/components/as5600/test.esp32-ard.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + dir_pin: GPIO15 -as5600: - dir_pin: 12 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as5600/test.esp32-c3-ard.yaml b/tests/components/as5600/test.esp32-c3-ard.yaml index e074fa5e0c..a0623c91e5 100644 --- a/tests/components/as5600/test.esp32-c3-ard.yaml +++ b/tests/components/as5600/test.esp32-c3-ard.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + dir_pin: GPIO6 -as5600: - dir_pin: 6 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as5600/test.esp32-c3-idf.yaml b/tests/components/as5600/test.esp32-c3-idf.yaml index e074fa5e0c..a0623c91e5 100644 --- a/tests/components/as5600/test.esp32-c3-idf.yaml +++ b/tests/components/as5600/test.esp32-c3-idf.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + dir_pin: GPIO6 -as5600: - dir_pin: 6 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as5600/test.esp32-idf.yaml b/tests/components/as5600/test.esp32-idf.yaml index 312ee9ad04..fa08763501 100644 --- a/tests/components/as5600/test.esp32-idf.yaml +++ b/tests/components/as5600/test.esp32-idf.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + dir_pin: GPIO15 -as5600: - dir_pin: 12 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as5600/test.esp8266-ard.yaml b/tests/components/as5600/test.esp8266-ard.yaml index a232d27305..5e27f8c134 100644 --- a/tests/components/as5600/test.esp8266-ard.yaml +++ b/tests/components/as5600/test.esp8266-ard.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + dir_pin: GPIO15 -as5600: - dir_pin: 15 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as5600/test.rp2040-ard.yaml b/tests/components/as5600/test.rp2040-ard.yaml index e074fa5e0c..a0623c91e5 100644 --- a/tests/components/as5600/test.rp2040-ard.yaml +++ b/tests/components/as5600/test.rp2040-ard.yaml @@ -1,27 +1,6 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + dir_pin: GPIO6 -as5600: - dir_pin: 6 - direction: clockwise - start_position: 90deg - range: 180deg - watchdog: true - power_mode: low1 - hysteresis: lsb1 - slow_filter: 8x - fast_filter: lsb6 - -sensor: - - platform: as5600 - name: AS5600 Position - raw_position: - name: AS5600 Raw Position - gain: - name: AS5600 Gain - magnitude: - name: AS5600 Magnitude - status: - name: AS5600 Status +<<: !include common.yaml diff --git a/tests/components/as7341/common.yaml b/tests/components/as7341/common.yaml new file mode 100644 index 0000000000..0351b344c6 --- /dev/null +++ b/tests/components/as7341/common.yaml @@ -0,0 +1,31 @@ +i2c: + - id: i2c_as7341 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: as7341 + update_interval: 15s + gain: X8 + atime: 120 + astep: 99 + f1: + name: F1 + f2: + name: F2 + f3: + name: F3 + f4: + name: F4 + f5: + name: F5 + f6: + name: F6 + f7: + name: F7 + f8: + name: F8 + clear: + name: Clear + nir: + name: NIR diff --git a/tests/components/as7341/test.esp32-ard.yaml b/tests/components/as7341/test.esp32-ard.yaml index d582a367ac..63c3bd6afd 100644 --- a/tests/components/as7341/test.esp32-ard.yaml +++ b/tests/components/as7341/test.esp32-ard.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/as7341/test.esp32-c3-ard.yaml b/tests/components/as7341/test.esp32-c3-ard.yaml index 19965d1715..ee2c29ca4e 100644 --- a/tests/components/as7341/test.esp32-c3-ard.yaml +++ b/tests/components/as7341/test.esp32-c3-ard.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/as7341/test.esp32-c3-idf.yaml b/tests/components/as7341/test.esp32-c3-idf.yaml index 19965d1715..ee2c29ca4e 100644 --- a/tests/components/as7341/test.esp32-c3-idf.yaml +++ b/tests/components/as7341/test.esp32-c3-idf.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/as7341/test.esp32-idf.yaml b/tests/components/as7341/test.esp32-idf.yaml index d582a367ac..63c3bd6afd 100644 --- a/tests/components/as7341/test.esp32-idf.yaml +++ b/tests/components/as7341/test.esp32-idf.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/as7341/test.esp8266-ard.yaml b/tests/components/as7341/test.esp8266-ard.yaml index 19965d1715..ee2c29ca4e 100644 --- a/tests/components/as7341/test.esp8266-ard.yaml +++ b/tests/components/as7341/test.esp8266-ard.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/as7341/test.rp2040-ard.yaml b/tests/components/as7341/test.rp2040-ard.yaml index 19965d1715..ee2c29ca4e 100644 --- a/tests/components/as7341/test.rp2040-ard.yaml +++ b/tests/components/as7341/test.rp2040-ard.yaml @@ -1,31 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: as7341 - update_interval: 15s - gain: X8 - atime: 120 - astep: 99 - f1: - name: F1 - f2: - name: F2 - f3: - name: F3 - f4: - name: F4 - f5: - name: F5 - f6: - name: F6 - f7: - name: F7 - f8: - name: F8 - clear: - name: Clear - nir: - name: NIR +<<: !include common.yaml diff --git a/tests/components/at581x/common.yaml b/tests/components/at581x/common.yaml new file mode 100644 index 0000000000..018a0fded1 --- /dev/null +++ b/tests/components/at581x/common.yaml @@ -0,0 +1,28 @@ +esphome: + on_boot: + then: + - at581x.settings: + id: waveradar + hw_frontend_reset: false + frequency: 5800MHz + sensing_distance: 200 + poweron_selfcheck_time: 2s + protect_time: 1s + trigger_base: 500ms + trigger_keep: 10s + stage_gain: 3 + power_consumption: 70uA + - at581x.reset: + id: waveradar + +at581x: + id: waveradar + +i2c: + - id: i2c_at581x + scl: ${scl_pin} + sda: ${sda_pin} + +switch: + - platform: at581x + name: Enable Radar diff --git a/tests/components/at581x/test.esp32-ard.yaml b/tests/components/at581x/test.esp32-ard.yaml index ff84e61e1e..63c3bd6afd 100644 --- a/tests/components/at581x/test.esp32-ard.yaml +++ b/tests/components/at581x/test.esp32-ard.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 14 - scl: 15 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO21 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/at581x/test.esp32-c3-ard.yaml b/tests/components/at581x/test.esp32-c3-ard.yaml index b49a283eca..ee2c29ca4e 100644 --- a/tests/components/at581x/test.esp32-c3-ard.yaml +++ b/tests/components/at581x/test.esp32-c3-ard.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 8 - scl: 9 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO21 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/at581x/test.esp32-c3-idf.yaml b/tests/components/at581x/test.esp32-c3-idf.yaml index b49a283eca..ee2c29ca4e 100644 --- a/tests/components/at581x/test.esp32-c3-idf.yaml +++ b/tests/components/at581x/test.esp32-c3-idf.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 8 - scl: 9 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO21 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/at581x/test.esp32-idf.yaml b/tests/components/at581x/test.esp32-idf.yaml index ff84e61e1e..63c3bd6afd 100644 --- a/tests/components/at581x/test.esp32-idf.yaml +++ b/tests/components/at581x/test.esp32-idf.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 14 - scl: 15 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO21 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/at581x/test.esp8266-ard.yaml b/tests/components/at581x/test.esp8266-ard.yaml index a7b0069045..ee2c29ca4e 100644 --- a/tests/components/at581x/test.esp8266-ard.yaml +++ b/tests/components/at581x/test.esp8266-ard.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 14 - scl: 15 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO4 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/at581x/test.rp2040-ard.yaml b/tests/components/at581x/test.rp2040-ard.yaml index b49a283eca..ee2c29ca4e 100644 --- a/tests/components/at581x/test.rp2040-ard.yaml +++ b/tests/components/at581x/test.rp2040-ard.yaml @@ -1,38 +1,5 @@ -esphome: - on_boot: - then: - - at581x.settings: - id: "Waveradar" - hw_frontend_reset: false - frequency: 5800MHz - sensing_distance: 200 - poweron_selfcheck_time: 2s - protect_time: 1s - trigger_base: 500ms - trigger_keep: 10s - stage_gain: 3 - power_consumption: 70uA - - at581x.reset: - id: "Waveradar" +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -at581x: - id: "Waveradar" - i2c_id: i2c_bus - -i2c: - sda: 8 - scl: 9 - scan: true - frequency: 100kHz - setup_priority: -100 - id: i2c_bus - -binary_sensor: - - platform: gpio - pin: GPIO21 - name: "Radar motion" - -switch: - - platform: at581x - at581x_id: "Waveradar" - name: "Enable Radar" +<<: !include common.yaml diff --git a/tests/components/atm90e26/common.yaml b/tests/components/atm90e26/common.yaml new file mode 100644 index 0000000000..49c3a73ec8 --- /dev/null +++ b/tests/components/atm90e26/common.yaml @@ -0,0 +1,26 @@ +spi: + - id: spi_atm90e26 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +sensor: + - platform: atm90e26 + cs_pin: ${cs_pin} + voltage: + name: Line Voltage + current: + name: CT Amps + power: + name: Active Watts + power_factor: + name: Power Factor + frequency: + name: Line Frequency + line_frequency: 50Hz + meter_constant: 1000 + pl_const: 1429876 + gain_pga: 1X + gain_metering: 7481 + gain_voltage: 26400 + gain_ct: 31251 diff --git a/tests/components/atm90e26/test.esp32-ard.yaml b/tests/components/atm90e26/test.esp32-ard.yaml index 72fb3e5b24..54e027a614 100644 --- a/tests/components/atm90e26/test.esp32-ard.yaml +++ b/tests/components/atm90e26/test.esp32-ard.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO5 -sensor: - - platform: atm90e26 - cs_pin: 13 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp32-c3-ard.yaml b/tests/components/atm90e26/test.esp32-c3-ard.yaml index ce123bcf72..2415ba5dc6 100644 --- a/tests/components/atm90e26/test.esp32-c3-ard.yaml +++ b/tests/components/atm90e26/test.esp32-c3-ard.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -sensor: - - platform: atm90e26 - cs_pin: 8 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp32-c3-idf.yaml b/tests/components/atm90e26/test.esp32-c3-idf.yaml index ce123bcf72..2415ba5dc6 100644 --- a/tests/components/atm90e26/test.esp32-c3-idf.yaml +++ b/tests/components/atm90e26/test.esp32-c3-idf.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -sensor: - - platform: atm90e26 - cs_pin: 8 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp32-idf.yaml b/tests/components/atm90e26/test.esp32-idf.yaml index 72fb3e5b24..54e027a614 100644 --- a/tests/components/atm90e26/test.esp32-idf.yaml +++ b/tests/components/atm90e26/test.esp32-idf.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO5 -sensor: - - platform: atm90e26 - cs_pin: 13 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp8266-ard.yaml b/tests/components/atm90e26/test.esp8266-ard.yaml index 68d63cc278..dbd158d030 100644 --- a/tests/components/atm90e26/test.esp8266-ard.yaml +++ b/tests/components/atm90e26/test.esp8266-ard.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO15 -sensor: - - platform: atm90e26 - cs_pin: 5 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e26/test.rp2040-ard.yaml b/tests/components/atm90e26/test.rp2040-ard.yaml index f43277dbb1..c8bfab0023 100644 --- a/tests/components/atm90e26/test.rp2040-ard.yaml +++ b/tests/components/atm90e26/test.rp2040-ard.yaml @@ -1,26 +1,7 @@ -spi: - - id: spi_atm90e26 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO6 -sensor: - - platform: atm90e26 - cs_pin: 5 - voltage: - name: Line Voltage - current: - name: CT Amps - power: - name: Active Watts - power_factor: - name: Power Factor - frequency: - name: Line Frequency - line_frequency: 50Hz - meter_constant: 1000 - pl_const: 1429876 - gain_pga: 1X - gain_metering: 7481 - gain_voltage: 26400 - gain_ct: 31251 +<<: !include common.yaml diff --git a/tests/components/atm90e32/common.yaml b/tests/components/atm90e32/common.yaml new file mode 100644 index 0000000000..156d00b4e0 --- /dev/null +++ b/tests/components/atm90e32/common.yaml @@ -0,0 +1,61 @@ +spi: + - id: spi_atm90e32 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +sensor: + - platform: atm90e32 + cs_pin: ${cs_pin} + id: atm90e32_chip1 + phase_a: + voltage: + name: EMON Line Voltage A + current: + name: EMON CT1 Current + power: + name: EMON Active Power CT1 + reactive_power: + name: EMON Reactive Power CT1 + power_factor: + name: EMON Power Factor CT1 + gain_voltage: 7305 + gain_ct: 27961 + phase_b: + current: + name: EMON CT2 Current + power: + name: EMON Active Power CT2 + reactive_power: + name: EMON Reactive Power CT2 + power_factor: + name: EMON Power Factor CT2 + gain_voltage: 7305 + gain_ct: 27961 + phase_c: + current: + name: EMON CT3 Current + power: + name: EMON Active Power CT3 + reactive_power: + name: EMON Reactive Power CT3 + power_factor: + name: EMON Power Factor CT3 + gain_voltage: 7305 + gain_ct: 27961 + frequency: + name: EMON Line Frequency + chip_temperature: + name: EMON Chip Temp A + line_frequency: 60Hz + current_phases: 3 + gain_pga: 2X + enable_offset_calibration: True + +button: + - platform: atm90e32 + id: atm90e32_chip1 + run_offset_calibration: + name: Chip1 - Run Offset Calibration + clear_offset_calibration: + name: Chip1 - Clear Offset Calibration diff --git a/tests/components/atm90e32/test.esp32-ard.yaml b/tests/components/atm90e32/test.esp32-ard.yaml index 3bdc2bcec6..54e027a614 100644 --- a/tests/components/atm90e32/test.esp32-ard.yaml +++ b/tests/components/atm90e32/test.esp32-ard.yaml @@ -1,60 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO5 -sensor: - - platform: atm90e32 - cs_pin: 13 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp32-c3-ard.yaml b/tests/components/atm90e32/test.esp32-c3-ard.yaml index 9ec0037a61..2415ba5dc6 100644 --- a/tests/components/atm90e32/test.esp32-c3-ard.yaml +++ b/tests/components/atm90e32/test.esp32-c3-ard.yaml @@ -1,60 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -sensor: - - platform: atm90e32 - cs_pin: 8 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp32-c3-idf.yaml b/tests/components/atm90e32/test.esp32-c3-idf.yaml index 9ec0037a61..2415ba5dc6 100644 --- a/tests/components/atm90e32/test.esp32-c3-idf.yaml +++ b/tests/components/atm90e32/test.esp32-c3-idf.yaml @@ -1,60 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -sensor: - - platform: atm90e32 - cs_pin: 8 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp32-idf.yaml b/tests/components/atm90e32/test.esp32-idf.yaml index 3bdc2bcec6..54e027a614 100644 --- a/tests/components/atm90e32/test.esp32-idf.yaml +++ b/tests/components/atm90e32/test.esp32-idf.yaml @@ -1,60 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + cs_pin: GPIO5 -sensor: - - platform: atm90e32 - cs_pin: 13 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp8266-ard.yaml b/tests/components/atm90e32/test.esp8266-ard.yaml index fbb3368efa..dbd158d030 100644 --- a/tests/components/atm90e32/test.esp8266-ard.yaml +++ b/tests/components/atm90e32/test.esp8266-ard.yaml @@ -1,91 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO15 -sensor: - - platform: atm90e32 - cs_pin: 5 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True - - platform: atm90e32 - cs_pin: 4 - id: chip2 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - voltage: - name: EMON Line Voltage C - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - line_frequency: 60Hz - current_phases: 2 -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml diff --git a/tests/components/atm90e32/test.rp2040-ard.yaml b/tests/components/atm90e32/test.rp2040-ard.yaml index a6b7956da7..c8bfab0023 100644 --- a/tests/components/atm90e32/test.rp2040-ard.yaml +++ b/tests/components/atm90e32/test.rp2040-ard.yaml @@ -1,60 +1,7 @@ -spi: - - id: spi_atm90e32 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO6 -sensor: - - platform: atm90e32 - cs_pin: 5 - id: chip1 - phase_a: - voltage: - name: EMON Line Voltage A - current: - name: EMON CT1 Current - power: - name: EMON Active Power CT1 - reactive_power: - name: EMON Reactive Power CT1 - power_factor: - name: EMON Power Factor CT1 - gain_voltage: 7305 - gain_ct: 27961 - phase_b: - current: - name: EMON CT2 Current - power: - name: EMON Active Power CT2 - reactive_power: - name: EMON Reactive Power CT2 - power_factor: - name: EMON Power Factor CT2 - gain_voltage: 7305 - gain_ct: 27961 - phase_c: - current: - name: EMON CT3 Current - power: - name: EMON Active Power CT3 - reactive_power: - name: EMON Reactive Power CT3 - power_factor: - name: EMON Power Factor CT3 - gain_voltage: 7305 - gain_ct: 27961 - frequency: - name: EMON Line Frequency - chip_temperature: - name: EMON Chip Temp A - line_frequency: 60Hz - current_phases: 3 - gain_pga: 2X - enable_offset_calibration: True -button: - - platform: atm90e32 - id: chip1 - run_offset_calibration: - name: "Chip1 - Run Offset Calibration" - clear_offset_calibration: - name: "Chip1 - Clear Offset Calibration" +<<: !include common.yaml