diff --git a/tests/components/scd30/common.yaml b/tests/components/scd30/common.yaml new file mode 100644 index 0000000000..1c45c67af0 --- /dev/null +++ b/tests/components/scd30/common.yaml @@ -0,0 +1,20 @@ +i2c: + - id: i2c_scd30 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: scd30 + co2: + name: SCD30 CO2 + temperature: + id: scd30_temperature + name: SCD30 Temperature + humidity: + name: SCD30 Humidity + address: 0x61 + automatic_self_calibration: true + altitude_compensation: 10m + ambient_pressure_compensation: 961mBar + temperature_offset: 4.2C + update_interval: 15s diff --git a/tests/components/scd30/test.esp32-ard.yaml b/tests/components/scd30/test.esp32-ard.yaml index b48f8054c8..63c3bd6afd 100644 --- a/tests/components/scd30/test.esp32-ard.yaml +++ b/tests/components/scd30/test.esp32-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd30/test.esp32-c3-ard.yaml b/tests/components/scd30/test.esp32-c3-ard.yaml index 80f02a1b87..ee2c29ca4e 100644 --- a/tests/components/scd30/test.esp32-c3-ard.yaml +++ b/tests/components/scd30/test.esp32-c3-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd30/test.esp32-c3-idf.yaml b/tests/components/scd30/test.esp32-c3-idf.yaml index 80f02a1b87..ee2c29ca4e 100644 --- a/tests/components/scd30/test.esp32-c3-idf.yaml +++ b/tests/components/scd30/test.esp32-c3-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd30/test.esp32-idf.yaml b/tests/components/scd30/test.esp32-idf.yaml index b48f8054c8..63c3bd6afd 100644 --- a/tests/components/scd30/test.esp32-idf.yaml +++ b/tests/components/scd30/test.esp32-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd30/test.esp8266-ard.yaml b/tests/components/scd30/test.esp8266-ard.yaml index 80f02a1b87..ee2c29ca4e 100644 --- a/tests/components/scd30/test.esp8266-ard.yaml +++ b/tests/components/scd30/test.esp8266-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd30/test.rp2040-ard.yaml b/tests/components/scd30/test.rp2040-ard.yaml index 80f02a1b87..ee2c29ca4e 100644 --- a/tests/components/scd30/test.rp2040-ard.yaml +++ b/tests/components/scd30/test.rp2040-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd30 - co2: - name: SCD30 CO2 - temperature: - id: scd30_temperature - name: SCD30 Temperature - humidity: - name: SCD30 Humidity - address: 0x61 - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/common.yaml b/tests/components/scd4x/common.yaml new file mode 100644 index 0000000000..dfd35e57de --- /dev/null +++ b/tests/components/scd4x/common.yaml @@ -0,0 +1,20 @@ +i2c: + - id: i2c_scd4x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: scd4x + id: scd40 + co2: + name: SCD4X CO2 + temperature: + id: scd4x_temperature + name: SCD4X Temperature + humidity: + name: SCD4X Humidity + automatic_self_calibration: true + altitude_compensation: 10m + ambient_pressure_compensation: 961mBar + temperature_offset: 4.2C + update_interval: 15s diff --git a/tests/components/scd4x/test.esp32-ard.yaml b/tests/components/scd4x/test.esp32-ard.yaml index 02cec921d2..63c3bd6afd 100644 --- a/tests/components/scd4x/test.esp32-ard.yaml +++ b/tests/components/scd4x/test.esp32-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/test.esp32-c3-ard.yaml b/tests/components/scd4x/test.esp32-c3-ard.yaml index 353293be65..ee2c29ca4e 100644 --- a/tests/components/scd4x/test.esp32-c3-ard.yaml +++ b/tests/components/scd4x/test.esp32-c3-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/test.esp32-c3-idf.yaml b/tests/components/scd4x/test.esp32-c3-idf.yaml index 353293be65..ee2c29ca4e 100644 --- a/tests/components/scd4x/test.esp32-c3-idf.yaml +++ b/tests/components/scd4x/test.esp32-c3-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/test.esp32-idf.yaml b/tests/components/scd4x/test.esp32-idf.yaml index 02cec921d2..63c3bd6afd 100644 --- a/tests/components/scd4x/test.esp32-idf.yaml +++ b/tests/components/scd4x/test.esp32-idf.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/test.esp8266-ard.yaml b/tests/components/scd4x/test.esp8266-ard.yaml index 353293be65..ee2c29ca4e 100644 --- a/tests/components/scd4x/test.esp8266-ard.yaml +++ b/tests/components/scd4x/test.esp8266-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/scd4x/test.rp2040-ard.yaml b/tests/components/scd4x/test.rp2040-ard.yaml index 353293be65..ee2c29ca4e 100644 --- a/tests/components/scd4x/test.rp2040-ard.yaml +++ b/tests/components/scd4x/test.rp2040-ard.yaml @@ -1,20 +1,5 @@ -i2c: - - id: i2c_scd4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: scd4x - id: scd40 - co2: - name: SCD4X CO2 - temperature: - id: scd4x_temperature - name: SCD4X Temperature - humidity: - name: SCD4X Humidity - automatic_self_calibration: true - altitude_compensation: 10m - ambient_pressure_compensation: 961mBar - temperature_offset: 4.2C - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sdm_meter/common.yaml b/tests/components/sdm_meter/common.yaml new file mode 100644 index 0000000000..60c71a796b --- /dev/null +++ b/tests/components/sdm_meter/common.yaml @@ -0,0 +1,23 @@ +uart: + - id: uart_sdm_meter + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: sdm_meter + phase_a: + current: + name: Phase A Current + voltage: + name: Phase A Voltage + active_power: + name: Phase A Power + power_factor: + name: Phase A Power Factor + apparent_power: + name: Phase A Apparent Power + reactive_power: + name: Phase A Reactive Power + phase_angle: + name: Phase A Phase Angle diff --git a/tests/components/sdm_meter/test.esp32-ard.yaml b/tests/components/sdm_meter/test.esp32-ard.yaml index eb3958db19..f486544afa 100644 --- a/tests/components/sdm_meter/test.esp32-ard.yaml +++ b/tests/components/sdm_meter/test.esp32-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp32-c3-ard.yaml b/tests/components/sdm_meter/test.esp32-c3-ard.yaml index 0c2144f983..b516342f3b 100644 --- a/tests/components/sdm_meter/test.esp32-c3-ard.yaml +++ b/tests/components/sdm_meter/test.esp32-c3-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp32-c3-idf.yaml b/tests/components/sdm_meter/test.esp32-c3-idf.yaml index 0c2144f983..b516342f3b 100644 --- a/tests/components/sdm_meter/test.esp32-c3-idf.yaml +++ b/tests/components/sdm_meter/test.esp32-c3-idf.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp32-idf.yaml b/tests/components/sdm_meter/test.esp32-idf.yaml index eb3958db19..f486544afa 100644 --- a/tests/components/sdm_meter/test.esp32-idf.yaml +++ b/tests/components/sdm_meter/test.esp32-idf.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp8266-ard.yaml b/tests/components/sdm_meter/test.esp8266-ard.yaml index 0c2144f983..b516342f3b 100644 --- a/tests/components/sdm_meter/test.esp8266-ard.yaml +++ b/tests/components/sdm_meter/test.esp8266-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdm_meter/test.rp2040-ard.yaml b/tests/components/sdm_meter/test.rp2040-ard.yaml index 0c2144f983..b516342f3b 100644 --- a/tests/components/sdm_meter/test.rp2040-ard.yaml +++ b/tests/components/sdm_meter/test.rp2040-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sdm_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sdm_meter - phase_a: - current: - name: Phase A Current - voltage: - name: Phase A Voltage - active_power: - name: Phase A Power - power_factor: - name: Phase A Power Factor - apparent_power: - name: Phase A Apparent Power - reactive_power: - name: Phase A Reactive Power - phase_angle: - name: Phase A Phase Angle +<<: !include common.yaml diff --git a/tests/components/sdp3x/common.yaml b/tests/components/sdp3x/common.yaml new file mode 100644 index 0000000000..d3c5491ca5 --- /dev/null +++ b/tests/components/sdp3x/common.yaml @@ -0,0 +1,11 @@ +i2c: + - id: i2c_sdp3x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sdp3x + id: filter_pressure + name: HVAC Filter Pressure drop + accuracy_decimals: 3 + update_interval: 5s diff --git a/tests/components/sdp3x/test.esp32-ard.yaml b/tests/components/sdp3x/test.esp32-ard.yaml index 00666082eb..63c3bd6afd 100644 --- a/tests/components/sdp3x/test.esp32-ard.yaml +++ b/tests/components/sdp3x/test.esp32-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp32-c3-ard.yaml b/tests/components/sdp3x/test.esp32-c3-ard.yaml index 42b90f1b81..ee2c29ca4e 100644 --- a/tests/components/sdp3x/test.esp32-c3-ard.yaml +++ b/tests/components/sdp3x/test.esp32-c3-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp32-c3-idf.yaml b/tests/components/sdp3x/test.esp32-c3-idf.yaml index 42b90f1b81..ee2c29ca4e 100644 --- a/tests/components/sdp3x/test.esp32-c3-idf.yaml +++ b/tests/components/sdp3x/test.esp32-c3-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp32-idf.yaml b/tests/components/sdp3x/test.esp32-idf.yaml index 00666082eb..63c3bd6afd 100644 --- a/tests/components/sdp3x/test.esp32-idf.yaml +++ b/tests/components/sdp3x/test.esp32-idf.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp8266-ard.yaml b/tests/components/sdp3x/test.esp8266-ard.yaml index 42b90f1b81..ee2c29ca4e 100644 --- a/tests/components/sdp3x/test.esp8266-ard.yaml +++ b/tests/components/sdp3x/test.esp8266-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sdp3x/test.rp2040-ard.yaml b/tests/components/sdp3x/test.rp2040-ard.yaml index 42b90f1b81..ee2c29ca4e 100644 --- a/tests/components/sdp3x/test.rp2040-ard.yaml +++ b/tests/components/sdp3x/test.rp2040-ard.yaml @@ -1,11 +1,5 @@ -i2c: - - id: i2c_sdp3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sdp3x - id: filter_pressure - name: HVAC Filter Pressure drop - accuracy_decimals: 3 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sds011/common.yaml b/tests/components/sds011/common.yaml new file mode 100644 index 0000000000..c7574e1d7d --- /dev/null +++ b/tests/components/sds011/common.yaml @@ -0,0 +1,14 @@ +uart: + - id: uart_sdm_sds011 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 + +sensor: + - platform: sds011 + pm_2_5: + name: SDS011 PM2.5 + pm_10_0: + name: SDS011 PM10.0 + rx_only: false + update_interval: 5min diff --git a/tests/components/sds011/test.esp32-ard.yaml b/tests/components/sds011/test.esp32-ard.yaml index 275390f14c..f486544afa 100644 --- a/tests/components/sds011/test.esp32-ard.yaml +++ b/tests/components/sds011/test.esp32-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/sds011/test.esp32-c3-ard.yaml b/tests/components/sds011/test.esp32-c3-ard.yaml index e680a62dfe..b516342f3b 100644 --- a/tests/components/sds011/test.esp32-c3-ard.yaml +++ b/tests/components/sds011/test.esp32-c3-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/sds011/test.esp32-c3-idf.yaml b/tests/components/sds011/test.esp32-c3-idf.yaml index e680a62dfe..b516342f3b 100644 --- a/tests/components/sds011/test.esp32-c3-idf.yaml +++ b/tests/components/sds011/test.esp32-c3-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/sds011/test.esp32-idf.yaml b/tests/components/sds011/test.esp32-idf.yaml index 275390f14c..f486544afa 100644 --- a/tests/components/sds011/test.esp32-idf.yaml +++ b/tests/components/sds011/test.esp32-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/sds011/test.esp8266-ard.yaml b/tests/components/sds011/test.esp8266-ard.yaml index e680a62dfe..b516342f3b 100644 --- a/tests/components/sds011/test.esp8266-ard.yaml +++ b/tests/components/sds011/test.esp8266-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/sds011/test.rp2040-ard.yaml b/tests/components/sds011/test.rp2040-ard.yaml index e680a62dfe..b516342f3b 100644 --- a/tests/components/sds011/test.rp2040-ard.yaml +++ b/tests/components/sds011/test.rp2040-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sds011 - pm_2_5: - name: SDS011 PM2.5 - pm_10_0: - name: SDS011 PM10.0 - rx_only: false - update_interval: 5min +<<: !include common.yaml diff --git a/tests/components/selec_meter/common.yaml b/tests/components/selec_meter/common.yaml new file mode 100644 index 0000000000..f2714ce828 --- /dev/null +++ b/tests/components/selec_meter/common.yaml @@ -0,0 +1,45 @@ +uart: + - id: uart_selec_meter + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: selec_meter + total_active_energy: + name: SelecEM2M Total Active Energy + import_active_energy: + name: SelecEM2M Import Active Energy + export_active_energy: + name: SelecEM2M Export Active Energy + total_reactive_energy: + name: SelecEM2M Total Reactive Energy + import_reactive_energy: + name: SelecEM2M Import Reactive Energy + export_reactive_energy: + name: SelecEM2M Export Reactive Energy + apparent_energy: + name: SelecEM2M Apparent Energy + active_power: + name: SelecEM2M Active Power + reactive_power: + name: SelecEM2M Reactive Power + apparent_power: + name: SelecEM2M Apparent Power + voltage: + name: SelecEM2M Voltage + current: + name: SelecEM2M Current + power_factor: + name: SelecEM2M Power Factor + frequency: + name: SelecEM2M Frequency + maximum_demand_active_power: + name: SelecEM2M Maximum Demand Active Power + disabled_by_default: true + maximum_demand_reactive_power: + name: SelecEM2M Maximum Demand Reactive Power + disabled_by_default: true + maximum_demand_apparent_power: + name: SelecEM2M Maximum Demand Apparent Power + disabled_by_default: true diff --git a/tests/components/selec_meter/test.esp32-ard.yaml b/tests/components/selec_meter/test.esp32-ard.yaml index 648adc1757..f486544afa 100644 --- a/tests/components/selec_meter/test.esp32-ard.yaml +++ b/tests/components/selec_meter/test.esp32-ard.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp32-c3-ard.yaml b/tests/components/selec_meter/test.esp32-c3-ard.yaml index 5f6e69f96f..b516342f3b 100644 --- a/tests/components/selec_meter/test.esp32-c3-ard.yaml +++ b/tests/components/selec_meter/test.esp32-c3-ard.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp32-c3-idf.yaml b/tests/components/selec_meter/test.esp32-c3-idf.yaml index 5f6e69f96f..b516342f3b 100644 --- a/tests/components/selec_meter/test.esp32-c3-idf.yaml +++ b/tests/components/selec_meter/test.esp32-c3-idf.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp32-idf.yaml b/tests/components/selec_meter/test.esp32-idf.yaml index 648adc1757..f486544afa 100644 --- a/tests/components/selec_meter/test.esp32-idf.yaml +++ b/tests/components/selec_meter/test.esp32-idf.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp8266-ard.yaml b/tests/components/selec_meter/test.esp8266-ard.yaml index 5f6e69f96f..b516342f3b 100644 --- a/tests/components/selec_meter/test.esp8266-ard.yaml +++ b/tests/components/selec_meter/test.esp8266-ard.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/selec_meter/test.rp2040-ard.yaml b/tests/components/selec_meter/test.rp2040-ard.yaml index 5f6e69f96f..b516342f3b 100644 --- a/tests/components/selec_meter/test.rp2040-ard.yaml +++ b/tests/components/selec_meter/test.rp2040-ard.yaml @@ -1,45 +1,5 @@ -uart: - - id: uart_selec_meter - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: selec_meter - total_active_energy: - name: SelecEM2M Total Active Energy - import_active_energy: - name: SelecEM2M Import Active Energy - export_active_energy: - name: SelecEM2M Export Active Energy - total_reactive_energy: - name: SelecEM2M Total Reactive Energy - import_reactive_energy: - name: SelecEM2M Import Reactive Energy - export_reactive_energy: - name: SelecEM2M Export Reactive Energy - apparent_energy: - name: SelecEM2M Apparent Energy - active_power: - name: SelecEM2M Active Power - reactive_power: - name: SelecEM2M Reactive Power - apparent_power: - name: SelecEM2M Apparent Power - voltage: - name: SelecEM2M Voltage - current: - name: SelecEM2M Current - power_factor: - name: SelecEM2M Power Factor - frequency: - name: SelecEM2M Frequency - maximum_demand_active_power: - name: SelecEM2M Maximum Demand Active Power - disabled_by_default: true - maximum_demand_reactive_power: - name: SelecEM2M Maximum Demand Reactive Power - disabled_by_default: true - maximum_demand_apparent_power: - name: SelecEM2M Maximum Demand Apparent Power - disabled_by_default: true +<<: !include common.yaml diff --git a/tests/components/sen0321/common.yaml b/tests/components/sen0321/common.yaml new file mode 100644 index 0000000000..8b9fdff4a1 --- /dev/null +++ b/tests/components/sen0321/common.yaml @@ -0,0 +1,10 @@ +i2c: + - id: i2c_sen0321 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sen0321 + name: Workshop Ozone Sensor + id: sen0321_ozone + update_interval: 10s diff --git a/tests/components/sen0321/test.esp32-ard.yaml b/tests/components/sen0321/test.esp32-ard.yaml index 44f76bf5e6..63c3bd6afd 100644 --- a/tests/components/sen0321/test.esp32-ard.yaml +++ b/tests/components/sen0321/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen0321/test.esp32-c3-ard.yaml b/tests/components/sen0321/test.esp32-c3-ard.yaml index 7fa461a7fa..ee2c29ca4e 100644 --- a/tests/components/sen0321/test.esp32-c3-ard.yaml +++ b/tests/components/sen0321/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen0321/test.esp32-c3-idf.yaml b/tests/components/sen0321/test.esp32-c3-idf.yaml index 7fa461a7fa..ee2c29ca4e 100644 --- a/tests/components/sen0321/test.esp32-c3-idf.yaml +++ b/tests/components/sen0321/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen0321/test.esp32-idf.yaml b/tests/components/sen0321/test.esp32-idf.yaml index 44f76bf5e6..63c3bd6afd 100644 --- a/tests/components/sen0321/test.esp32-idf.yaml +++ b/tests/components/sen0321/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen0321/test.esp8266-ard.yaml b/tests/components/sen0321/test.esp8266-ard.yaml index 7fa461a7fa..ee2c29ca4e 100644 --- a/tests/components/sen0321/test.esp8266-ard.yaml +++ b/tests/components/sen0321/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen0321/test.rp2040-ard.yaml b/tests/components/sen0321/test.rp2040-ard.yaml index 7fa461a7fa..ee2c29ca4e 100644 --- a/tests/components/sen0321/test.rp2040-ard.yaml +++ b/tests/components/sen0321/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sen0321 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen0321 - name: Workshop Ozone Sensor - id: sen0321_ozone - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sen21231/common.yaml b/tests/components/sen21231/common.yaml new file mode 100644 index 0000000000..6fa1d04aa2 --- /dev/null +++ b/tests/components/sen21231/common.yaml @@ -0,0 +1,9 @@ +i2c: + - id: i2c_sen21231 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sen21231 + id: sen21231_sensor1 + name: Person Sensor diff --git a/tests/components/sen21231/test.esp32-ard.yaml b/tests/components/sen21231/test.esp32-ard.yaml index 3173683f17..63c3bd6afd 100644 --- a/tests/components/sen21231/test.esp32-ard.yaml +++ b/tests/components/sen21231/test.esp32-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen21231/test.esp32-c3-ard.yaml b/tests/components/sen21231/test.esp32-c3-ard.yaml index efd7843f56..ee2c29ca4e 100644 --- a/tests/components/sen21231/test.esp32-c3-ard.yaml +++ b/tests/components/sen21231/test.esp32-c3-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen21231/test.esp32-c3-idf.yaml b/tests/components/sen21231/test.esp32-c3-idf.yaml index efd7843f56..ee2c29ca4e 100644 --- a/tests/components/sen21231/test.esp32-c3-idf.yaml +++ b/tests/components/sen21231/test.esp32-c3-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen21231/test.esp32-idf.yaml b/tests/components/sen21231/test.esp32-idf.yaml index 3173683f17..63c3bd6afd 100644 --- a/tests/components/sen21231/test.esp32-idf.yaml +++ b/tests/components/sen21231/test.esp32-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen21231/test.esp8266-ard.yaml b/tests/components/sen21231/test.esp8266-ard.yaml index efd7843f56..ee2c29ca4e 100644 --- a/tests/components/sen21231/test.esp8266-ard.yaml +++ b/tests/components/sen21231/test.esp8266-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen21231/test.rp2040-ard.yaml b/tests/components/sen21231/test.rp2040-ard.yaml index efd7843f56..ee2c29ca4e 100644 --- a/tests/components/sen21231/test.rp2040-ard.yaml +++ b/tests/components/sen21231/test.rp2040-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen21231 - id: sen21231_sensor1 - name: Person Sensor +<<: !include common.yaml diff --git a/tests/components/sen5x/common.yaml b/tests/components/sen5x/common.yaml new file mode 100644 index 0000000000..9adf268048 --- /dev/null +++ b/tests/components/sen5x/common.yaml @@ -0,0 +1,49 @@ +i2c: + - id: i2c_sen5x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sen5x + id: sen54 + temperature: + name: Temperature + accuracy_decimals: 1 + humidity: + name: Humidity + accuracy_decimals: 0 + pm_1_0: + name: PM <1µm Weight concentration + id: pm_1_0 + accuracy_decimals: 1 + pm_2_5: + name: PM <2.5µm Weight concentration + id: pm_2_5 + accuracy_decimals: 1 + pm_4_0: + name: PM <4µm Weight concentration + id: pm_4_0 + accuracy_decimals: 1 + pm_10_0: + name: PM <10µm Weight concentration + id: pm_10_0 + accuracy_decimals: 1 + nox: + name: NOx + voc: + name: VOC + algorithm_tuning: + index_offset: 100 + learning_time_offset_hours: 12 + learning_time_gain_hours: 12 + gating_max_duration_minutes: 180 + std_initial: 50 + gain_factor: 230 + temperature_compensation: + offset: 0 + normalized_offset_slope: 0 + time_constant: 0 + auto_cleaning_interval: 604800s + acceleration_mode: low + store_baseline: true + address: 0x69 diff --git a/tests/components/sen5x/test.esp32-ard.yaml b/tests/components/sen5x/test.esp32-ard.yaml index b8f89c435f..63c3bd6afd 100644 --- a/tests/components/sen5x/test.esp32-ard.yaml +++ b/tests/components/sen5x/test.esp32-ard.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/sen5x/test.esp32-c3-ard.yaml b/tests/components/sen5x/test.esp32-c3-ard.yaml index 3352a59b17..ee2c29ca4e 100644 --- a/tests/components/sen5x/test.esp32-c3-ard.yaml +++ b/tests/components/sen5x/test.esp32-c3-ard.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/sen5x/test.esp32-c3-idf.yaml b/tests/components/sen5x/test.esp32-c3-idf.yaml index 3352a59b17..ee2c29ca4e 100644 --- a/tests/components/sen5x/test.esp32-c3-idf.yaml +++ b/tests/components/sen5x/test.esp32-c3-idf.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/sen5x/test.esp32-idf.yaml b/tests/components/sen5x/test.esp32-idf.yaml index b8f89c435f..63c3bd6afd 100644 --- a/tests/components/sen5x/test.esp32-idf.yaml +++ b/tests/components/sen5x/test.esp32-idf.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/sen5x/test.esp8266-ard.yaml b/tests/components/sen5x/test.esp8266-ard.yaml index 3352a59b17..ee2c29ca4e 100644 --- a/tests/components/sen5x/test.esp8266-ard.yaml +++ b/tests/components/sen5x/test.esp8266-ard.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/sen5x/test.rp2040-ard.yaml b/tests/components/sen5x/test.rp2040-ard.yaml index 3352a59b17..ee2c29ca4e 100644 --- a/tests/components/sen5x/test.rp2040-ard.yaml +++ b/tests/components/sen5x/test.rp2040-ard.yaml @@ -1,49 +1,5 @@ -i2c: - - id: i2c_sen5x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sen5x - id: sen54 - temperature: - name: Temperature - accuracy_decimals: 1 - humidity: - name: Humidity - accuracy_decimals: 0 - pm_1_0: - name: PM <1µm Weight concentration - id: pm_1_0 - accuracy_decimals: 1 - pm_2_5: - name: PM <2.5µm Weight concentration - id: pm_2_5 - accuracy_decimals: 1 - pm_4_0: - name: PM <4µm Weight concentration - id: pm_4_0 - accuracy_decimals: 1 - pm_10_0: - name: PM <10µm Weight concentration - id: pm_10_0 - accuracy_decimals: 1 - nox: - name: NOx - voc: - name: VOC - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - temperature_compensation: - offset: 0 - normalized_offset_slope: 0 - time_constant: 0 - auto_cleaning_interval: 604800s - acceleration_mode: low - store_baseline: true - address: 0x69 +<<: !include common.yaml diff --git a/tests/components/senseair/common.yaml b/tests/components/senseair/common.yaml new file mode 100644 index 0000000000..23a933affe --- /dev/null +++ b/tests/components/senseair/common.yaml @@ -0,0 +1,19 @@ +uart: + - id: uart_senseair + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: senseair + id: senseair0 + co2: + name: SenseAir CO2 Value + on_value: + then: + - senseair.background_calibration: senseair0 + - senseair.background_calibration_result: senseair0 + - senseair.abc_get_period: senseair0 + - senseair.abc_enable: senseair0 + - senseair.abc_disable: senseair0 + update_interval: 15s diff --git a/tests/components/senseair/test.esp32-ard.yaml b/tests/components/senseair/test.esp32-ard.yaml index daa4645f59..f486544afa 100644 --- a/tests/components/senseair/test.esp32-ard.yaml +++ b/tests/components/senseair/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/senseair/test.esp32-c3-ard.yaml b/tests/components/senseair/test.esp32-c3-ard.yaml index 41a441f496..b516342f3b 100644 --- a/tests/components/senseair/test.esp32-c3-ard.yaml +++ b/tests/components/senseair/test.esp32-c3-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/senseair/test.esp32-c3-idf.yaml b/tests/components/senseair/test.esp32-c3-idf.yaml index 41a441f496..b516342f3b 100644 --- a/tests/components/senseair/test.esp32-c3-idf.yaml +++ b/tests/components/senseair/test.esp32-c3-idf.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/senseair/test.esp32-idf.yaml b/tests/components/senseair/test.esp32-idf.yaml index daa4645f59..f486544afa 100644 --- a/tests/components/senseair/test.esp32-idf.yaml +++ b/tests/components/senseair/test.esp32-idf.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/senseair/test.esp8266-ard.yaml b/tests/components/senseair/test.esp8266-ard.yaml index 41a441f496..b516342f3b 100644 --- a/tests/components/senseair/test.esp8266-ard.yaml +++ b/tests/components/senseair/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/senseair/test.rp2040-ard.yaml b/tests/components/senseair/test.rp2040-ard.yaml index 41a441f496..b516342f3b 100644 --- a/tests/components/senseair/test.rp2040-ard.yaml +++ b/tests/components/senseair/test.rp2040-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_senseair - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: senseair - id: senseair0 - co2: - name: SenseAir CO2 Value - on_value: - then: - - senseair.background_calibration: senseair0 - - senseair.background_calibration_result: senseair0 - - senseair.abc_get_period: senseair0 - - senseair.abc_enable: senseair0 - - senseair.abc_disable: senseair0 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/servo/common.yaml b/tests/components/servo/common.yaml new file mode 100644 index 0000000000..2cfa370c32 --- /dev/null +++ b/tests/components/servo/common.yaml @@ -0,0 +1,19 @@ +esphome: + on_boot: + then: + - servo.write: + id: test_servo + level: -100.0% + - servo.detach: test_servo + +output: + - platform: ${output_platform} + id: servo_output_1 + pin: ${pin} + +servo: + id: test_servo + output: servo_output_1 + restore: true + min_level: 4% + max_level: 8% diff --git a/tests/components/servo/test.esp32-ard.yaml b/tests/components/servo/test.esp32-ard.yaml index e769f055b4..26da1ce1d6 100644 --- a/tests/components/servo/test.esp32-ard.yaml +++ b/tests/components/servo/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: ledc + pin: GPIO14 -output: - - platform: ledc - id: servo_output_1 - pin: 12 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/servo/test.esp32-c3-ard.yaml b/tests/components/servo/test.esp32-c3-ard.yaml index 29ebea3359..7476963591 100644 --- a/tests/components/servo/test.esp32-c3-ard.yaml +++ b/tests/components/servo/test.esp32-c3-ard.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: ledc + pin: GPIO4 -output: - - platform: ledc - id: servo_output_1 - pin: 1 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/servo/test.esp32-c3-idf.yaml b/tests/components/servo/test.esp32-c3-idf.yaml index 29ebea3359..7476963591 100644 --- a/tests/components/servo/test.esp32-c3-idf.yaml +++ b/tests/components/servo/test.esp32-c3-idf.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: ledc + pin: GPIO4 -output: - - platform: ledc - id: servo_output_1 - pin: 1 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/servo/test.esp32-idf.yaml b/tests/components/servo/test.esp32-idf.yaml index e769f055b4..26da1ce1d6 100644 --- a/tests/components/servo/test.esp32-idf.yaml +++ b/tests/components/servo/test.esp32-idf.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: ledc + pin: GPIO14 -output: - - platform: ledc - id: servo_output_1 - pin: 12 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/servo/test.esp8266-ard.yaml b/tests/components/servo/test.esp8266-ard.yaml index 48b4421641..23a7f43b42 100644 --- a/tests/components/servo/test.esp8266-ard.yaml +++ b/tests/components/servo/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: esp8266_pwm + pin: GPIO14 -output: - - platform: esp8266_pwm - id: servo_output_1 - pin: 12 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/servo/test.rp2040-ard.yaml b/tests/components/servo/test.rp2040-ard.yaml index 75efa9407e..d70f7c74ec 100644 --- a/tests/components/servo/test.rp2040-ard.yaml +++ b/tests/components/servo/test.rp2040-ard.yaml @@ -1,19 +1,5 @@ -esphome: - on_boot: - then: - - servo.write: - id: test_servo - level: -100.0% - - servo.detach: test_servo +substitutions: + output_platform: rp2040_pwm + pin: GPIO4 -output: - - platform: rp2040_pwm - id: servo_output_1 - pin: 12 - -servo: - id: test_servo - output: servo_output_1 - restore: true - min_level: 4% - max_level: 8% +<<: !include common.yaml diff --git a/tests/components/sfa30/common.yaml b/tests/components/sfa30/common.yaml new file mode 100644 index 0000000000..e3b38aa7fb --- /dev/null +++ b/tests/components/sfa30/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_sfa30 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sfa30 + formaldehyde: + name: SFA30 formaldehyde + temperature: + name: SFA30 temperature + humidity: + name: SFA30 humidity + address: 0x5D + update_interval: 30s diff --git a/tests/components/sfa30/test.esp32-ard.yaml b/tests/components/sfa30/test.esp32-ard.yaml index dc7e4988e5..63c3bd6afd 100644 --- a/tests/components/sfa30/test.esp32-ard.yaml +++ b/tests/components/sfa30/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sfa30/test.esp32-c3-ard.yaml b/tests/components/sfa30/test.esp32-c3-ard.yaml index 119059e4e2..ee2c29ca4e 100644 --- a/tests/components/sfa30/test.esp32-c3-ard.yaml +++ b/tests/components/sfa30/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sfa30/test.esp32-c3-idf.yaml b/tests/components/sfa30/test.esp32-c3-idf.yaml index 119059e4e2..ee2c29ca4e 100644 --- a/tests/components/sfa30/test.esp32-c3-idf.yaml +++ b/tests/components/sfa30/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sfa30/test.esp32-idf.yaml b/tests/components/sfa30/test.esp32-idf.yaml index dc7e4988e5..63c3bd6afd 100644 --- a/tests/components/sfa30/test.esp32-idf.yaml +++ b/tests/components/sfa30/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sfa30/test.esp8266-ard.yaml b/tests/components/sfa30/test.esp8266-ard.yaml index 119059e4e2..ee2c29ca4e 100644 --- a/tests/components/sfa30/test.esp8266-ard.yaml +++ b/tests/components/sfa30/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sfa30/test.rp2040-ard.yaml b/tests/components/sfa30/test.rp2040-ard.yaml index 119059e4e2..ee2c29ca4e 100644 --- a/tests/components/sfa30/test.rp2040-ard.yaml +++ b/tests/components/sfa30/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sfa30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sfa30 - formaldehyde: - name: "SFA30 formaldehyde" - temperature: - name: "SFA30 temperature" - humidity: - name: "SFA30 humidity" - address: 0x5D - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/sgp30/common.yaml b/tests/components/sgp30/common.yaml new file mode 100644 index 0000000000..1db5bc67d1 --- /dev/null +++ b/tests/components/sgp30/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_sgp30 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sgp30 + eco2: + name: Workshop eCO2 + accuracy_decimals: 1 + tvoc: + name: Workshop TVOC + accuracy_decimals: 1 + address: 0x58 + update_interval: 5s diff --git a/tests/components/sgp30/test.esp32-ard.yaml b/tests/components/sgp30/test.esp32-ard.yaml index 6ea23c25cd..63c3bd6afd 100644 --- a/tests/components/sgp30/test.esp32-ard.yaml +++ b/tests/components/sgp30/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp30/test.esp32-c3-ard.yaml b/tests/components/sgp30/test.esp32-c3-ard.yaml index 45de67e94b..ee2c29ca4e 100644 --- a/tests/components/sgp30/test.esp32-c3-ard.yaml +++ b/tests/components/sgp30/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp30/test.esp32-c3-idf.yaml b/tests/components/sgp30/test.esp32-c3-idf.yaml index 45de67e94b..ee2c29ca4e 100644 --- a/tests/components/sgp30/test.esp32-c3-idf.yaml +++ b/tests/components/sgp30/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp30/test.esp32-idf.yaml b/tests/components/sgp30/test.esp32-idf.yaml index 6ea23c25cd..63c3bd6afd 100644 --- a/tests/components/sgp30/test.esp32-idf.yaml +++ b/tests/components/sgp30/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp30/test.esp8266-ard.yaml b/tests/components/sgp30/test.esp8266-ard.yaml index 45de67e94b..ee2c29ca4e 100644 --- a/tests/components/sgp30/test.esp8266-ard.yaml +++ b/tests/components/sgp30/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp30/test.rp2040-ard.yaml b/tests/components/sgp30/test.rp2040-ard.yaml index 45de67e94b..ee2c29ca4e 100644 --- a/tests/components/sgp30/test.rp2040-ard.yaml +++ b/tests/components/sgp30/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_sgp30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp30 - eco2: - name: Workshop eCO2 - accuracy_decimals: 1 - tvoc: - name: Workshop TVOC - accuracy_decimals: 1 - address: 0x58 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/common.yaml b/tests/components/sgp4x/common.yaml new file mode 100644 index 0000000000..adb678d542 --- /dev/null +++ b/tests/components/sgp4x/common.yaml @@ -0,0 +1,27 @@ +i2c: + - id: i2c_sgp4x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sgp4x + voc: + name: VOC Index + id: sgp40_voc_index + algorithm_tuning: + index_offset: 100 + learning_time_offset_hours: 12 + learning_time_gain_hours: 12 + gating_max_duration_minutes: 180 + std_initial: 50 + gain_factor: 230 + nox: + name: NOx + algorithm_tuning: + index_offset: 100 + learning_time_offset_hours: 12 + learning_time_gain_hours: 12 + gating_max_duration_minutes: 180 + std_initial: 50 + gain_factor: 230 + update_interval: 5s diff --git a/tests/components/sgp4x/test.esp32-ard.yaml b/tests/components/sgp4x/test.esp32-ard.yaml index c7380b5a10..63c3bd6afd 100644 --- a/tests/components/sgp4x/test.esp32-ard.yaml +++ b/tests/components/sgp4x/test.esp32-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp32-c3-ard.yaml b/tests/components/sgp4x/test.esp32-c3-ard.yaml index b2876478bd..ee2c29ca4e 100644 --- a/tests/components/sgp4x/test.esp32-c3-ard.yaml +++ b/tests/components/sgp4x/test.esp32-c3-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp32-c3-idf.yaml b/tests/components/sgp4x/test.esp32-c3-idf.yaml index b2876478bd..ee2c29ca4e 100644 --- a/tests/components/sgp4x/test.esp32-c3-idf.yaml +++ b/tests/components/sgp4x/test.esp32-c3-idf.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp32-idf.yaml b/tests/components/sgp4x/test.esp32-idf.yaml index c7380b5a10..63c3bd6afd 100644 --- a/tests/components/sgp4x/test.esp32-idf.yaml +++ b/tests/components/sgp4x/test.esp32-idf.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp8266-ard.yaml b/tests/components/sgp4x/test.esp8266-ard.yaml index b2876478bd..ee2c29ca4e 100644 --- a/tests/components/sgp4x/test.esp8266-ard.yaml +++ b/tests/components/sgp4x/test.esp8266-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sgp4x/test.rp2040-ard.yaml b/tests/components/sgp4x/test.rp2040-ard.yaml index b2876478bd..ee2c29ca4e 100644 --- a/tests/components/sgp4x/test.rp2040-ard.yaml +++ b/tests/components/sgp4x/test.rp2040-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_sgp4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sgp4x - voc: - name: VOC Index - id: sgp40_voc_index - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - nox: - name: NOx - algorithm_tuning: - index_offset: 100 - learning_time_offset_hours: 12 - learning_time_gain_hours: 12 - gating_max_duration_minutes: 180 - std_initial: 50 - gain_factor: 230 - update_interval: 5s +<<: !include common.yaml diff --git a/tests/components/sht3xd/common.yaml b/tests/components/sht3xd/common.yaml new file mode 100644 index 0000000000..2426ebfbb9 --- /dev/null +++ b/tests/components/sht3xd/common.yaml @@ -0,0 +1,13 @@ +i2c: + - id: i2c_sht3xd + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sht3xd + temperature: + name: SHT3XD Temperature + humidity: + name: SHT3XD Humidity + address: 0x44 + update_interval: 15s diff --git a/tests/components/sht3xd/test.esp32-ard.yaml b/tests/components/sht3xd/test.esp32-ard.yaml index 2b6ee50760..63c3bd6afd 100644 --- a/tests/components/sht3xd/test.esp32-ard.yaml +++ b/tests/components/sht3xd/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp32-c3-ard.yaml b/tests/components/sht3xd/test.esp32-c3-ard.yaml index 0409ff65c6..ee2c29ca4e 100644 --- a/tests/components/sht3xd/test.esp32-c3-ard.yaml +++ b/tests/components/sht3xd/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp32-c3-idf.yaml b/tests/components/sht3xd/test.esp32-c3-idf.yaml index 0409ff65c6..ee2c29ca4e 100644 --- a/tests/components/sht3xd/test.esp32-c3-idf.yaml +++ b/tests/components/sht3xd/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp32-idf.yaml b/tests/components/sht3xd/test.esp32-idf.yaml index 2b6ee50760..63c3bd6afd 100644 --- a/tests/components/sht3xd/test.esp32-idf.yaml +++ b/tests/components/sht3xd/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp8266-ard.yaml b/tests/components/sht3xd/test.esp8266-ard.yaml index 0409ff65c6..ee2c29ca4e 100644 --- a/tests/components/sht3xd/test.esp8266-ard.yaml +++ b/tests/components/sht3xd/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht3xd/test.rp2040-ard.yaml b/tests/components/sht3xd/test.rp2040-ard.yaml index 0409ff65c6..ee2c29ca4e 100644 --- a/tests/components/sht3xd/test.rp2040-ard.yaml +++ b/tests/components/sht3xd/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht3xd - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht3xd - temperature: - name: SHT3XD Temperature - humidity: - name: SHT3XD Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/common.yaml b/tests/components/sht4x/common.yaml new file mode 100644 index 0000000000..703a8fa32b --- /dev/null +++ b/tests/components/sht4x/common.yaml @@ -0,0 +1,13 @@ +i2c: + - id: i2c_sht4x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sht4x + temperature: + name: SHT4X Temperature + humidity: + name: SHT4X Humidity + address: 0x44 + update_interval: 15s diff --git a/tests/components/sht4x/test.esp32-ard.yaml b/tests/components/sht4x/test.esp32-ard.yaml index 13ec524d7d..63c3bd6afd 100644 --- a/tests/components/sht4x/test.esp32-ard.yaml +++ b/tests/components/sht4x/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/test.esp32-c3-ard.yaml b/tests/components/sht4x/test.esp32-c3-ard.yaml index 0bcdd864f6..ee2c29ca4e 100644 --- a/tests/components/sht4x/test.esp32-c3-ard.yaml +++ b/tests/components/sht4x/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/test.esp32-c3-idf.yaml b/tests/components/sht4x/test.esp32-c3-idf.yaml index 0bcdd864f6..ee2c29ca4e 100644 --- a/tests/components/sht4x/test.esp32-c3-idf.yaml +++ b/tests/components/sht4x/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/test.esp32-idf.yaml b/tests/components/sht4x/test.esp32-idf.yaml index 13ec524d7d..63c3bd6afd 100644 --- a/tests/components/sht4x/test.esp32-idf.yaml +++ b/tests/components/sht4x/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/test.esp8266-ard.yaml b/tests/components/sht4x/test.esp8266-ard.yaml index 0bcdd864f6..ee2c29ca4e 100644 --- a/tests/components/sht4x/test.esp8266-ard.yaml +++ b/tests/components/sht4x/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sht4x/test.rp2040-ard.yaml b/tests/components/sht4x/test.rp2040-ard.yaml index 0bcdd864f6..ee2c29ca4e 100644 --- a/tests/components/sht4x/test.rp2040-ard.yaml +++ b/tests/components/sht4x/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_sht4x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sht4x - temperature: - name: SHT4X Temperature - humidity: - name: SHT4X Humidity - address: 0x44 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/common.yaml b/tests/components/shtcx/common.yaml new file mode 100644 index 0000000000..0211319124 --- /dev/null +++ b/tests/components/shtcx/common.yaml @@ -0,0 +1,13 @@ +i2c: + - id: i2c_shtcx + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: shtcx + temperature: + name: SHTCX Temperature + humidity: + name: SHTCX Humidity + address: 0x70 + update_interval: 15s diff --git a/tests/components/shtcx/test.esp32-ard.yaml b/tests/components/shtcx/test.esp32-ard.yaml index 619bac9548..63c3bd6afd 100644 --- a/tests/components/shtcx/test.esp32-ard.yaml +++ b/tests/components/shtcx/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/test.esp32-c3-ard.yaml b/tests/components/shtcx/test.esp32-c3-ard.yaml index c1c7a2a63f..ee2c29ca4e 100644 --- a/tests/components/shtcx/test.esp32-c3-ard.yaml +++ b/tests/components/shtcx/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/test.esp32-c3-idf.yaml b/tests/components/shtcx/test.esp32-c3-idf.yaml index c1c7a2a63f..ee2c29ca4e 100644 --- a/tests/components/shtcx/test.esp32-c3-idf.yaml +++ b/tests/components/shtcx/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/test.esp32-idf.yaml b/tests/components/shtcx/test.esp32-idf.yaml index 619bac9548..63c3bd6afd 100644 --- a/tests/components/shtcx/test.esp32-idf.yaml +++ b/tests/components/shtcx/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/test.esp8266-ard.yaml b/tests/components/shtcx/test.esp8266-ard.yaml index c1c7a2a63f..ee2c29ca4e 100644 --- a/tests/components/shtcx/test.esp8266-ard.yaml +++ b/tests/components/shtcx/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/shtcx/test.rp2040-ard.yaml b/tests/components/shtcx/test.rp2040-ard.yaml index c1c7a2a63f..ee2c29ca4e 100644 --- a/tests/components/shtcx/test.rp2040-ard.yaml +++ b/tests/components/shtcx/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_shtcx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: shtcx - temperature: - name: SHTCX Temperature - humidity: - name: SHTCX Humidity - address: 0x70 - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/sim800l/common.yaml b/tests/components/sim800l/common.yaml new file mode 100644 index 0000000000..1b4e2e1af6 --- /dev/null +++ b/tests/components/sim800l/common.yaml @@ -0,0 +1,37 @@ +esphome: + on_boot: + then: + - sim800l.send_sms: + recipient: '+15551234567' + message: Hello there + - sim800l.dial: + recipient: '+15551234567' + - sim800l.connect + - sim800l.disconnect + - sim800l.send_ussd: + ussd: test_ussd + +uart: + - id: uart_sim800l + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sim800l: + on_sms_received: + - lambda: |- + std::string str; + str = sender; + str = message; + - sim800l.send_sms: + message: hello you + recipient: "+1234" + - sim800l.dial: + recipient: "+1234" + on_incoming_call: + - logger.log: + format: "Incoming call from '%s'" + args: ["caller_id.c_str()"] + - sim800l.disconnect + on_ussd_received: + - logger.log: "ussd_received" diff --git a/tests/components/sim800l/test.esp32-ard.yaml b/tests/components/sim800l/test.esp32-ard.yaml index c116548c6f..f486544afa 100644 --- a/tests/components/sim800l/test.esp32-ard.yaml +++ b/tests/components/sim800l/test.esp32-ard.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_sim800l - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sim800l/test.esp32-c3-ard.yaml b/tests/components/sim800l/test.esp32-c3-ard.yaml index 7ff359d1e7..b516342f3b 100644 --- a/tests/components/sim800l/test.esp32-c3-ard.yaml +++ b/tests/components/sim800l/test.esp32-c3-ard.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_sim800l - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sim800l/test.esp32-c3-idf.yaml b/tests/components/sim800l/test.esp32-c3-idf.yaml index 7ff359d1e7..b516342f3b 100644 --- a/tests/components/sim800l/test.esp32-c3-idf.yaml +++ b/tests/components/sim800l/test.esp32-c3-idf.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_sim800l - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sim800l/test.esp32-idf.yaml b/tests/components/sim800l/test.esp32-idf.yaml index c116548c6f..f486544afa 100644 --- a/tests/components/sim800l/test.esp32-idf.yaml +++ b/tests/components/sim800l/test.esp32-idf.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_sim800l - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sim800l/test.esp8266-ard.yaml b/tests/components/sim800l/test.esp8266-ard.yaml index 7ff359d1e7..b516342f3b 100644 --- a/tests/components/sim800l/test.esp8266-ard.yaml +++ b/tests/components/sim800l/test.esp8266-ard.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_sim800l - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sim800l/test.rp2040-ard.yaml b/tests/components/sim800l/test.rp2040-ard.yaml index 7ff359d1e7..b516342f3b 100644 --- a/tests/components/sim800l/test.rp2040-ard.yaml +++ b/tests/components/sim800l/test.rp2040-ard.yaml @@ -1,37 +1,5 @@ -esphome: - on_boot: - then: - - sim800l.send_sms: - recipient: '+15551234567' - message: Hello there - - sim800l.dial: - recipient: '+15551234567' - - sim800l.connect - - sim800l.disconnect - - sim800l.send_ussd: - ussd: test_ussd +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_sim800l - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -sim800l: - on_sms_received: - - lambda: |- - std::string str; - str = sender; - str = message; - - sim800l.send_sms: - message: hello you - recipient: "+1234" - - sim800l.dial: - recipient: "+1234" - on_incoming_call: - - logger.log: - format: "Incoming call from '%s'" - args: ["caller_id.c_str()"] - - sim800l.disconnect - on_ussd_received: - - logger.log: "ussd_received" +<<: !include common.yaml diff --git a/tests/components/sm16716/common.yaml b/tests/components/sm16716/common.yaml index 3bf2712f4e..db61d0b1c2 100644 --- a/tests/components/sm16716/common.yaml +++ b/tests/components/sm16716/common.yaml @@ -1,6 +1,6 @@ sm16716: - clock_pin: 4 - data_pin: 5 + clock_pin: ${clock_pin} + data_pin: ${data_pin} num_channels: 3 num_chips: 1 diff --git a/tests/components/sm16716/test.esp32-ard.yaml b/tests/components/sm16716/test.esp32-ard.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm16716/test.esp32-ard.yaml +++ b/tests/components/sm16716/test.esp32-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-c3-ard.yaml b/tests/components/sm16716/test.esp32-c3-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm16716/test.esp32-c3-ard.yaml +++ b/tests/components/sm16716/test.esp32-c3-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-c3-idf.yaml b/tests/components/sm16716/test.esp32-c3-idf.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm16716/test.esp32-c3-idf.yaml +++ b/tests/components/sm16716/test.esp32-c3-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-idf.yaml b/tests/components/sm16716/test.esp32-idf.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm16716/test.esp32-idf.yaml +++ b/tests/components/sm16716/test.esp32-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp8266-ard.yaml b/tests/components/sm16716/test.esp8266-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm16716/test.esp8266-ard.yaml +++ b/tests/components/sm16716/test.esp8266-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm16716/test.rp2040-ard.yaml b/tests/components/sm16716/test.rp2040-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm16716/test.rp2040-ard.yaml +++ b/tests/components/sm16716/test.rp2040-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2135/common.yaml b/tests/components/sm2135/common.yaml index 9a0de60839..8f807a9be5 100644 --- a/tests/components/sm2135/common.yaml +++ b/tests/components/sm2135/common.yaml @@ -1,6 +1,6 @@ sm2135: - clock_pin: 4 - data_pin: 5 + clock_pin: ${clock_pin} + data_pin: ${data_pin} rgb_current: 20mA cw_current: 60mA diff --git a/tests/components/sm2135/test.esp32-ard.yaml b/tests/components/sm2135/test.esp32-ard.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2135/test.esp32-ard.yaml +++ b/tests/components/sm2135/test.esp32-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-c3-ard.yaml b/tests/components/sm2135/test.esp32-c3-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2135/test.esp32-c3-ard.yaml +++ b/tests/components/sm2135/test.esp32-c3-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-c3-idf.yaml b/tests/components/sm2135/test.esp32-c3-idf.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2135/test.esp32-c3-idf.yaml +++ b/tests/components/sm2135/test.esp32-c3-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-idf.yaml b/tests/components/sm2135/test.esp32-idf.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2135/test.esp32-idf.yaml +++ b/tests/components/sm2135/test.esp32-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp8266-ard.yaml b/tests/components/sm2135/test.esp8266-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2135/test.esp8266-ard.yaml +++ b/tests/components/sm2135/test.esp8266-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2135/test.rp2040-ard.yaml b/tests/components/sm2135/test.rp2040-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2135/test.rp2040-ard.yaml +++ b/tests/components/sm2135/test.rp2040-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2235/common.yaml b/tests/components/sm2235/common.yaml index 043d43d6f1..d97fa4eb6c 100644 --- a/tests/components/sm2235/common.yaml +++ b/tests/components/sm2235/common.yaml @@ -1,6 +1,6 @@ sm2235: - clock_pin: 4 - data_pin: 5 + clock_pin: ${clock_pin} + data_pin: ${data_pin} max_power_color_channels: 9 max_power_white_channels: 9 diff --git a/tests/components/sm2235/test.esp32-ard.yaml b/tests/components/sm2235/test.esp32-ard.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2235/test.esp32-ard.yaml +++ b/tests/components/sm2235/test.esp32-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-c3-ard.yaml b/tests/components/sm2235/test.esp32-c3-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2235/test.esp32-c3-ard.yaml +++ b/tests/components/sm2235/test.esp32-c3-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-c3-idf.yaml b/tests/components/sm2235/test.esp32-c3-idf.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2235/test.esp32-c3-idf.yaml +++ b/tests/components/sm2235/test.esp32-c3-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-idf.yaml b/tests/components/sm2235/test.esp32-idf.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2235/test.esp32-idf.yaml +++ b/tests/components/sm2235/test.esp32-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp8266-ard.yaml b/tests/components/sm2235/test.esp8266-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2235/test.esp8266-ard.yaml +++ b/tests/components/sm2235/test.esp8266-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2235/test.rp2040-ard.yaml b/tests/components/sm2235/test.rp2040-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2235/test.rp2040-ard.yaml +++ b/tests/components/sm2235/test.rp2040-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2335/common.yaml b/tests/components/sm2335/common.yaml index a5b2aedeb5..51d40aab21 100644 --- a/tests/components/sm2335/common.yaml +++ b/tests/components/sm2335/common.yaml @@ -1,6 +1,6 @@ sm2335: - clock_pin: 4 - data_pin: 5 + clock_pin: ${clock_pin} + data_pin: ${data_pin} max_power_color_channels: 9 max_power_white_channels: 9 diff --git a/tests/components/sm2335/test.esp32-ard.yaml b/tests/components/sm2335/test.esp32-ard.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2335/test.esp32-ard.yaml +++ b/tests/components/sm2335/test.esp32-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-c3-ard.yaml b/tests/components/sm2335/test.esp32-c3-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2335/test.esp32-c3-ard.yaml +++ b/tests/components/sm2335/test.esp32-c3-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-c3-idf.yaml b/tests/components/sm2335/test.esp32-c3-idf.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2335/test.esp32-c3-idf.yaml +++ b/tests/components/sm2335/test.esp32-c3-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-idf.yaml b/tests/components/sm2335/test.esp32-idf.yaml index dade44d145..d295973e3f 100644 --- a/tests/components/sm2335/test.esp32-idf.yaml +++ b/tests/components/sm2335/test.esp32-idf.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp8266-ard.yaml b/tests/components/sm2335/test.esp8266-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2335/test.esp8266-ard.yaml +++ b/tests/components/sm2335/test.esp8266-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm2335/test.rp2040-ard.yaml b/tests/components/sm2335/test.rp2040-ard.yaml index dade44d145..7808481215 100644 --- a/tests/components/sm2335/test.rp2040-ard.yaml +++ b/tests/components/sm2335/test.rp2040-ard.yaml @@ -1 +1,5 @@ +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + <<: !include common.yaml diff --git a/tests/components/sm300d2/common.yaml b/tests/components/sm300d2/common.yaml new file mode 100644 index 0000000000..a231b63816 --- /dev/null +++ b/tests/components/sm300d2/common.yaml @@ -0,0 +1,23 @@ +uart: + - id: uart_sm300d2 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: sm300d2 + co2: + name: SM300D2 CO2 Value + formaldehyde: + name: SM300D2 Formaldehyde Value + tvoc: + name: SM300D2 TVOC Value + pm_2_5: + name: SM300D2 PM2.5 Value + pm_10_0: + name: SM300D2 PM10 Value + temperature: + name: SM300D2 Temperature Value + humidity: + name: SM300D2 Humidity Value + update_interval: 60s diff --git a/tests/components/sm300d2/test.esp32-ard.yaml b/tests/components/sm300d2/test.esp32-ard.yaml index 92dba4fb3b..f486544afa 100644 --- a/tests/components/sm300d2/test.esp32-ard.yaml +++ b/tests/components/sm300d2/test.esp32-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp32-c3-ard.yaml b/tests/components/sm300d2/test.esp32-c3-ard.yaml index bcd0a728b2..b516342f3b 100644 --- a/tests/components/sm300d2/test.esp32-c3-ard.yaml +++ b/tests/components/sm300d2/test.esp32-c3-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp32-c3-idf.yaml b/tests/components/sm300d2/test.esp32-c3-idf.yaml index bcd0a728b2..b516342f3b 100644 --- a/tests/components/sm300d2/test.esp32-c3-idf.yaml +++ b/tests/components/sm300d2/test.esp32-c3-idf.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp32-idf.yaml b/tests/components/sm300d2/test.esp32-idf.yaml index 92dba4fb3b..f486544afa 100644 --- a/tests/components/sm300d2/test.esp32-idf.yaml +++ b/tests/components/sm300d2/test.esp32-idf.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp8266-ard.yaml b/tests/components/sm300d2/test.esp8266-ard.yaml index bcd0a728b2..b516342f3b 100644 --- a/tests/components/sm300d2/test.esp8266-ard.yaml +++ b/tests/components/sm300d2/test.esp8266-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sm300d2/test.rp2040-ard.yaml b/tests/components/sm300d2/test.rp2040-ard.yaml index bcd0a728b2..b516342f3b 100644 --- a/tests/components/sm300d2/test.rp2040-ard.yaml +++ b/tests/components/sm300d2/test.rp2040-ard.yaml @@ -1,23 +1,5 @@ -uart: - - id: uart_sm300d2 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: sm300d2 - co2: - name: SM300D2 CO2 Value - formaldehyde: - name: SM300D2 Formaldehyde Value - tvoc: - name: SM300D2 TVOC Value - pm_2_5: - name: SM300D2 PM2.5 Value - pm_10_0: - name: SM300D2 PM10 Value - temperature: - name: SM300D2 Temperature Value - humidity: - name: SM300D2 Humidity Value - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sml/common.yaml b/tests/components/sml/common.yaml new file mode 100644 index 0000000000..a50d25eeee --- /dev/null +++ b/tests/components/sml/common.yaml @@ -0,0 +1,31 @@ +uart: + - id: uart_sml + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sml: + id: mysml + on_data: + - logger.log: "SML on_data" + +sensor: + - platform: sml + name: Total energy + sml_id: mysml + server_id: 0123456789abcdef + obis_code: "1-0:1.8.0" + unit_of_measurement: kWh + accuracy_decimals: 1 + device_class: energy + state_class: total_increasing + filters: + - multiply: 0.0001 + +text_sensor: + - platform: sml + name: Manufacturer + sml_id: mysml + server_id: 0123456789abcdef + obis_code: "129-129:199.130.3" + format: text diff --git a/tests/components/sml/test.esp32-ard.yaml b/tests/components/sml/test.esp32-ard.yaml index 7217199380..f486544afa 100644 --- a/tests/components/sml/test.esp32-ard.yaml +++ b/tests/components/sml/test.esp32-ard.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/sml/test.esp32-c3-ard.yaml b/tests/components/sml/test.esp32-c3-ard.yaml index 903f968c26..b516342f3b 100644 --- a/tests/components/sml/test.esp32-c3-ard.yaml +++ b/tests/components/sml/test.esp32-c3-ard.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/sml/test.esp32-c3-idf.yaml b/tests/components/sml/test.esp32-c3-idf.yaml index 903f968c26..b516342f3b 100644 --- a/tests/components/sml/test.esp32-c3-idf.yaml +++ b/tests/components/sml/test.esp32-c3-idf.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/sml/test.esp32-idf.yaml b/tests/components/sml/test.esp32-idf.yaml index 7217199380..f486544afa 100644 --- a/tests/components/sml/test.esp32-idf.yaml +++ b/tests/components/sml/test.esp32-idf.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/sml/test.esp8266-ard.yaml b/tests/components/sml/test.esp8266-ard.yaml index 903f968c26..b516342f3b 100644 --- a/tests/components/sml/test.esp8266-ard.yaml +++ b/tests/components/sml/test.esp8266-ard.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/sml/test.rp2040-ard.yaml b/tests/components/sml/test.rp2040-ard.yaml index 903f968c26..b516342f3b 100644 --- a/tests/components/sml/test.rp2040-ard.yaml +++ b/tests/components/sml/test.rp2040-ard.yaml @@ -1,31 +1,5 @@ -uart: - - id: uart_sml - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sml: - id: mysml - on_data: - - logger.log: "SML on_data" - -sensor: - - platform: sml - name: Total energy - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "1-0:1.8.0" - unit_of_measurement: kWh - accuracy_decimals: 1 - device_class: energy - state_class: total_increasing - filters: - - multiply: 0.0001 - -text_sensor: - - platform: sml - name: Manufacturer - sml_id: mysml - server_id: 0123456789abcdef - obis_code: "129-129:199.130.3" - format: text +<<: !include common.yaml diff --git a/tests/components/smt100/common.yaml b/tests/components/smt100/common.yaml new file mode 100644 index 0000000000..f86bd762e7 --- /dev/null +++ b/tests/components/smt100/common.yaml @@ -0,0 +1,19 @@ +uart: + - id: uart_smt100 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: smt100 + counts: + name: Counts + dielectric_constant: + name: Dielectric Constant + temperature: + name: Temperature + moisture: + name: Moisture + voltage: + name: Voltage + update_interval: 60s diff --git a/tests/components/smt100/test.esp32-ard.yaml b/tests/components/smt100/test.esp32-ard.yaml index 7c19f4bc45..f486544afa 100644 --- a/tests/components/smt100/test.esp32-ard.yaml +++ b/tests/components/smt100/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/smt100/test.esp32-c3-ard.yaml b/tests/components/smt100/test.esp32-c3-ard.yaml index 4277f2567b..b516342f3b 100644 --- a/tests/components/smt100/test.esp32-c3-ard.yaml +++ b/tests/components/smt100/test.esp32-c3-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/smt100/test.esp32-c3-idf.yaml b/tests/components/smt100/test.esp32-c3-idf.yaml index 4277f2567b..b516342f3b 100644 --- a/tests/components/smt100/test.esp32-c3-idf.yaml +++ b/tests/components/smt100/test.esp32-c3-idf.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/smt100/test.esp32-idf.yaml b/tests/components/smt100/test.esp32-idf.yaml index 7c19f4bc45..f486544afa 100644 --- a/tests/components/smt100/test.esp32-idf.yaml +++ b/tests/components/smt100/test.esp32-idf.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/smt100/test.esp8266-ard.yaml b/tests/components/smt100/test.esp8266-ard.yaml index 4277f2567b..b516342f3b 100644 --- a/tests/components/smt100/test.esp8266-ard.yaml +++ b/tests/components/smt100/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/smt100/test.rp2040-ard.yaml b/tests/components/smt100/test.rp2040-ard.yaml index 4277f2567b..b516342f3b 100644 --- a/tests/components/smt100/test.rp2040-ard.yaml +++ b/tests/components/smt100/test.rp2040-ard.yaml @@ -1,19 +1,5 @@ -uart: - - id: uart_smt100 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: smt100 - counts: - name: Counts - dielectric_constant: - name: Dielectric Constant - temperature: - name: Temperature - moisture: - name: Moisture - voltage: - name: Voltage - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sn74hc165/common.yaml b/tests/components/sn74hc165/common.yaml new file mode 100644 index 0000000000..f98711048d --- /dev/null +++ b/tests/components/sn74hc165/common.yaml @@ -0,0 +1,14 @@ +sn74hc165: + id: sn74hc165_hub + clock_pin: ${clock_pin} + data_pin: ${data_pin} + load_pin: ${load_pin} + clock_inhibit_pin: ${clock_inhibit_pin} + sr_count: 2 + +binary_sensor: + - platform: gpio + id: sn74hc165_pin_0 + pin: + sn74hc165: sn74hc165_hub + number: 0 diff --git a/tests/components/sn74hc165/test.esp32-ard.yaml b/tests/components/sn74hc165/test.esp32-ard.yaml index 55b06aec9b..27f963312f 100644 --- a/tests/components/sn74hc165/test.esp32-ard.yaml +++ b/tests/components/sn74hc165/test.esp32-ard.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 13 - data_pin: 14 - load_pin: 15 - clock_inhibit_pin: 16 - sr_count: 2 +substitutions: + clock_pin: GPIO13 + data_pin: GPIO14 + load_pin: GPIO15 + clock_inhibit_pin: GPIO16 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp32-c3-ard.yaml b/tests/components/sn74hc165/test.esp32-c3-ard.yaml index f687b23c9d..0a3db917b7 100644 --- a/tests/components/sn74hc165/test.esp32-c3-ard.yaml +++ b/tests/components/sn74hc165/test.esp32-c3-ard.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 3 - data_pin: 4 - load_pin: 5 - clock_inhibit_pin: 6 - sr_count: 2 +substitutions: + clock_pin: GPIO3 + data_pin: GPIO4 + load_pin: GPIO5 + clock_inhibit_pin: GPIO6 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp32-c3-idf.yaml b/tests/components/sn74hc165/test.esp32-c3-idf.yaml index f687b23c9d..0a3db917b7 100644 --- a/tests/components/sn74hc165/test.esp32-c3-idf.yaml +++ b/tests/components/sn74hc165/test.esp32-c3-idf.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 3 - data_pin: 4 - load_pin: 5 - clock_inhibit_pin: 6 - sr_count: 2 +substitutions: + clock_pin: GPIO3 + data_pin: GPIO4 + load_pin: GPIO5 + clock_inhibit_pin: GPIO6 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp32-idf.yaml b/tests/components/sn74hc165/test.esp32-idf.yaml index 55b06aec9b..27f963312f 100644 --- a/tests/components/sn74hc165/test.esp32-idf.yaml +++ b/tests/components/sn74hc165/test.esp32-idf.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 13 - data_pin: 14 - load_pin: 15 - clock_inhibit_pin: 16 - sr_count: 2 +substitutions: + clock_pin: GPIO13 + data_pin: GPIO14 + load_pin: GPIO15 + clock_inhibit_pin: GPIO16 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp8266-ard.yaml b/tests/components/sn74hc165/test.esp8266-ard.yaml index 55b06aec9b..27f963312f 100644 --- a/tests/components/sn74hc165/test.esp8266-ard.yaml +++ b/tests/components/sn74hc165/test.esp8266-ard.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 13 - data_pin: 14 - load_pin: 15 - clock_inhibit_pin: 16 - sr_count: 2 +substitutions: + clock_pin: GPIO13 + data_pin: GPIO14 + load_pin: GPIO15 + clock_inhibit_pin: GPIO16 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc165/test.rp2040-ard.yaml b/tests/components/sn74hc165/test.rp2040-ard.yaml index f687b23c9d..0a3db917b7 100644 --- a/tests/components/sn74hc165/test.rp2040-ard.yaml +++ b/tests/components/sn74hc165/test.rp2040-ard.yaml @@ -1,14 +1,7 @@ -sn74hc165: - id: sn74hc165_hub - clock_pin: 3 - data_pin: 4 - load_pin: 5 - clock_inhibit_pin: 6 - sr_count: 2 +substitutions: + clock_pin: GPIO3 + data_pin: GPIO4 + load_pin: GPIO5 + clock_inhibit_pin: GPIO6 -binary_sensor: - - platform: gpio - id: sn74hc165_pin_0 - pin: - sn74hc165: sn74hc165_hub - number: 0 +<<: !include common.yaml diff --git a/tests/components/sn74hc595/common.yaml b/tests/components/sn74hc595/common.yaml new file mode 100644 index 0000000000..fc297909f5 --- /dev/null +++ b/tests/components/sn74hc595/common.yaml @@ -0,0 +1,26 @@ +spi: + - id: spi_sn74hc595 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +sn74hc595: + - id: sn74hc595_hub + clock_pin: ${clock_pin} + data_pin: ${data_pin} + latch_pin: ${latch_pin1} + oe_pin: ${oe_pin1} + sr_count: 2 + - id: sn74hc595_hub_2 + latch_pin: ${latch_pin2} + oe_pin: ${oe_pin2} + type: spi + sr_count: 2 + +switch: + - platform: gpio + name: SN74HC595 Pin 0 + pin: + sn74hc595: sn74hc595_hub_2 + number: 0 + inverted: false diff --git a/tests/components/sn74hc595/test.esp32-ard.yaml b/tests/components/sn74hc595/test.esp32-ard.yaml index f695395797..a4bab64862 100644 --- a/tests/components/sn74hc595/test.esp32-ard.yaml +++ b/tests/components/sn74hc595/test.esp32-ard.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + clock_pin: GPIO15 + data_pin: GPIO14 + latch_pin1: GPIO21 + oe_pin1: GPIO22 + latch_pin2: GPIO23 + oe_pin2: GPIO25 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 12 - data_pin: 13 - latch_pin: 14 - oe_pin: 18 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 21 - oe_pin: 22 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sn74hc595/test.esp32-c3-ard.yaml b/tests/components/sn74hc595/test.esp32-c3-ard.yaml index 9b093899d3..14c928be88 100644 --- a/tests/components/sn74hc595/test.esp32-c3-ard.yaml +++ b/tests/components/sn74hc595/test.esp32-c3-ard.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO8 + clock_pin: GPIO5 + data_pin: GPIO4 + latch_pin1: GPIO1 + oe_pin1: GPIO2 + latch_pin2: GPIO3 + oe_pin2: GPIO9 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 0 - data_pin: 1 - latch_pin: 2 - oe_pin: 3 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 8 - oe_pin: 9 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sn74hc595/test.esp32-c3-idf.yaml b/tests/components/sn74hc595/test.esp32-c3-idf.yaml index 9b093899d3..14c928be88 100644 --- a/tests/components/sn74hc595/test.esp32-c3-idf.yaml +++ b/tests/components/sn74hc595/test.esp32-c3-idf.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO8 + clock_pin: GPIO5 + data_pin: GPIO4 + latch_pin1: GPIO1 + oe_pin1: GPIO2 + latch_pin2: GPIO3 + oe_pin2: GPIO9 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 0 - data_pin: 1 - latch_pin: 2 - oe_pin: 3 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 8 - oe_pin: 9 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sn74hc595/test.esp32-idf.yaml b/tests/components/sn74hc595/test.esp32-idf.yaml index f695395797..a4bab64862 100644 --- a/tests/components/sn74hc595/test.esp32-idf.yaml +++ b/tests/components/sn74hc595/test.esp32-idf.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + clock_pin: GPIO15 + data_pin: GPIO14 + latch_pin1: GPIO21 + oe_pin1: GPIO22 + latch_pin2: GPIO23 + oe_pin2: GPIO25 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 12 - data_pin: 13 - latch_pin: 14 - oe_pin: 18 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 21 - oe_pin: 22 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sn74hc595/test.esp8266-ard.yaml b/tests/components/sn74hc595/test.esp8266-ard.yaml index 64bf5d1925..cad11feca8 100644 --- a/tests/components/sn74hc595/test.esp8266-ard.yaml +++ b/tests/components/sn74hc595/test.esp8266-ard.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + clock_pin: GPIO5 + data_pin: GPIO4 + latch_pin1: GPIO2 + oe_pin1: GPIO0 + latch_pin2: GPIO3 + oe_pin2: GPIO1 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 0 - data_pin: 2 - latch_pin: 4 - oe_pin: 5 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 15 - oe_pin: 16 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sn74hc595/test.rp2040-ard.yaml b/tests/components/sn74hc595/test.rp2040-ard.yaml index de8e192659..14c928be88 100644 --- a/tests/components/sn74hc595/test.rp2040-ard.yaml +++ b/tests/components/sn74hc595/test.rp2040-ard.yaml @@ -1,27 +1,12 @@ -spi: - - id: spi_sn74hc595 - clk_pin: 6 - mosi_pin: 5 - miso_pin: 4 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO8 + clock_pin: GPIO5 + data_pin: GPIO4 + latch_pin1: GPIO1 + oe_pin1: GPIO2 + latch_pin2: GPIO3 + oe_pin2: GPIO9 -sn74hc595: - - id: sn74hc595_hub - clock_pin: 0 - data_pin: 1 - latch_pin: 2 - oe_pin: 3 - sr_count: 2 - - id: sn74hc595_hub_2 - latch_pin: 8 - oe_pin: 9 - spi_id: spi_sn74hc595 - type: spi - sr_count: 2 - -switch: - - platform: gpio - name: SN74HC595 Pin 0 - pin: - sn74hc595: sn74hc595_hub_2 - number: 0 - inverted: false +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/common.yaml b/tests/components/sonoff_d1/common.yaml new file mode 100644 index 0000000000..d2d4043b95 --- /dev/null +++ b/tests/components/sonoff_d1/common.yaml @@ -0,0 +1,12 @@ +uart: + - id: uart_sonoff_d1 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +light: + - platform: sonoff_d1 + id: d1_light + name: Sonoff D1 Dimmer + restore_mode: RESTORE_DEFAULT_OFF + use_rm433_remote: false diff --git a/tests/components/sonoff_d1/test.esp32-ard.yaml b/tests/components/sonoff_d1/test.esp32-ard.yaml index dc35e3b6ac..f486544afa 100644 --- a/tests/components/sonoff_d1/test.esp32-ard.yaml +++ b/tests/components/sonoff_d1/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -uart: - - id: uart_sonoff_d1 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -light: - - platform: sonoff_d1 - id: d1_light - name: Sonoff D1 Dimmer - restore_mode: RESTORE_DEFAULT_OFF - use_rm433_remote: false +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp32-c3-ard.yaml b/tests/components/sonoff_d1/test.esp32-c3-ard.yaml new file mode 100644 index 0000000000..b516342f3b --- /dev/null +++ b/tests/components/sonoff_d1/test.esp32-c3-ard.yaml @@ -0,0 +1,5 @@ +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp32-c3-idf.yaml b/tests/components/sonoff_d1/test.esp32-c3-idf.yaml new file mode 100644 index 0000000000..b516342f3b --- /dev/null +++ b/tests/components/sonoff_d1/test.esp32-c3-idf.yaml @@ -0,0 +1,5 @@ +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp32-idf.yaml b/tests/components/sonoff_d1/test.esp32-idf.yaml index dc35e3b6ac..f486544afa 100644 --- a/tests/components/sonoff_d1/test.esp32-idf.yaml +++ b/tests/components/sonoff_d1/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -uart: - - id: uart_sonoff_d1 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -light: - - platform: sonoff_d1 - id: d1_light - name: Sonoff D1 Dimmer - restore_mode: RESTORE_DEFAULT_OFF - use_rm433_remote: false +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp8266-ard.yaml b/tests/components/sonoff_d1/test.esp8266-ard.yaml index c4a62f4cb3..b516342f3b 100644 --- a/tests/components/sonoff_d1/test.esp8266-ard.yaml +++ b/tests/components/sonoff_d1/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -uart: - - id: uart_sonoff_d1 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -light: - - platform: sonoff_d1 - id: d1_light - name: Sonoff D1 Dimmer - restore_mode: RESTORE_DEFAULT_OFF - use_rm433_remote: false +<<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.rp2040-ard.yaml b/tests/components/sonoff_d1/test.rp2040-ard.yaml new file mode 100644 index 0000000000..b516342f3b --- /dev/null +++ b/tests/components/sonoff_d1/test.rp2040-ard.yaml @@ -0,0 +1,5 @@ +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/speaker/audio_dac.esp32-ard.yaml b/tests/components/speaker/audio_dac.esp32-ard.yaml new file mode 100644 index 0000000000..75d9ddf92b --- /dev/null +++ b/tests/components/speaker/audio_dac.esp32-ard.yaml @@ -0,0 +1,9 @@ +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + i2s_bclk_pin: GPIO27 + i2s_lrclk_pin: GPIO26 + i2s_mclk_pin: GPIO25 + i2s_dout_pin: GPIO23 + +<<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/audio_dac.esp32-c3-ard.yaml b/tests/components/speaker/audio_dac.esp32-c3-ard.yaml new file mode 100644 index 0000000000..1004d2143e --- /dev/null +++ b/tests/components/speaker/audio_dac.esp32-c3-ard.yaml @@ -0,0 +1,9 @@ +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + i2s_bclk_pin: GPIO7 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO9 + i2s_dout_pin: GPIO8 + +<<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/audio_dac.esp32-c3-idf.yaml b/tests/components/speaker/audio_dac.esp32-c3-idf.yaml new file mode 100644 index 0000000000..1004d2143e --- /dev/null +++ b/tests/components/speaker/audio_dac.esp32-c3-idf.yaml @@ -0,0 +1,9 @@ +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + i2s_bclk_pin: GPIO7 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO9 + i2s_dout_pin: GPIO8 + +<<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/audio_dac.esp32-idf.yaml b/tests/components/speaker/audio_dac.esp32-idf.yaml new file mode 100644 index 0000000000..75d9ddf92b --- /dev/null +++ b/tests/components/speaker/audio_dac.esp32-idf.yaml @@ -0,0 +1,9 @@ +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + i2s_bclk_pin: GPIO27 + i2s_lrclk_pin: GPIO26 + i2s_mclk_pin: GPIO25 + i2s_dout_pin: GPIO23 + +<<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/common-audio_dac.yaml b/tests/components/speaker/common-audio_dac.yaml new file mode 100644 index 0000000000..41b994d4d4 --- /dev/null +++ b/tests/components/speaker/common-audio_dac.yaml @@ -0,0 +1,36 @@ +esphome: + on_boot: + then: + - speaker.mute_on: + - speaker.mute_off: + - if: + condition: speaker.is_stopped + then: + - speaker.play: [0, 1, 2, 3] + - speaker.volume_set: 0.9 + - if: + condition: speaker.is_playing + then: + - speaker.finish: + - speaker.stop: + +i2c: + - id: i2c_audio_dac + scl: ${scl_pin} + sda: ${sda_pin} + +i2s_audio: + i2s_lrclk_pin: ${i2s_bclk_pin} + i2s_bclk_pin: ${i2s_lrclk_pin} + i2s_mclk_pin: ${i2s_mclk_pin} + +audio_dac: + - platform: aic3204 + id: internal_dac + +speaker: + - platform: i2s_audio + id: speaker_with_audio_dac_id + audio_dac: internal_dac + dac_type: external + i2s_dout_pin: ${i2s_dout_pin} diff --git a/tests/components/speaker/common.yaml b/tests/components/speaker/common.yaml new file mode 100644 index 0000000000..c04674ee29 --- /dev/null +++ b/tests/components/speaker/common.yaml @@ -0,0 +1,26 @@ +esphome: + on_boot: + then: + - speaker.mute_on: + - speaker.mute_off: + - if: + condition: speaker.is_stopped + then: + - speaker.play: [0, 1, 2, 3] + - speaker.volume_set: 0.9 + - if: + condition: speaker.is_playing + then: + - speaker.finish: + - speaker.stop: + +i2s_audio: + i2s_lrclk_pin: ${i2s_bclk_pin} + i2s_bclk_pin: ${i2s_lrclk_pin} + i2s_mclk_pin: ${i2s_mclk_pin} + +speaker: + - platform: i2s_audio + id: speaker_id + dac_type: external + i2s_dout_pin: ${i2s_dout_pin} diff --git a/tests/components/speaker/test.esp32-ard.yaml b/tests/components/speaker/test.esp32-ard.yaml index 396b4d95ea..e2439ebdf2 100644 --- a/tests/components/speaker/test.esp32-ard.yaml +++ b/tests/components/speaker/test.esp32-ard.yaml @@ -1,26 +1,9 @@ -esphome: - on_boot: - then: - - speaker.mute_on: - - speaker.mute_off: - - if: - condition: speaker.is_stopped - then: - - speaker.play: [0, 1, 2, 3] - - speaker.volume_set: 0.9 - - if: - condition: speaker.is_playing - then: - - speaker.finish: - - speaker.stop: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + i2s_bclk_pin: GPIO27 + i2s_lrclk_pin: GPIO26 + i2s_mclk_pin: GPIO25 + i2s_dout_pin: GPIO23 -i2s_audio: - i2s_lrclk_pin: 16 - i2s_bclk_pin: 17 - i2s_mclk_pin: 15 - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 13 +<<: !include common.yaml diff --git a/tests/components/speaker/test.esp32-c3-ard.yaml b/tests/components/speaker/test.esp32-c3-ard.yaml index 636aeba766..ddcf051fab 100644 --- a/tests/components/speaker/test.esp32-c3-ard.yaml +++ b/tests/components/speaker/test.esp32-c3-ard.yaml @@ -1,26 +1,9 @@ -esphome: - on_boot: - then: - - speaker.mute_on: - - speaker.mute_off: - - if: - condition: speaker.is_stopped - then: - - speaker.play: [0, 1, 2, 3] - - speaker.volume_set: 0.9 - - if: - condition: speaker.is_playing - then: - - speaker.finish: - - speaker.stop: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + i2s_bclk_pin: GPIO7 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO9 + i2s_dout_pin: GPIO8 -i2s_audio: - i2s_lrclk_pin: 6 - i2s_bclk_pin: 7 - i2s_mclk_pin: 5 - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 3 +<<: !include common.yaml diff --git a/tests/components/speaker/test.esp32-c3-idf.yaml b/tests/components/speaker/test.esp32-c3-idf.yaml index 636aeba766..ddcf051fab 100644 --- a/tests/components/speaker/test.esp32-c3-idf.yaml +++ b/tests/components/speaker/test.esp32-c3-idf.yaml @@ -1,26 +1,9 @@ -esphome: - on_boot: - then: - - speaker.mute_on: - - speaker.mute_off: - - if: - condition: speaker.is_stopped - then: - - speaker.play: [0, 1, 2, 3] - - speaker.volume_set: 0.9 - - if: - condition: speaker.is_playing - then: - - speaker.finish: - - speaker.stop: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + i2s_bclk_pin: GPIO7 + i2s_lrclk_pin: GPIO6 + i2s_mclk_pin: GPIO9 + i2s_dout_pin: GPIO8 -i2s_audio: - i2s_lrclk_pin: 6 - i2s_bclk_pin: 7 - i2s_mclk_pin: 5 - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 3 +<<: !include common.yaml diff --git a/tests/components/speaker/test.esp32-idf.yaml b/tests/components/speaker/test.esp32-idf.yaml index b69440b133..e2439ebdf2 100644 --- a/tests/components/speaker/test.esp32-idf.yaml +++ b/tests/components/speaker/test.esp32-idf.yaml @@ -1,35 +1,9 @@ -esphome: - on_boot: - then: - - speaker.mute_on: - - speaker.mute_off: - - if: - condition: speaker.is_stopped - then: - - speaker.play: [0, 1, 2, 3] - - speaker.volume_set: 0.9 - - if: - condition: speaker.is_playing - then: - - speaker.finish: - - speaker.stop: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + i2s_bclk_pin: GPIO27 + i2s_lrclk_pin: GPIO26 + i2s_mclk_pin: GPIO25 + i2s_dout_pin: GPIO23 -i2s_audio: - i2s_lrclk_pin: 16 - i2s_bclk_pin: 17 - i2s_mclk_pin: 15 - -i2c: - scl: 12 - sda: 10 - -audio_dac: - - platform: aic3204 - id: internal_dac - -speaker: - - platform: i2s_audio - id: speaker_with_audio_dac_id - audio_dac: internal_dac - dac_type: external - i2s_dout_pin: 14 +<<: !include common.yaml diff --git a/tests/components/speed/common.yaml b/tests/components/speed/common.yaml new file mode 100644 index 0000000000..be8172af7e --- /dev/null +++ b/tests/components/speed/common.yaml @@ -0,0 +1,9 @@ +output: + - platform: ${output_platform} + id: fan_output_1 + pin: ${pin} + +fan: + - platform: speed + id: fan_speed + output: fan_output_1 diff --git a/tests/components/speed/test.esp32-ard.yaml b/tests/components/speed/test.esp32-ard.yaml index 29a55e9edd..26da1ce1d6 100644 --- a/tests/components/speed/test.esp32-ard.yaml +++ b/tests/components/speed/test.esp32-ard.yaml @@ -1,9 +1,5 @@ -output: - - platform: ledc - id: fan_output_1 - pin: 12 +substitutions: + output_platform: ledc + pin: GPIO14 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/speed/test.esp32-c3-ard.yaml b/tests/components/speed/test.esp32-c3-ard.yaml index fa1920676e..7476963591 100644 --- a/tests/components/speed/test.esp32-c3-ard.yaml +++ b/tests/components/speed/test.esp32-c3-ard.yaml @@ -1,9 +1,5 @@ -output: - - platform: ledc - id: fan_output_1 - pin: 2 +substitutions: + output_platform: ledc + pin: GPIO4 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/speed/test.esp32-c3-idf.yaml b/tests/components/speed/test.esp32-c3-idf.yaml index fa1920676e..7476963591 100644 --- a/tests/components/speed/test.esp32-c3-idf.yaml +++ b/tests/components/speed/test.esp32-c3-idf.yaml @@ -1,9 +1,5 @@ -output: - - platform: ledc - id: fan_output_1 - pin: 2 +substitutions: + output_platform: ledc + pin: GPIO4 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/speed/test.esp32-idf.yaml b/tests/components/speed/test.esp32-idf.yaml index 29a55e9edd..26da1ce1d6 100644 --- a/tests/components/speed/test.esp32-idf.yaml +++ b/tests/components/speed/test.esp32-idf.yaml @@ -1,9 +1,5 @@ -output: - - platform: ledc - id: fan_output_1 - pin: 12 +substitutions: + output_platform: ledc + pin: GPIO14 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/speed/test.esp8266-ard.yaml b/tests/components/speed/test.esp8266-ard.yaml index 6ed9949cf5..23a7f43b42 100644 --- a/tests/components/speed/test.esp8266-ard.yaml +++ b/tests/components/speed/test.esp8266-ard.yaml @@ -1,9 +1,5 @@ -output: - - platform: esp8266_pwm - id: fan_output_1 - pin: 12 +substitutions: + output_platform: esp8266_pwm + pin: GPIO14 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/speed/test.rp2040-ard.yaml b/tests/components/speed/test.rp2040-ard.yaml index 02b572db75..d70f7c74ec 100644 --- a/tests/components/speed/test.rp2040-ard.yaml +++ b/tests/components/speed/test.rp2040-ard.yaml @@ -1,9 +1,5 @@ -output: - - platform: rp2040_pwm - id: fan_output_1 - pin: 12 +substitutions: + output_platform: rp2040_pwm + pin: GPIO4 -fan: - - platform: speed - id: fan_speed - output: fan_output_1 +<<: !include common.yaml diff --git a/tests/components/spi/common.yaml b/tests/components/spi/common.yaml new file mode 100644 index 0000000000..04b4779957 --- /dev/null +++ b/tests/components/spi/common.yaml @@ -0,0 +1,5 @@ +spi: + - id: spi_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/components/spi/test.esp32-ard.yaml b/tests/components/spi/test.esp32-ard.yaml index 1cdcf461dd..448e54fea6 100644 --- a/tests/components/spi/test.esp32-ard.yaml +++ b/tests/components/spi/test.esp32-ard.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + +<<: !include common.yaml diff --git a/tests/components/spi/test.esp32-c3-ard.yaml b/tests/components/spi/test.esp32-c3-ard.yaml index f49470ad07..bfa12b1755 100644 --- a/tests/components/spi/test.esp32-c3-ard.yaml +++ b/tests/components/spi/test.esp32-c3-ard.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/spi/test.esp32-c3-idf.yaml b/tests/components/spi/test.esp32-c3-idf.yaml index f49470ad07..bfa12b1755 100644 --- a/tests/components/spi/test.esp32-c3-idf.yaml +++ b/tests/components/spi/test.esp32-c3-idf.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/spi/test.esp32-idf.yaml b/tests/components/spi/test.esp32-idf.yaml index 1cdcf461dd..448e54fea6 100644 --- a/tests/components/spi/test.esp32-idf.yaml +++ b/tests/components/spi/test.esp32-idf.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 + +<<: !include common.yaml diff --git a/tests/components/spi/test.esp32-s3-idf.yaml b/tests/components/spi/test.esp32-s3-idf.yaml index 8db934023a..d394c5d7a4 100644 --- a/tests/components/spi/test.esp32-s3-idf.yaml +++ b/tests/components/spi/test.esp32-s3-idf.yaml @@ -9,8 +9,8 @@ spi: interface: hardware - id: quad_spi type: quad - clk_pin: 47 interface: spi3 + clk_pin: 47 data_pins: - number: 40 allow_other_uses: false @@ -18,7 +18,7 @@ spi: - 42 - 43 - id: spi_id_3 + interface: any clk_pin: 8 mosi_pin: 9 - interface: any diff --git a/tests/components/spi/test.esp8266-ard.yaml b/tests/components/spi/test.esp8266-ard.yaml index 83f110921f..b9545d4f6a 100644 --- a/tests/components/spi/test.esp8266-ard.yaml +++ b/tests/components/spi/test.esp8266-ard.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + +<<: !include common.yaml diff --git a/tests/components/spi/test.rp2040-ard.yaml b/tests/components/spi/test.rp2040-ard.yaml index 1e39d247fe..81a8acafd8 100644 --- a/tests/components/spi/test.rp2040-ard.yaml +++ b/tests/components/spi/test.rp2040-ard.yaml @@ -1,5 +1,6 @@ -spi: - - id: spi_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/spi_device/common.yaml b/tests/components/spi_device/common.yaml new file mode 100644 index 0000000000..636d82202b --- /dev/null +++ b/tests/components/spi_device/common.yaml @@ -0,0 +1,11 @@ +spi: + - id: spi_device1 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +spi_device: + id: spi_device_test + data_rate: 2MHz + spi_mode: 3 + bit_order: lsb_first diff --git a/tests/components/spi_device/test.esp32-ard.yaml b/tests/components/spi_device/test.esp32-ard.yaml index b539cb3ec4..448e54fea6 100644 --- a/tests/components/spi_device/test.esp32-ard.yaml +++ b/tests/components/spi_device/test.esp32-ard.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_device/test.esp32-c3-ard.yaml b/tests/components/spi_device/test.esp32-c3-ard.yaml index 99c0ac1ebb..bfa12b1755 100644 --- a/tests/components/spi_device/test.esp32-c3-ard.yaml +++ b/tests/components/spi_device/test.esp32-c3-ard.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_device/test.esp32-c3-idf.yaml b/tests/components/spi_device/test.esp32-c3-idf.yaml index 99c0ac1ebb..bfa12b1755 100644 --- a/tests/components/spi_device/test.esp32-c3-idf.yaml +++ b/tests/components/spi_device/test.esp32-c3-idf.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_device/test.esp32-idf.yaml b/tests/components/spi_device/test.esp32-idf.yaml index b539cb3ec4..448e54fea6 100644 --- a/tests/components/spi_device/test.esp32-idf.yaml +++ b/tests/components/spi_device/test.esp32-idf.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO15 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_device/test.esp8266-ard.yaml b/tests/components/spi_device/test.esp8266-ard.yaml index 988825ce2d..b9545d4f6a 100644 --- a/tests/components/spi_device/test.esp8266-ard.yaml +++ b/tests/components/spi_device/test.esp8266-ard.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_device/test.rp2040-ard.yaml b/tests/components/spi_device/test.rp2040-ard.yaml index 6020643f21..81a8acafd8 100644 --- a/tests/components/spi_device/test.rp2040-ard.yaml +++ b/tests/components/spi_device/test.rp2040-ard.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_device1 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 -spi_device: - id: spi_device_test - data_rate: 2MHz - spi_mode: 3 - bit_order: lsb_first +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/common.yaml b/tests/components/spi_led_strip/common.yaml new file mode 100644 index 0000000000..80b98a63a4 --- /dev/null +++ b/tests/components/spi_led_strip/common.yaml @@ -0,0 +1,12 @@ +spi: + - id: spi_spi_led_strip + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +light: + - platform: spi_led_strip + num_leds: 4 + color_correct: [80%, 60%, 100%] + id: rgb_led + name: RGB LED + data_rate: 8MHz diff --git a/tests/components/spi_led_strip/test.esp32-ard.yaml b/tests/components/spi_led_strip/test.esp32-ard.yaml index f4a760bf4c..8906602ef4 100644 --- a/tests/components/spi_led_strip/test.esp32-ard.yaml +++ b/tests/components/spi_led_strip/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp32-c3-ard.yaml b/tests/components/spi_led_strip/test.esp32-c3-ard.yaml index 983ad2863f..a85b587070 100644 --- a/tests/components/spi_led_strip/test.esp32-c3-ard.yaml +++ b/tests/components/spi_led_strip/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp32-c3-idf.yaml b/tests/components/spi_led_strip/test.esp32-c3-idf.yaml index 983ad2863f..a85b587070 100644 --- a/tests/components/spi_led_strip/test.esp32-c3-idf.yaml +++ b/tests/components/spi_led_strip/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp32-idf.yaml b/tests/components/spi_led_strip/test.esp32-idf.yaml index f4a760bf4c..8906602ef4 100644 --- a/tests/components/spi_led_strip/test.esp32-idf.yaml +++ b/tests/components/spi_led_strip/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp8266-ard.yaml b/tests/components/spi_led_strip/test.esp8266-ard.yaml index 8e76303b6a..7baaa62ed5 100644 --- a/tests/components/spi_led_strip/test.esp8266-ard.yaml +++ b/tests/components/spi_led_strip/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.rp2040-ard.yaml b/tests/components/spi_led_strip/test.rp2040-ard.yaml index 9d12f1592b..411cfbe00e 100644 --- a/tests/components/spi_led_strip/test.rp2040-ard.yaml +++ b/tests/components/spi_led_strip/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -spi: - - id: spi_spi_led_strip - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 -light: - - platform: spi_led_strip - num_leds: 4 - color_correct: [80%, 60%, 100%] - id: rgb_led - name: "RGB LED" - data_rate: 8MHz +<<: !include common.yaml diff --git a/tests/components/sps30/common.yaml b/tests/components/sps30/common.yaml new file mode 100644 index 0000000000..2fbe2c747a --- /dev/null +++ b/tests/components/sps30/common.yaml @@ -0,0 +1,36 @@ +i2c: + - id: i2c_sps30 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sps30 + pm_1_0: + name: Workshop PM <1µm Weight concentration + id: workshop_PM_1_0 + pm_2_5: + name: Workshop PM <2.5µm Weight concentration + id: workshop_PM_2_5 + pm_4_0: + name: Workshop PM <4µm Weight concentration + id: workshop_PM_4_0 + pm_10_0: + name: Workshop PM <10µm Weight concentration + id: workshop_PM_10_0 + pmc_0_5: + name: Workshop PM <0.5µm Number concentration + id: workshop_PMC_0_5 + pmc_1_0: + name: Workshop PM <1µm Number concentration + id: workshop_PMC_1_0 + pmc_2_5: + name: Workshop PM <2.5µm Number concentration + id: workshop_PMC_2_5 + pmc_4_0: + name: Workshop PM <4µm Number concentration + id: workshop_PMC_4_0 + pmc_10_0: + name: Workshop PM <10µm Number concentration + id: workshop_PMC_10_0 + address: 0x69 + update_interval: 10s diff --git a/tests/components/sps30/test.esp32-ard.yaml b/tests/components/sps30/test.esp32-ard.yaml index f9d1ee4e55..63c3bd6afd 100644 --- a/tests/components/sps30/test.esp32-ard.yaml +++ b/tests/components/sps30/test.esp32-ard.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sps30/test.esp32-c3-ard.yaml b/tests/components/sps30/test.esp32-c3-ard.yaml index e071a00936..ee2c29ca4e 100644 --- a/tests/components/sps30/test.esp32-c3-ard.yaml +++ b/tests/components/sps30/test.esp32-c3-ard.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sps30/test.esp32-c3-idf.yaml b/tests/components/sps30/test.esp32-c3-idf.yaml index e071a00936..ee2c29ca4e 100644 --- a/tests/components/sps30/test.esp32-c3-idf.yaml +++ b/tests/components/sps30/test.esp32-c3-idf.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sps30/test.esp32-idf.yaml b/tests/components/sps30/test.esp32-idf.yaml index f9d1ee4e55..63c3bd6afd 100644 --- a/tests/components/sps30/test.esp32-idf.yaml +++ b/tests/components/sps30/test.esp32-idf.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sps30/test.esp8266-ard.yaml b/tests/components/sps30/test.esp8266-ard.yaml index e071a00936..ee2c29ca4e 100644 --- a/tests/components/sps30/test.esp8266-ard.yaml +++ b/tests/components/sps30/test.esp8266-ard.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/sps30/test.rp2040-ard.yaml b/tests/components/sps30/test.rp2040-ard.yaml index e071a00936..ee2c29ca4e 100644 --- a/tests/components/sps30/test.rp2040-ard.yaml +++ b/tests/components/sps30/test.rp2040-ard.yaml @@ -1,36 +1,5 @@ -i2c: - - id: i2c_sps30 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sps30 - pm_1_0: - name: Workshop PM <1µm Weight concentration - id: workshop_PM_1_0 - pm_2_5: - name: Workshop PM <2.5µm Weight concentration - id: workshop_PM_2_5 - pm_4_0: - name: Workshop PM <4µm Weight concentration - id: workshop_PM_4_0 - pm_10_0: - name: Workshop PM <10µm Weight concentration - id: workshop_PM_10_0 - pmc_0_5: - name: Workshop PM <0.5µm Number concentration - id: workshop_PMC_0_5 - pmc_1_0: - name: Workshop PM <1µm Number concentration - id: workshop_PMC_1_0 - pmc_2_5: - name: Workshop PM <2.5µm Number concentration - id: workshop_PMC_2_5 - pmc_4_0: - name: Workshop PM <4µm Number concentration - id: workshop_PMC_4_0 - pmc_10_0: - name: Workshop PM <10µm Number concentration - id: workshop_PMC_10_0 - address: 0x69 - update_interval: 10s +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/common.yaml b/tests/components/ssd1306_i2c/common.yaml new file mode 100644 index 0000000000..d17f83f03a --- /dev/null +++ b/tests/components/ssd1306_i2c/common.yaml @@ -0,0 +1,25 @@ +i2c: + - id: i2c_ssd1306_i2c + scl: ${scl_pin} + sda: ${sda_pin} + +display: + - platform: ssd1306_i2c + model: SSD1306_128X64 + reset_pin: ${reset_pin} + address: 0x3C + id: display1 + contrast: 60% + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, 10, 10); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1306_i2c/test.esp32-ard.yaml b/tests/components/ssd1306_i2c/test.esp32-ard.yaml index dddc67309c..1ca773e06c 100644 --- a/tests/components/ssd1306_i2c/test.esp32-ard.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-ard.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp32-c3-ard.yaml b/tests/components/ssd1306_i2c/test.esp32-c3-ard.yaml index f4a301db51..4eaff7fa4a 100644 --- a/tests/components/ssd1306_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-c3-ard.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml b/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml index f4a301db51..4eaff7fa4a 100644 --- a/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp32-idf.yaml b/tests/components/ssd1306_i2c/test.esp32-idf.yaml index dddc67309c..1ca773e06c 100644 --- a/tests/components/ssd1306_i2c/test.esp32-idf.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-idf.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp8266-ard.yaml b/tests/components/ssd1306_i2c/test.esp8266-ard.yaml index f4a301db51..af91c21a0d 100644 --- a/tests/components/ssd1306_i2c/test.esp8266-ard.yaml +++ b/tests/components/ssd1306_i2c/test.esp8266-ard.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO2 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.rp2040-ard.yaml b/tests/components/ssd1306_i2c/test.rp2040-ard.yaml index f4a301db51..4eaff7fa4a 100644 --- a/tests/components/ssd1306_i2c/test.rp2040-ard.yaml +++ b/tests/components/ssd1306_i2c/test.rp2040-ard.yaml @@ -1,25 +1,6 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1306_i2c - model: SSD1306_128X64 - reset_pin: 3 - address: 0x3C - id: display1 - contrast: 60% - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/common.yaml b/tests/components/ssd1306_spi/common.yaml new file mode 100644 index 0000000000..71705f32d2 --- /dev/null +++ b/tests/components/ssd1306_spi/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_ssd1306_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1306_spi + model: SSD1306 128x64 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1306_spi/test.esp32-ard.yaml b/tests/components/ssd1306_spi/test.esp32-ard.yaml index b0e5e0f1a2..bad5241f79 100644 --- a/tests/components/ssd1306_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1306_spi/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1306_spi/test.esp32-c3-ard.yaml index 01b2d0e4a8..c5c932c92c 100644 --- a/tests/components/ssd1306_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1306_spi/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml index 01b2d0e4a8..c5c932c92c 100644 --- a/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp32-idf.yaml b/tests/components/ssd1306_spi/test.esp32-idf.yaml index b0e5e0f1a2..bad5241f79 100644 --- a/tests/components/ssd1306_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1306_spi/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp8266-ard.yaml b/tests/components/ssd1306_spi/test.esp8266-ard.yaml index 135e364bb2..3f023a60eb 100644 --- a/tests/components/ssd1306_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1306_spi/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.rp2040-ard.yaml b/tests/components/ssd1306_spi/test.rp2040-ard.yaml index 94c4b85158..d7fd6ee294 100644 --- a/tests/components/ssd1306_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1306_spi/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1306_spi - model: SSD1306 128x64 - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/common.yaml b/tests/components/ssd1322_spi/common.yaml new file mode 100644 index 0000000000..b67392794c --- /dev/null +++ b/tests/components/ssd1322_spi/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_ssd1322_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1322_spi + model: SSD1322 256x64 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1322_spi/test.esp32-ard.yaml b/tests/components/ssd1322_spi/test.esp32-ard.yaml index aa6d0fbf01..bad5241f79 100644 --- a/tests/components/ssd1322_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1322_spi/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1322_spi/test.esp32-c3-ard.yaml index 4fa9f86594..c5c932c92c 100644 --- a/tests/components/ssd1322_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1322_spi/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml index 4fa9f86594..c5c932c92c 100644 --- a/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp32-idf.yaml b/tests/components/ssd1322_spi/test.esp32-idf.yaml index aa6d0fbf01..bad5241f79 100644 --- a/tests/components/ssd1322_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1322_spi/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp8266-ard.yaml b/tests/components/ssd1322_spi/test.esp8266-ard.yaml index a5aa565c09..3f023a60eb 100644 --- a/tests/components/ssd1322_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1322_spi/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.rp2040-ard.yaml b/tests/components/ssd1322_spi/test.rp2040-ard.yaml index 59544e7878..d7fd6ee294 100644 --- a/tests/components/ssd1322_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1322_spi/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1322_spi - model: SSD1322 256x64 - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/common.yaml b/tests/components/ssd1325_spi/common.yaml new file mode 100644 index 0000000000..eaa8b619ca --- /dev/null +++ b/tests/components/ssd1325_spi/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_ssd1325_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1325_spi + model: SSD1325 128x64 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1325_spi/test.esp32-ard.yaml b/tests/components/ssd1325_spi/test.esp32-ard.yaml index 84d94eff28..bad5241f79 100644 --- a/tests/components/ssd1325_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1325_spi/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1325_spi/test.esp32-c3-ard.yaml index 0fa8cb6488..c5c932c92c 100644 --- a/tests/components/ssd1325_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1325_spi/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml index 0fa8cb6488..c5c932c92c 100644 --- a/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp32-idf.yaml b/tests/components/ssd1325_spi/test.esp32-idf.yaml index 84d94eff28..bad5241f79 100644 --- a/tests/components/ssd1325_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1325_spi/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp8266-ard.yaml b/tests/components/ssd1325_spi/test.esp8266-ard.yaml index 9d7e483585..3f023a60eb 100644 --- a/tests/components/ssd1325_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1325_spi/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.rp2040-ard.yaml b/tests/components/ssd1325_spi/test.rp2040-ard.yaml index 869663c19d..d7fd6ee294 100644 --- a/tests/components/ssd1325_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1325_spi/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1325_spi - model: SSD1325 128x64 - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/common.yaml b/tests/components/ssd1327_i2c/common.yaml new file mode 100644 index 0000000000..72a122c3d7 --- /dev/null +++ b/tests/components/ssd1327_i2c/common.yaml @@ -0,0 +1,24 @@ +i2c: + - id: i2c_ssd1327_i2c + scl: ${scl_pin} + sda: ${sda_pin} + +display: + - platform: ssd1327_i2c + model: SSD1327_128x128 + reset_pin: ${reset_pin} + address: 0x3C + id: display1 + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, 10, 10); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1327_i2c/test.esp32-ard.yaml b/tests/components/ssd1327_i2c/test.esp32-ard.yaml index e72a9c7b7a..1ca773e06c 100644 --- a/tests/components/ssd1327_i2c/test.esp32-ard.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-ard.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp32-c3-ard.yaml b/tests/components/ssd1327_i2c/test.esp32-c3-ard.yaml index cd28795ff1..4eaff7fa4a 100644 --- a/tests/components/ssd1327_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-c3-ard.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml b/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml index cd28795ff1..4eaff7fa4a 100644 --- a/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp32-idf.yaml b/tests/components/ssd1327_i2c/test.esp32-idf.yaml index e72a9c7b7a..1ca773e06c 100644 --- a/tests/components/ssd1327_i2c/test.esp32-idf.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-idf.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp8266-ard.yaml b/tests/components/ssd1327_i2c/test.esp8266-ard.yaml index cd28795ff1..af91c21a0d 100644 --- a/tests/components/ssd1327_i2c/test.esp8266-ard.yaml +++ b/tests/components/ssd1327_i2c/test.esp8266-ard.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO2 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.rp2040-ard.yaml b/tests/components/ssd1327_i2c/test.rp2040-ard.yaml index cd28795ff1..4eaff7fa4a 100644 --- a/tests/components/ssd1327_i2c/test.rp2040-ard.yaml +++ b/tests/components/ssd1327_i2c/test.rp2040-ard.yaml @@ -1,24 +1,6 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: ssd1327_i2c - model: SSD1327_128x128 - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/common.yaml b/tests/components/ssd1327_spi/common.yaml new file mode 100644 index 0000000000..85f4d4736b --- /dev/null +++ b/tests/components/ssd1327_spi/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_ssd1327_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1327_spi + model: SSD1327 128x128 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1327_spi/test.esp32-ard.yaml b/tests/components/ssd1327_spi/test.esp32-ard.yaml index e103ded187..bad5241f79 100644 --- a/tests/components/ssd1327_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1327_spi/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1327_spi/test.esp32-c3-ard.yaml index ec5795d716..c5c932c92c 100644 --- a/tests/components/ssd1327_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1327_spi/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml index ec5795d716..c5c932c92c 100644 --- a/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp32-idf.yaml b/tests/components/ssd1327_spi/test.esp32-idf.yaml index e103ded187..bad5241f79 100644 --- a/tests/components/ssd1327_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1327_spi/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp8266-ard.yaml b/tests/components/ssd1327_spi/test.esp8266-ard.yaml index 30455d24ee..3f023a60eb 100644 --- a/tests/components/ssd1327_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1327_spi/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.rp2040-ard.yaml b/tests/components/ssd1327_spi/test.rp2040-ard.yaml index f819ab2c41..d7fd6ee294 100644 --- a/tests/components/ssd1327_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1327_spi/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1327_spi - model: SSD1327 128x128 - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/common.yaml b/tests/components/ssd1331_spi/common.yaml new file mode 100644 index 0000000000..40726101e8 --- /dev/null +++ b/tests/components/ssd1331_spi/common.yaml @@ -0,0 +1,23 @@ +spi: + - id: spi_ssd1331_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1331_spi + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1331_spi/test.esp32-ard.yaml b/tests/components/ssd1331_spi/test.esp32-ard.yaml index e9eb8ea9ad..bad5241f79 100644 --- a/tests/components/ssd1331_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1331_spi/test.esp32-ard.yaml @@ -1,24 +1,8 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1331_spi - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1331_spi/test.esp32-c3-ard.yaml index 9a35918faf..c5c932c92c 100644 --- a/tests/components/ssd1331_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1331_spi/test.esp32-c3-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1331_spi - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml index 9a35918faf..c5c932c92c 100644 --- a/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1331_spi - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp32-idf.yaml b/tests/components/ssd1331_spi/test.esp32-idf.yaml index e9eb8ea9ad..bad5241f79 100644 --- a/tests/components/ssd1331_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1331_spi/test.esp32-idf.yaml @@ -1,24 +1,8 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1331_spi - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp8266-ard.yaml b/tests/components/ssd1331_spi/test.esp8266-ard.yaml index 3b319ef38e..3f023a60eb 100644 --- a/tests/components/ssd1331_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1331_spi/test.esp8266-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1331_spi - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.rp2040-ard.yaml b/tests/components/ssd1331_spi/test.rp2040-ard.yaml index 947685b07a..d7fd6ee294 100644 --- a/tests/components/ssd1331_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1331_spi/test.rp2040-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1331_spi - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/common.yaml b/tests/components/ssd1351_spi/common.yaml new file mode 100644 index 0000000000..fa495ff0c3 --- /dev/null +++ b/tests/components/ssd1351_spi/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_ssd1351_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: ssd1351_spi + model: "SSD1351 128x128" + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1351_spi/test.esp32-ard.yaml b/tests/components/ssd1351_spi/test.esp32-ard.yaml index 8342cb972b..bad5241f79 100644 --- a/tests/components/ssd1351_spi/test.esp32-ard.yaml +++ b/tests/components/ssd1351_spi/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp32-c3-ard.yaml b/tests/components/ssd1351_spi/test.esp32-c3-ard.yaml index 2a7266f502..c5c932c92c 100644 --- a/tests/components/ssd1351_spi/test.esp32-c3-ard.yaml +++ b/tests/components/ssd1351_spi/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml index 2a7266f502..c5c932c92c 100644 --- a/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp32-idf.yaml b/tests/components/ssd1351_spi/test.esp32-idf.yaml index 8342cb972b..bad5241f79 100644 --- a/tests/components/ssd1351_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1351_spi/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp8266-ard.yaml b/tests/components/ssd1351_spi/test.esp8266-ard.yaml index 7ed9a31dde..3f023a60eb 100644 --- a/tests/components/ssd1351_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1351_spi/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.rp2040-ard.yaml b/tests/components/ssd1351_spi/test.rp2040-ard.yaml index 72936d046b..d7fd6ee294 100644 --- a/tests/components/ssd1351_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1351_spi/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: ssd1351_spi - model: "SSD1351 128x128" - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/common.yaml b/tests/components/st7567_i2c/common.yaml new file mode 100644 index 0000000000..41c65e5110 --- /dev/null +++ b/tests/components/st7567_i2c/common.yaml @@ -0,0 +1,23 @@ +i2c: + - id: i2c_st7567_i2c + scl: ${scl_pin} + sda: ${sda_pin} + +display: + - platform: st7567_i2c + reset_pin: ${reset_pin} + address: 0x3C + id: display1 + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, 10, 10); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7567_i2c/test.esp32-ard.yaml b/tests/components/st7567_i2c/test.esp32-ard.yaml index b7aee61b68..1ca773e06c 100644 --- a/tests/components/st7567_i2c/test.esp32-ard.yaml +++ b/tests/components/st7567_i2c/test.esp32-ard.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp32-c3-ard.yaml b/tests/components/st7567_i2c/test.esp32-c3-ard.yaml index d779040500..4eaff7fa4a 100644 --- a/tests/components/st7567_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/st7567_i2c/test.esp32-c3-ard.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp32-c3-idf.yaml b/tests/components/st7567_i2c/test.esp32-c3-idf.yaml index d779040500..4eaff7fa4a 100644 --- a/tests/components/st7567_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/st7567_i2c/test.esp32-c3-idf.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp32-idf.yaml b/tests/components/st7567_i2c/test.esp32-idf.yaml index b7aee61b68..1ca773e06c 100644 --- a/tests/components/st7567_i2c/test.esp32-idf.yaml +++ b/tests/components/st7567_i2c/test.esp32-idf.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + reset_pin: GPIO15 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp8266-ard.yaml b/tests/components/st7567_i2c/test.esp8266-ard.yaml index d779040500..af91c21a0d 100644 --- a/tests/components/st7567_i2c/test.esp8266-ard.yaml +++ b/tests/components/st7567_i2c/test.esp8266-ard.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO2 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.rp2040-ard.yaml b/tests/components/st7567_i2c/test.rp2040-ard.yaml index d779040500..4eaff7fa4a 100644 --- a/tests/components/st7567_i2c/test.rp2040-ard.yaml +++ b/tests/components/st7567_i2c/test.rp2040-ard.yaml @@ -1,23 +1,6 @@ -i2c: - - id: i2c_st7567_i2c - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + reset_pin: GPIO3 -display: - - platform: st7567_i2c - reset_pin: 3 - address: 0x3C - id: display1 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, 10, 10); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/common.yaml b/tests/components/st7567_spi/common.yaml new file mode 100644 index 0000000000..037a700239 --- /dev/null +++ b/tests/components/st7567_spi/common.yaml @@ -0,0 +1,23 @@ +spi: + - id: spi_st7567_spi + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: st7567_spi + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7567_spi/test.esp32-ard.yaml b/tests/components/st7567_spi/test.esp32-ard.yaml index bb4530248f..bad5241f79 100644 --- a/tests/components/st7567_spi/test.esp32-ard.yaml +++ b/tests/components/st7567_spi/test.esp32-ard.yaml @@ -1,24 +1,8 @@ -spi: - - id: spi_st7567_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7567_spi - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp32-c3-ard.yaml b/tests/components/st7567_spi/test.esp32-c3-ard.yaml index b799ce7302..c5c932c92c 100644 --- a/tests/components/st7567_spi/test.esp32-c3-ard.yaml +++ b/tests/components/st7567_spi/test.esp32-c3-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_st7567_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7567_spi - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp32-c3-idf.yaml b/tests/components/st7567_spi/test.esp32-c3-idf.yaml index b799ce7302..c5c932c92c 100644 --- a/tests/components/st7567_spi/test.esp32-c3-idf.yaml +++ b/tests/components/st7567_spi/test.esp32-c3-idf.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_st7567_spi - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7567_spi - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp32-idf.yaml b/tests/components/st7567_spi/test.esp32-idf.yaml index bb4530248f..bad5241f79 100644 --- a/tests/components/st7567_spi/test.esp32-idf.yaml +++ b/tests/components/st7567_spi/test.esp32-idf.yaml @@ -1,24 +1,8 @@ -spi: - - id: spi_st7567_spi - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7567_spi - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp8266-ard.yaml b/tests/components/st7567_spi/test.esp8266-ard.yaml index bbc47e67f6..3f023a60eb 100644 --- a/tests/components/st7567_spi/test.esp8266-ard.yaml +++ b/tests/components/st7567_spi/test.esp8266-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_st7567_spi - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7567_spi - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7567_spi/test.rp2040-ard.yaml b/tests/components/st7567_spi/test.rp2040-ard.yaml index 1b491101a8..d7fd6ee294 100644 --- a/tests/components/st7567_spi/test.rp2040-ard.yaml +++ b/tests/components/st7567_spi/test.rp2040-ard.yaml @@ -1,24 +1,9 @@ -spi: - - id: spi_st7567_spi - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7567_spi - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7701s/common.yaml b/tests/components/st7701s/common.yaml index 6e4fccc9cb..b94fadfe52 100644 --- a/tests/components/st7701s/common.yaml +++ b/tests/components/st7701s/common.yaml @@ -1,21 +1,7 @@ -psram: - mode: octal - speed: 80MHz spi: - - id: lcd_spi - clk_pin: 41 - mosi_pin: 48 - -i2c: - sda: 39 - scl: 40 - scan: false - id: bus_a - -pca9554: - - id: p_c_a - pin_count: 16 - address: 0x20 + - id: spi_st7701s + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} display: - platform: st7701s @@ -28,16 +14,12 @@ display: transform: mirror_x: true mirror_y: true - cs_pin: - pca9554: p_c_a - number: 4 - reset_pin: - pca9554: p_c_a - number: 5 - de_pin: 18 - hsync_pin: 16 - vsync_pin: 17 - pclk_pin: 21 + cs_pin: ${cs_pin} + reset_pin: ${reset_pin} + de_pin: ${de_pin} + hsync_pin: ${hsync_pin} + vsync_pin: ${vsync_pin} + pclk_pin: ${pclk_pin} init_sequence: - 1 - [0x23, 0xA, 0xB] @@ -45,13 +27,11 @@ display: - [0x23, 0xA, 0xB] - delay 0.2s data_pins: - - number: 0 - ignore_strapping_warning: true + - 0 - 1 - 2 - 3 - - number: 4 - ignore_strapping_warning: false + - 4 - 5 - 6 - 7 diff --git a/tests/components/st7701s/test.esp32-s3-idf.yaml b/tests/components/st7701s/test.esp32-s3-idf.yaml index dade44d145..cd09b31f6e 100644 --- a/tests/components/st7701s/test.esp32-s3-idf.yaml +++ b/tests/components/st7701s/test.esp32-s3-idf.yaml @@ -1 +1,11 @@ +substitutions: + clk_pin: GPIO41 + mosi_pin: GPIO48 + cs_pin: GPIO44 + de_pin: GPIO18 + reset_pin: GPIO47 + hsync_pin: GPIO16 + vsync_pin: GPIO17 + pclk_pin: GPIO21 + <<: !include common.yaml diff --git a/tests/components/st7735/common.yaml b/tests/components/st7735/common.yaml new file mode 100644 index 0000000000..c140652eda --- /dev/null +++ b/tests/components/st7735/common.yaml @@ -0,0 +1,28 @@ +spi: + - id: spi_st7735 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: st7735 + model: INITR_18BLACKTAB + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + device_width: 128 + device_height: 160 + col_start: 0 + row_start: 0 + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7735/test.esp32-ard.yaml b/tests/components/st7735/test.esp32-ard.yaml index fd3f6cade6..bad5241f79 100644 --- a/tests/components/st7735/test.esp32-ard.yaml +++ b/tests/components/st7735/test.esp32-ard.yaml @@ -1,29 +1,8 @@ -spi: - - id: spi_st7735 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7735/test.esp32-c3-ard.yaml b/tests/components/st7735/test.esp32-c3-ard.yaml index fc6c2421c4..c5c932c92c 100644 --- a/tests/components/st7735/test.esp32-c3-ard.yaml +++ b/tests/components/st7735/test.esp32-c3-ard.yaml @@ -1,29 +1,9 @@ -spi: - - id: spi_st7735 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7735/test.esp32-c3-idf.yaml b/tests/components/st7735/test.esp32-c3-idf.yaml index fc6c2421c4..c5c932c92c 100644 --- a/tests/components/st7735/test.esp32-c3-idf.yaml +++ b/tests/components/st7735/test.esp32-c3-idf.yaml @@ -1,29 +1,9 @@ -spi: - - id: spi_st7735 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 2 - dc_pin: 3 - reset_pin: 4 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7735/test.esp32-idf.yaml b/tests/components/st7735/test.esp32-idf.yaml index fd3f6cade6..bad5241f79 100644 --- a/tests/components/st7735/test.esp32-idf.yaml +++ b/tests/components/st7735/test.esp32-idf.yaml @@ -1,29 +1,8 @@ -spi: - - id: spi_st7735 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7735/test.esp8266-ard.yaml b/tests/components/st7735/test.esp8266-ard.yaml index ea8fa93c36..3f023a60eb 100644 --- a/tests/components/st7735/test.esp8266-ard.yaml +++ b/tests/components/st7735/test.esp8266-ard.yaml @@ -1,29 +1,9 @@ -spi: - - id: spi_st7735 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7735/test.rp2040-ard.yaml b/tests/components/st7735/test.rp2040-ard.yaml index 828f9a3ae1..d7fd6ee294 100644 --- a/tests/components/st7735/test.rp2040-ard.yaml +++ b/tests/components/st7735/test.rp2040-ard.yaml @@ -1,29 +1,9 @@ -spi: - - id: spi_st7735 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7735 - model: "INITR_18BLACKTAB" - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - device_width: 128 - device_height: 160 - col_start: 0 - row_start: 0 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/common.yaml b/tests/components/st7789v/common.yaml new file mode 100644 index 0000000000..d5f74809e0 --- /dev/null +++ b/tests/components/st7789v/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_st7789v + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: st7789v + model: TTGO TDisplay 135x240 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7789v/test.esp32-ard.yaml b/tests/components/st7789v/test.esp32-ard.yaml index 54a9db6da1..bad5241f79 100644 --- a/tests/components/st7789v/test.esp32-ard.yaml +++ b/tests/components/st7789v/test.esp32-ard.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_st7789v - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/test.esp32-c3-ard.yaml b/tests/components/st7789v/test.esp32-c3-ard.yaml index 1cb8d22fcb..c5c932c92c 100644 --- a/tests/components/st7789v/test.esp32-c3-ard.yaml +++ b/tests/components/st7789v/test.esp32-c3-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_st7789v - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 2 - dc_pin: 3 - reset_pin: 8 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/test.esp32-c3-idf.yaml b/tests/components/st7789v/test.esp32-c3-idf.yaml index 1cb8d22fcb..c5c932c92c 100644 --- a/tests/components/st7789v/test.esp32-c3-idf.yaml +++ b/tests/components/st7789v/test.esp32-c3-idf.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_st7789v - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 2 - dc_pin: 3 - reset_pin: 8 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/test.esp32-idf.yaml b/tests/components/st7789v/test.esp32-idf.yaml index 54a9db6da1..bad5241f79 100644 --- a/tests/components/st7789v/test.esp32-idf.yaml +++ b/tests/components/st7789v/test.esp32-idf.yaml @@ -1,25 +1,8 @@ -spi: - - id: spi_st7789v - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/test.esp8266-ard.yaml b/tests/components/st7789v/test.esp8266-ard.yaml index deeceb8c9a..3f023a60eb 100644 --- a/tests/components/st7789v/test.esp8266-ard.yaml +++ b/tests/components/st7789v/test.esp8266-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_st7789v - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7789v/test.rp2040-ard.yaml b/tests/components/st7789v/test.rp2040-ard.yaml index 778aa2aa55..d7fd6ee294 100644 --- a/tests/components/st7789v/test.rp2040-ard.yaml +++ b/tests/components/st7789v/test.rp2040-ard.yaml @@ -1,25 +1,9 @@ -spi: - - id: spi_st7789v - clk_pin: 2 - mosi_pin: 3 - miso_pin: 8 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: st7789v - model: TTGO TDisplay 135x240 - cs_pin: 5 - dc_pin: 6 - reset_pin: 7 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/common.yaml b/tests/components/st7920/common.yaml new file mode 100644 index 0000000000..9ede271f01 --- /dev/null +++ b/tests/components/st7920/common.yaml @@ -0,0 +1,23 @@ +spi: + - id: spi_st7920 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: st7920 + cs_pin: ${cs_pin} + height: 128 + width: 64 + pages: + - id: page1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - id: page2 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + on_page_change: + from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7920/test.esp32-ard.yaml b/tests/components/st7920/test.esp32-ard.yaml index cdcbc85642..04d2633d2b 100644 --- a/tests/components/st7920/test.esp32-ard.yaml +++ b/tests/components/st7920/test.esp32-ard.yaml @@ -1,24 +1,6 @@ -spi: - - id: spi_st7920 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 -display: - - platform: st7920 - cs_pin: 12 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/test.esp32-c3-ard.yaml b/tests/components/st7920/test.esp32-c3-ard.yaml index 84ae88461f..2415ba5dc6 100644 --- a/tests/components/st7920/test.esp32-c3-ard.yaml +++ b/tests/components/st7920/test.esp32-c3-ard.yaml @@ -1,24 +1,7 @@ -spi: - - id: spi_st7920 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -display: - - platform: st7920 - cs_pin: 2 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/test.esp32-c3-idf.yaml b/tests/components/st7920/test.esp32-c3-idf.yaml index 84ae88461f..2415ba5dc6 100644 --- a/tests/components/st7920/test.esp32-c3-idf.yaml +++ b/tests/components/st7920/test.esp32-c3-idf.yaml @@ -1,24 +1,7 @@ -spi: - - id: spi_st7920 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -display: - - platform: st7920 - cs_pin: 2 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/test.esp32-idf.yaml b/tests/components/st7920/test.esp32-idf.yaml index cdcbc85642..04d2633d2b 100644 --- a/tests/components/st7920/test.esp32-idf.yaml +++ b/tests/components/st7920/test.esp32-idf.yaml @@ -1,24 +1,6 @@ -spi: - - id: spi_st7920 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO12 -display: - - platform: st7920 - cs_pin: 12 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/test.esp8266-ard.yaml b/tests/components/st7920/test.esp8266-ard.yaml index 0450bf1c5e..bd5c203e35 100644 --- a/tests/components/st7920/test.esp8266-ard.yaml +++ b/tests/components/st7920/test.esp8266-ard.yaml @@ -1,24 +1,7 @@ -spi: - - id: spi_st7920 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 -display: - - platform: st7920 - cs_pin: 15 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/st7920/test.rp2040-ard.yaml b/tests/components/st7920/test.rp2040-ard.yaml index f442820e7b..f6c3f1eeca 100644 --- a/tests/components/st7920/test.rp2040-ard.yaml +++ b/tests/components/st7920/test.rp2040-ard.yaml @@ -1,24 +1,7 @@ -spi: - - id: spi_st7920 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 -display: - - platform: st7920 - cs_pin: 5 - height: 128 - width: 64 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - on_page_change: - from: page1 - to: page2 - then: - lambda: |- - ESP_LOGD("display", "1 -> 2"); +<<: !include common.yaml diff --git a/tests/components/sts3x/common.yaml b/tests/components/sts3x/common.yaml new file mode 100644 index 0000000000..1feac4bc3f --- /dev/null +++ b/tests/components/sts3x/common.yaml @@ -0,0 +1,10 @@ +i2c: + - id: i2c_sts3x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: sts3x + id: sts3x_sensor + name: STS3X Temperature + address: 0x4A diff --git a/tests/components/sts3x/test.esp32-ard.yaml b/tests/components/sts3x/test.esp32-ard.yaml index a74d61e748..63c3bd6afd 100644 --- a/tests/components/sts3x/test.esp32-ard.yaml +++ b/tests/components/sts3x/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sts3x/test.esp32-c3-ard.yaml b/tests/components/sts3x/test.esp32-c3-ard.yaml index 87980ce3a7..ee2c29ca4e 100644 --- a/tests/components/sts3x/test.esp32-c3-ard.yaml +++ b/tests/components/sts3x/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sts3x/test.esp32-c3-idf.yaml b/tests/components/sts3x/test.esp32-c3-idf.yaml index 87980ce3a7..ee2c29ca4e 100644 --- a/tests/components/sts3x/test.esp32-c3-idf.yaml +++ b/tests/components/sts3x/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sts3x/test.esp32-idf.yaml b/tests/components/sts3x/test.esp32-idf.yaml index a74d61e748..63c3bd6afd 100644 --- a/tests/components/sts3x/test.esp32-idf.yaml +++ b/tests/components/sts3x/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sts3x/test.esp8266-ard.yaml b/tests/components/sts3x/test.esp8266-ard.yaml index 87980ce3a7..ee2c29ca4e 100644 --- a/tests/components/sts3x/test.esp8266-ard.yaml +++ b/tests/components/sts3x/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sts3x/test.rp2040-ard.yaml b/tests/components/sts3x/test.rp2040-ard.yaml index 87980ce3a7..ee2c29ca4e 100644 --- a/tests/components/sts3x/test.rp2040-ard.yaml +++ b/tests/components/sts3x/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_sts3x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: sts3x - id: sts3x_sensor - name: STS3X Temperature - address: 0x4A +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/common.yaml b/tests/components/sun_gtil2/common.yaml new file mode 100644 index 0000000000..15cc892d90 --- /dev/null +++ b/tests/components/sun_gtil2/common.yaml @@ -0,0 +1,40 @@ +uart: + - id: uart_sun_gtil2 + rx_pin: ${rx_pin} + baud_rate: 9600 + +sun_gtil2: + +sensor: + - platform: sun_gtil2 + temperature: + id: gtil_temperature + name: Heatsink Temperature + filters: + - throttle_average: 30s + dc_voltage: + id: gtil_dc_voltage + name: DC Voltage + filters: + - throttle_average: 30s + ac_voltage: + id: gtil_ac_voltage + name: AC Voltage + filters: + - throttle_average: 30s + ac_power: + id: gtil_ac_power + name: AC Power + dc_power: + id: gtil_dc_power + name: DC Power + limiter_power: + id: gtil_limiter_power + +text_sensor: + - platform: sun_gtil2 + state: + id: gtil_state + name: State + serial_number: + id: gtil_serial_number diff --git a/tests/components/sun_gtil2/test.esp32-ard.yaml b/tests/components/sun_gtil2/test.esp32-ard.yaml index ed1e68e574..ad420099ff 100644 --- a/tests/components/sun_gtil2/test.esp32-ard.yaml +++ b/tests/components/sun_gtil2/test.esp32-ard.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + rx_pin: GPIO16 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp32-c3-ard.yaml b/tests/components/sun_gtil2/test.esp32-c3-ard.yaml index 6ec834db98..b8a6b85616 100644 --- a/tests/components/sun_gtil2/test.esp32-c3-ard.yaml +++ b/tests/components/sun_gtil2/test.esp32-c3-ard.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + rx_pin: GPIO5 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp32-c3-idf.yaml b/tests/components/sun_gtil2/test.esp32-c3-idf.yaml index 6ec834db98..b8a6b85616 100644 --- a/tests/components/sun_gtil2/test.esp32-c3-idf.yaml +++ b/tests/components/sun_gtil2/test.esp32-c3-idf.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + rx_pin: GPIO5 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp32-idf.yaml b/tests/components/sun_gtil2/test.esp32-idf.yaml index ed1e68e574..ad420099ff 100644 --- a/tests/components/sun_gtil2/test.esp32-idf.yaml +++ b/tests/components/sun_gtil2/test.esp32-idf.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + rx_pin: GPIO16 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp8266-ard.yaml b/tests/components/sun_gtil2/test.esp8266-ard.yaml index 6ec834db98..b8a6b85616 100644 --- a/tests/components/sun_gtil2/test.esp8266-ard.yaml +++ b/tests/components/sun_gtil2/test.esp8266-ard.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + rx_pin: GPIO5 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.rp2040-ard.yaml b/tests/components/sun_gtil2/test.rp2040-ard.yaml index 6ec834db98..b8a6b85616 100644 --- a/tests/components/sun_gtil2/test.rp2040-ard.yaml +++ b/tests/components/sun_gtil2/test.rp2040-ard.yaml @@ -1,44 +1,4 @@ -uart: - - id: control_to_display - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + rx_pin: GPIO5 -sun_gtil2: - uart_id: control_to_display - -sensor: - - platform: sun_gtil2 - temperature: - id: gtil_temperature - name: "Heatsink Temperature" - filters: - - throttle_average: 30s - dc_voltage: - id: gtil_dc_voltage - name: "DC Voltage" - filters: - - throttle_average: 30s - ac_voltage: - id: gtil_ac_voltage - name: "AC Voltage" - filters: - - throttle_average: 30s - ac_power: - id: gtil_ac_power - name: "AC Power" - dc_power: - id: gtil_dc_power - name: "DC Power" - limiter_power: - id: gtil_limiter_power - internal: true - -text_sensor: - - platform: sun_gtil2 - state: - id: gtil_state - name: "State" - serial_number: - id: gtil_serial_number - internal: true +<<: !include common.yaml diff --git a/tests/components/sx1509/common.yaml b/tests/components/sx1509/common.yaml new file mode 100644 index 0000000000..a09d850649 --- /dev/null +++ b/tests/components/sx1509/common.yaml @@ -0,0 +1,33 @@ +i2c: + - id: i2c_sx1509 + scl: ${scl_pin} + sda: ${sda_pin} + +sx1509: + - id: sx1509_hub + address: 0x3E + +binary_sensor: + - platform: gpio + name: GPIO SX1509 Test + pin: + sx1509: sx1509_hub + number: 3 + +switch: + - platform: gpio + name: GPIO SX1509 Test Out Open Drain + pin: + sx1509: sx1509_hub + number: 0 + mode: + output: true + open_drain: true + + - platform: gpio + name: GPIO SX1509 Test Out Standard + pin: + sx1509: sx1509_hub + number: 1 + mode: + output: true diff --git a/tests/components/sx1509/test.esp32-ard.yaml b/tests/components/sx1509/test.esp32-ard.yaml index aa1d161a43..63c3bd6afd 100644 --- a/tests/components/sx1509/test.esp32-ard.yaml +++ b/tests/components/sx1509/test.esp32-ard.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml diff --git a/tests/components/sx1509/test.esp32-c3-ard.yaml b/tests/components/sx1509/test.esp32-c3-ard.yaml index 0397812880..ee2c29ca4e 100644 --- a/tests/components/sx1509/test.esp32-c3-ard.yaml +++ b/tests/components/sx1509/test.esp32-c3-ard.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml diff --git a/tests/components/sx1509/test.esp32-c3-idf.yaml b/tests/components/sx1509/test.esp32-c3-idf.yaml index 0397812880..ee2c29ca4e 100644 --- a/tests/components/sx1509/test.esp32-c3-idf.yaml +++ b/tests/components/sx1509/test.esp32-c3-idf.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml diff --git a/tests/components/sx1509/test.esp32-idf.yaml b/tests/components/sx1509/test.esp32-idf.yaml index aa1d161a43..63c3bd6afd 100644 --- a/tests/components/sx1509/test.esp32-idf.yaml +++ b/tests/components/sx1509/test.esp32-idf.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml diff --git a/tests/components/sx1509/test.esp8266-ard.yaml b/tests/components/sx1509/test.esp8266-ard.yaml index 0397812880..ee2c29ca4e 100644 --- a/tests/components/sx1509/test.esp8266-ard.yaml +++ b/tests/components/sx1509/test.esp8266-ard.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml diff --git a/tests/components/sx1509/test.rp2040-ard.yaml b/tests/components/sx1509/test.rp2040-ard.yaml index 0397812880..ee2c29ca4e 100644 --- a/tests/components/sx1509/test.rp2040-ard.yaml +++ b/tests/components/sx1509/test.rp2040-ard.yaml @@ -1,33 +1,5 @@ -i2c: - - id: i2c_sx1509 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sx1509: - - id: sx1509_hub - address: 0x3E - -binary_sensor: - - platform: gpio - name: GPIO SX1509 Test - pin: - sx1509: sx1509_hub - number: 3 - -switch: - - platform: gpio - name: GPIO SX1509 Test Out Open Drain - pin: - sx1509: sx1509_hub - number: 0 - mode: - output: true - open_drain: true - - - platform: gpio - name: GPIO SX1509 Test Out Standard - pin: - sx1509: sx1509_hub - number: 1 - mode: - output: true +<<: !include common.yaml