diff --git a/tests/components/ballu/common.yaml b/tests/components/ballu/common.yaml new file mode 100644 index 0000000000..52f86aa26a --- /dev/null +++ b/tests/components/ballu/common.yaml @@ -0,0 +1,12 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: heatpumpir + protocol: ballu + horizontal_default: middle + vertical_default: middle + name: HeatpumpIR Climate + min_temperature: 18 + max_temperature: 30 diff --git a/tests/components/ballu/test.esp32-ard.yaml b/tests/components/ballu/test.esp32-ard.yaml index bb7b9b0435..7b012aa64c 100644 --- a/tests/components/ballu/test.esp32-ard.yaml +++ b/tests/components/ballu/test.esp32-ard.yaml @@ -1,12 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: heatpumpir - protocol: ballu - horizontal_default: middle - vertical_default: middle - name: HeatpumpIR Climate - min_temperature: 18 - max_temperature: 30 +<<: !include common.yaml diff --git a/tests/components/ballu/test.esp8266-ard.yaml b/tests/components/ballu/test.esp8266-ard.yaml index 05aa446739..f5097fcf5f 100644 --- a/tests/components/ballu/test.esp8266-ard.yaml +++ b/tests/components/ballu/test.esp8266-ard.yaml @@ -1,12 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: heatpumpir - protocol: ballu - horizontal_default: middle - vertical_default: middle - name: HeatpumpIR Climate - min_temperature: 18 - max_temperature: 30 +<<: !include common.yaml diff --git a/tests/components/bh1750/common.yaml b/tests/components/bh1750/common.yaml new file mode 100644 index 0000000000..c0e0bc1c59 --- /dev/null +++ b/tests/components/bh1750/common.yaml @@ -0,0 +1,10 @@ +i2c: + - id: i2c_bh1750 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: bh1750 + name: Living Room Brightness + address: 0x23 + update_interval: 30s diff --git a/tests/components/bh1750/test.esp32-ard.yaml b/tests/components/bh1750/test.esp32-ard.yaml index b10ec231ae..3b761d3fc1 100644 --- a/tests/components/bh1750/test.esp32-ard.yaml +++ b/tests/components/bh1750/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bh1750/test.esp32-c3-ard.yaml b/tests/components/bh1750/test.esp32-c3-ard.yaml index e367de3845..ee2c29ca4e 100644 --- a/tests/components/bh1750/test.esp32-c3-ard.yaml +++ b/tests/components/bh1750/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bh1750/test.esp32-c3-idf.yaml b/tests/components/bh1750/test.esp32-c3-idf.yaml index e367de3845..ee2c29ca4e 100644 --- a/tests/components/bh1750/test.esp32-c3-idf.yaml +++ b/tests/components/bh1750/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bh1750/test.esp32-idf.yaml b/tests/components/bh1750/test.esp32-idf.yaml index b10ec231ae..3b761d3fc1 100644 --- a/tests/components/bh1750/test.esp32-idf.yaml +++ b/tests/components/bh1750/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bh1750/test.esp8266-ard.yaml b/tests/components/bh1750/test.esp8266-ard.yaml index e367de3845..ee2c29ca4e 100644 --- a/tests/components/bh1750/test.esp8266-ard.yaml +++ b/tests/components/bh1750/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bh1750/test.rp2040-ard.yaml b/tests/components/bh1750/test.rp2040-ard.yaml index e367de3845..ee2c29ca4e 100644 --- a/tests/components/bh1750/test.rp2040-ard.yaml +++ b/tests/components/bh1750/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -i2c: - - id: i2c_bh1750 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bh1750 - name: Living Room Brightness - address: 0x23 - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/bl0906/common.yaml b/tests/components/bl0906/common.yaml index 29321a9471..29b82a5958 100644 --- a/tests/components/bl0906/common.yaml +++ b/tests/components/bl0906/common.yaml @@ -1,9 +1,7 @@ uart: - id: uart_bl0906 - tx_pin: - number: ${tx_pin} - rx_pin: - number: ${rx_pin} + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} baud_rate: 19200 sensor: diff --git a/tests/components/bl0939/common.yaml b/tests/components/bl0939/common.yaml new file mode 100644 index 0000000000..7a6b635b70 --- /dev/null +++ b/tests/components/bl0939/common.yaml @@ -0,0 +1,24 @@ +uart: + - id: uart_bl0939 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: bl0939 + voltage: + name: BL0939 Voltage + current_1: + name: BL0939 Current 1 + current_2: + name: BL0939 Current 2 + active_power_1: + name: BL0939 Active Power 1 + active_power_2: + name: BL0939 Active Power 2 + energy_1: + name: BL0939 Energy 1 + energy_2: + name: BL0939 Energy 2 + energy_total: + name: BL0939 Total energy diff --git a/tests/components/bl0939/test.esp32-ard.yaml b/tests/components/bl0939/test.esp32-ard.yaml index df0e683b2f..811f6b72a6 100644 --- a/tests/components/bl0939/test.esp32-ard.yaml +++ b/tests/components/bl0939/test.esp32-ard.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0939/test.esp32-c3-ard.yaml b/tests/components/bl0939/test.esp32-c3-ard.yaml index 4c92ccb7dd..c79d14c740 100644 --- a/tests/components/bl0939/test.esp32-c3-ard.yaml +++ b/tests/components/bl0939/test.esp32-c3-ard.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0939/test.esp32-c3-idf.yaml b/tests/components/bl0939/test.esp32-c3-idf.yaml index 4c92ccb7dd..c79d14c740 100644 --- a/tests/components/bl0939/test.esp32-c3-idf.yaml +++ b/tests/components/bl0939/test.esp32-c3-idf.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0939/test.esp32-idf.yaml b/tests/components/bl0939/test.esp32-idf.yaml index df0e683b2f..811f6b72a6 100644 --- a/tests/components/bl0939/test.esp32-idf.yaml +++ b/tests/components/bl0939/test.esp32-idf.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0939/test.esp8266-ard.yaml b/tests/components/bl0939/test.esp8266-ard.yaml index 4c92ccb7dd..3b44f9c9c3 100644 --- a/tests/components/bl0939/test.esp8266-ard.yaml +++ b/tests/components/bl0939/test.esp8266-ard.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0939/test.rp2040-ard.yaml b/tests/components/bl0939/test.rp2040-ard.yaml index 4c92ccb7dd..b516342f3b 100644 --- a/tests/components/bl0939/test.rp2040-ard.yaml +++ b/tests/components/bl0939/test.rp2040-ard.yaml @@ -1,26 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: bl0939 - voltage: - name: BL0939 Voltage - current_1: - name: BL0939 Current 1 - current_2: - name: BL0939 Current 2 - active_power_1: - name: BL0939 Active Power 1 - active_power_2: - name: BL0939 Active Power 2 - energy_1: - name: BL0939 Energy 1 - energy_2: - name: BL0939 Energy 2 - energy_total: - name: BL0939 Total energy +<<: !include common.yaml diff --git a/tests/components/bl0940/common.yaml b/tests/components/bl0940/common.yaml new file mode 100644 index 0000000000..97a997d2b4 --- /dev/null +++ b/tests/components/bl0940/common.yaml @@ -0,0 +1,20 @@ +uart: + - id: uart_bl0939 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: bl0940 + voltage: + name: BL0940 Voltage + current: + name: BL0940 Current + power: + name: BL0940 Power + energy: + name: BL0940 Energy + internal_temperature: + name: BL0940 Internal temperature + external_temperature: + name: BL0940 External temperature diff --git a/tests/components/bl0940/test.esp32-ard.yaml b/tests/components/bl0940/test.esp32-ard.yaml index c7d97ca3b9..811f6b72a6 100644 --- a/tests/components/bl0940/test.esp32-ard.yaml +++ b/tests/components/bl0940/test.esp32-ard.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0940/test.esp32-c3-ard.yaml b/tests/components/bl0940/test.esp32-c3-ard.yaml index a20f785b02..c79d14c740 100644 --- a/tests/components/bl0940/test.esp32-c3-ard.yaml +++ b/tests/components/bl0940/test.esp32-c3-ard.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0940/test.esp32-c3-idf.yaml b/tests/components/bl0940/test.esp32-c3-idf.yaml index a20f785b02..c79d14c740 100644 --- a/tests/components/bl0940/test.esp32-c3-idf.yaml +++ b/tests/components/bl0940/test.esp32-c3-idf.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0940/test.esp32-idf.yaml b/tests/components/bl0940/test.esp32-idf.yaml index c7d97ca3b9..811f6b72a6 100644 --- a/tests/components/bl0940/test.esp32-idf.yaml +++ b/tests/components/bl0940/test.esp32-idf.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0940/test.esp8266-ard.yaml b/tests/components/bl0940/test.esp8266-ard.yaml index a20f785b02..3b44f9c9c3 100644 --- a/tests/components/bl0940/test.esp8266-ard.yaml +++ b/tests/components/bl0940/test.esp8266-ard.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0940/test.rp2040-ard.yaml b/tests/components/bl0940/test.rp2040-ard.yaml index a20f785b02..b516342f3b 100644 --- a/tests/components/bl0940/test.rp2040-ard.yaml +++ b/tests/components/bl0940/test.rp2040-ard.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: bl0940 - voltage: - name: BL0940 Voltage - current: - name: BL0940 Current - power: - name: BL0940 Power - energy: - name: BL0940 Energy - internal_temperature: - name: BL0940 Internal temperature - external_temperature: - name: BL0940 External temperature +<<: !include common.yaml diff --git a/tests/components/bl0942/common.yaml b/tests/components/bl0942/common.yaml new file mode 100644 index 0000000000..32da24885f --- /dev/null +++ b/tests/components/bl0942/common.yaml @@ -0,0 +1,19 @@ +uart: + - id: uart_bl0939 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: bl0942 + reset: true + voltage: + name: BL0942 Voltage + current: + name: BL0942 Current + power: + name: BL0942 Power + energy: + name: BL0942 Energy + frequency: + name: BL0942 Frequency diff --git a/tests/components/bl0942/test.bk72xx-ard.yaml b/tests/components/bl0942/test.bk72xx-ard.yaml index ea61734441..96e13c83a9 100644 --- a/tests/components/bl0942/test.bk72xx-ard.yaml +++ b/tests/components/bl0942/test.bk72xx-ard.yaml @@ -1,27 +1,5 @@ -uart: - - id: uart_bl0942 - tx_pin: - number: TX1 - rx_pin: - number: RX1 - baud_rate: 2400 +substitutions: + tx_pin: TX1 + rx_pin: RX1 -sensor: - - platform: bl0942 - address: 0 - line_frequency: 50Hz - reset: false - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency - voltage_reference: 15968 - current_reference: 124180 - power_reference: 309.1 - energy_reference: 2653 +<<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-ard.yaml b/tests/components/bl0942/test.esp32-ard.yaml index 4138543967..811f6b72a6 100644 --- a/tests/components/bl0942/test.esp32-ard.yaml +++ b/tests/components/bl0942/test.esp32-ard.yaml @@ -1,21 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0942 - reset: true - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency +<<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-c3-ard.yaml b/tests/components/bl0942/test.esp32-c3-ard.yaml index 8d16efed4f..c79d14c740 100644 --- a/tests/components/bl0942/test.esp32-c3-ard.yaml +++ b/tests/components/bl0942/test.esp32-c3-ard.yaml @@ -1,20 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0942 - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency +<<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-c3-idf.yaml b/tests/components/bl0942/test.esp32-c3-idf.yaml index 8d16efed4f..c79d14c740 100644 --- a/tests/components/bl0942/test.esp32-c3-idf.yaml +++ b/tests/components/bl0942/test.esp32-c3-idf.yaml @@ -1,20 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -sensor: - - platform: bl0942 - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency +<<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-idf.yaml b/tests/components/bl0942/test.esp32-idf.yaml index 45ac85aa2a..811f6b72a6 100644 --- a/tests/components/bl0942/test.esp32-idf.yaml +++ b/tests/components/bl0942/test.esp32-idf.yaml @@ -1,20 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -sensor: - - platform: bl0942 - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency +<<: !include common.yaml diff --git a/tests/components/bl0942/test.esp8266-ard.yaml b/tests/components/bl0942/test.esp8266-ard.yaml index 8d16efed4f..3b44f9c9c3 100644 --- a/tests/components/bl0942/test.esp8266-ard.yaml +++ b/tests/components/bl0942/test.esp8266-ard.yaml @@ -1,20 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -sensor: - - platform: bl0942 - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency +<<: !include common.yaml diff --git a/tests/components/bl0942/test.rp2040-ard.yaml b/tests/components/bl0942/test.rp2040-ard.yaml index d07e0c4402..b516342f3b 100644 --- a/tests/components/bl0942/test.rp2040-ard.yaml +++ b/tests/components/bl0942/test.rp2040-ard.yaml @@ -1,22 +1,5 @@ -uart: - - id: uart_bl0939 - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: bl0942 - voltage: - name: BL0942 Voltage - current: - name: BL0942 Current - power: - name: BL0942 Power - energy: - name: BL0942 Energy - frequency: - name: BL0942 Frequency - voltage_reference: 15968 - current_reference: 124180 +<<: !include common.yaml diff --git a/tests/components/bme680/common.yaml b/tests/components/bme680/common.yaml new file mode 100644 index 0000000000..13a42488f2 --- /dev/null +++ b/tests/components/bme680/common.yaml @@ -0,0 +1,21 @@ +i2c: + - id: i2c_bme680 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: bme680 + temperature: + name: BME680 Temperature + oversampling: 16x + pressure: + name: BME680 Pressure + humidity: + name: BME680 Humidity + gas_resistance: + name: BME680 Gas Sensor + address: 0x77 + heater: + temperature: 320 + duration: 150ms + update_interval: 15s diff --git a/tests/components/bme680/test.esp32-ard.yaml b/tests/components/bme680/test.esp32-ard.yaml index 04d0ed8fe4..3b761d3fc1 100644 --- a/tests/components/bme680/test.esp32-ard.yaml +++ b/tests/components/bme680/test.esp32-ard.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680/test.esp32-c3-ard.yaml b/tests/components/bme680/test.esp32-c3-ard.yaml index f12be09d20..ee2c29ca4e 100644 --- a/tests/components/bme680/test.esp32-c3-ard.yaml +++ b/tests/components/bme680/test.esp32-c3-ard.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680/test.esp32-c3-idf.yaml b/tests/components/bme680/test.esp32-c3-idf.yaml index f12be09d20..ee2c29ca4e 100644 --- a/tests/components/bme680/test.esp32-c3-idf.yaml +++ b/tests/components/bme680/test.esp32-c3-idf.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680/test.esp32-idf.yaml b/tests/components/bme680/test.esp32-idf.yaml index 04d0ed8fe4..3b761d3fc1 100644 --- a/tests/components/bme680/test.esp32-idf.yaml +++ b/tests/components/bme680/test.esp32-idf.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680/test.esp8266-ard.yaml b/tests/components/bme680/test.esp8266-ard.yaml index f12be09d20..ee2c29ca4e 100644 --- a/tests/components/bme680/test.esp8266-ard.yaml +++ b/tests/components/bme680/test.esp8266-ard.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680/test.rp2040-ard.yaml b/tests/components/bme680/test.rp2040-ard.yaml index f12be09d20..ee2c29ca4e 100644 --- a/tests/components/bme680/test.rp2040-ard.yaml +++ b/tests/components/bme680/test.rp2040-ard.yaml @@ -1,21 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bme680 - temperature: - name: BME680 Temperature - oversampling: 16x - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - address: 0x77 - heater: - temperature: 320 - duration: 150ms - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bme680_bsec/common.yaml b/tests/components/bme680_bsec/common.yaml new file mode 100644 index 0000000000..7d2e9e210b --- /dev/null +++ b/tests/components/bme680_bsec/common.yaml @@ -0,0 +1,29 @@ +i2c: + - id: i2c_bme680 + scl: ${scl_pin} + sda: ${sda_pin} + +bme680_bsec: + address: 0x77 + +sensor: + - platform: bme680_bsec + temperature: + name: BME680 Temperature + pressure: + name: BME680 Pressure + humidity: + name: BME680 Humidity + gas_resistance: + name: BME680 Gas Sensor + iaq: + name: BME680 IAQ + co2_equivalent: + name: BME680 eCO2 + breath_voc_equivalent: + name: BME680 Breath eVOC + +text_sensor: + - platform: bme680_bsec + iaq_accuracy: + name: BME680 Accuracy diff --git a/tests/components/bme680_bsec/test.esp32-ard.yaml b/tests/components/bme680_bsec/test.esp32-ard.yaml index 4f62f13abb..3b761d3fc1 100644 --- a/tests/components/bme680_bsec/test.esp32-ard.yaml +++ b/tests/components/bme680_bsec/test.esp32-ard.yaml @@ -1,29 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -bme680_bsec: - address: 0x77 - -sensor: - - platform: bme680_bsec - temperature: - name: BME680 Temperature - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - iaq: - name: BME680 IAQ - co2_equivalent: - name: BME680 eCO2 - breath_voc_equivalent: - name: BME680 Breath eVOC - -text_sensor: - - platform: bme680_bsec - iaq_accuracy: - name: BME680 Accuracy +<<: !include common.yaml diff --git a/tests/components/bme680_bsec/test.esp8266-ard.yaml b/tests/components/bme680_bsec/test.esp8266-ard.yaml index 84b32d3635..ee2c29ca4e 100644 --- a/tests/components/bme680_bsec/test.esp8266-ard.yaml +++ b/tests/components/bme680_bsec/test.esp8266-ard.yaml @@ -1,29 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -bme680_bsec: - address: 0x77 - -sensor: - - platform: bme680_bsec - temperature: - name: BME680 Temperature - pressure: - name: BME680 Pressure - humidity: - name: BME680 Humidity - gas_resistance: - name: BME680 Gas Sensor - iaq: - name: BME680 IAQ - co2_equivalent: - name: BME680 eCO2 - breath_voc_equivalent: - name: BME680 Breath eVOC - -text_sensor: - - platform: bme680_bsec - iaq_accuracy: - name: BME680 Accuracy +<<: !include common.yaml diff --git a/tests/components/bmi160/common.yaml b/tests/components/bmi160/common.yaml new file mode 100644 index 0000000000..6aa9aa6ed0 --- /dev/null +++ b/tests/components/bmi160/common.yaml @@ -0,0 +1,22 @@ +i2c: + - id: i2c_bmi160 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: bmi160 + address: 0x68 + acceleration_x: + name: BMI160 Accel X + acceleration_y: + name: BMI160 Accel Y + acceleration_z: + name: BMI160 Accel z + gyroscope_x: + name: BMI160 Gyro X + gyroscope_y: + name: BMI160 Gyro Y + gyroscope_z: + name: BMI160 Gyro z + temperature: + name: BMI160 Temperature diff --git a/tests/components/bmi160/test.esp32-ard.yaml b/tests/components/bmi160/test.esp32-ard.yaml index a8a90c8c87..3b761d3fc1 100644 --- a/tests/components/bmi160/test.esp32-ard.yaml +++ b/tests/components/bmi160/test.esp32-ard.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmi160/test.esp32-c3-ard.yaml b/tests/components/bmi160/test.esp32-c3-ard.yaml index 3fd6441980..ee2c29ca4e 100644 --- a/tests/components/bmi160/test.esp32-c3-ard.yaml +++ b/tests/components/bmi160/test.esp32-c3-ard.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmi160/test.esp32-c3-idf.yaml b/tests/components/bmi160/test.esp32-c3-idf.yaml index 3fd6441980..ee2c29ca4e 100644 --- a/tests/components/bmi160/test.esp32-c3-idf.yaml +++ b/tests/components/bmi160/test.esp32-c3-idf.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmi160/test.esp32-idf.yaml b/tests/components/bmi160/test.esp32-idf.yaml index a8a90c8c87..3b761d3fc1 100644 --- a/tests/components/bmi160/test.esp32-idf.yaml +++ b/tests/components/bmi160/test.esp32-idf.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmi160/test.esp8266-ard.yaml b/tests/components/bmi160/test.esp8266-ard.yaml index 3fd6441980..ee2c29ca4e 100644 --- a/tests/components/bmi160/test.esp8266-ard.yaml +++ b/tests/components/bmi160/test.esp8266-ard.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmi160/test.rp2040-ard.yaml b/tests/components/bmi160/test.rp2040-ard.yaml index 3fd6441980..ee2c29ca4e 100644 --- a/tests/components/bmi160/test.rp2040-ard.yaml +++ b/tests/components/bmi160/test.rp2040-ard.yaml @@ -1,22 +1,5 @@ -i2c: - - id: i2c_bmi160 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmi160 - address: 0x68 - acceleration_x: - name: BMI160 Accel X - acceleration_y: - name: BMI160 Accel Y - acceleration_z: - name: BMI160 Accel z - gyroscope_x: - name: BMI160 Gyro X - gyroscope_y: - name: BMI160 Gyro Y - gyroscope_z: - name: BMI160 Gyro z - temperature: - name: BMI160 Temperature +<<: !include common.yaml diff --git a/tests/components/bmp085/common.yaml b/tests/components/bmp085/common.yaml new file mode 100644 index 0000000000..219bc51fbb --- /dev/null +++ b/tests/components/bmp085/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_bmp085 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: bmp085 + temperature: + name: Outside Temperature + pressure: + name: Outside Pressure + filters: + - lambda: >- + return x / powf(1.0 - (x / 44330.0), 5.255); + update_interval: 15s diff --git a/tests/components/bmp085/test.esp32-ard.yaml b/tests/components/bmp085/test.esp32-ard.yaml index 8a4f714ddd..3b761d3fc1 100644 --- a/tests/components/bmp085/test.esp32-ard.yaml +++ b/tests/components/bmp085/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp085/test.esp32-c3-ard.yaml b/tests/components/bmp085/test.esp32-c3-ard.yaml index 76a9fd07ba..ee2c29ca4e 100644 --- a/tests/components/bmp085/test.esp32-c3-ard.yaml +++ b/tests/components/bmp085/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp085/test.esp32-c3-idf.yaml b/tests/components/bmp085/test.esp32-c3-idf.yaml index 76a9fd07ba..ee2c29ca4e 100644 --- a/tests/components/bmp085/test.esp32-c3-idf.yaml +++ b/tests/components/bmp085/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp085/test.esp32-idf.yaml b/tests/components/bmp085/test.esp32-idf.yaml index 8a4f714ddd..3b761d3fc1 100644 --- a/tests/components/bmp085/test.esp32-idf.yaml +++ b/tests/components/bmp085/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp085/test.esp8266-ard.yaml b/tests/components/bmp085/test.esp8266-ard.yaml index 76a9fd07ba..ee2c29ca4e 100644 --- a/tests/components/bmp085/test.esp8266-ard.yaml +++ b/tests/components/bmp085/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp085/test.rp2040-ard.yaml b/tests/components/bmp085/test.rp2040-ard.yaml index 76a9fd07ba..ee2c29ca4e 100644 --- a/tests/components/bmp085/test.rp2040-ard.yaml +++ b/tests/components/bmp085/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_bmp085 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp085 - temperature: - name: Outside Temperature - pressure: - name: Outside Pressure - filters: - - lambda: >- - return x / powf(1.0 - (x / 44330.0), 5.255); - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/bmp581/common.yaml b/tests/components/bmp581/common.yaml new file mode 100644 index 0000000000..71ad4bfb1a --- /dev/null +++ b/tests/components/bmp581/common.yaml @@ -0,0 +1,13 @@ +i2c: + - id: i2c_bmp581 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: bmp581 + temperature: + name: BMP581 Temperature + iir_filter: 2x + pressure: + name: BMP581 Pressure + oversampling: 128x diff --git a/tests/components/bmp581/test.esp32-ard.yaml b/tests/components/bmp581/test.esp32-ard.yaml index a464b8ce6a..3b761d3fc1 100644 --- a/tests/components/bmp581/test.esp32-ard.yaml +++ b/tests/components/bmp581/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bmp581/test.esp32-c3-ard.yaml b/tests/components/bmp581/test.esp32-c3-ard.yaml index 29d27afb90..ee2c29ca4e 100644 --- a/tests/components/bmp581/test.esp32-c3-ard.yaml +++ b/tests/components/bmp581/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bmp581/test.esp32-c3-idf.yaml b/tests/components/bmp581/test.esp32-c3-idf.yaml index 29d27afb90..ee2c29ca4e 100644 --- a/tests/components/bmp581/test.esp32-c3-idf.yaml +++ b/tests/components/bmp581/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bmp581/test.esp32-idf.yaml b/tests/components/bmp581/test.esp32-idf.yaml index a464b8ce6a..3b761d3fc1 100644 --- a/tests/components/bmp581/test.esp32-idf.yaml +++ b/tests/components/bmp581/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bmp581/test.esp8266-ard.yaml b/tests/components/bmp581/test.esp8266-ard.yaml index 29d27afb90..ee2c29ca4e 100644 --- a/tests/components/bmp581/test.esp8266-ard.yaml +++ b/tests/components/bmp581/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bmp581/test.rp2040-ard.yaml b/tests/components/bmp581/test.rp2040-ard.yaml index 29d27afb90..ee2c29ca4e 100644 --- a/tests/components/bmp581/test.rp2040-ard.yaml +++ b/tests/components/bmp581/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_bmp581 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: bmp581 - temperature: - name: "BMP581 Temperature" - iir_filter: 2x - pressure: - name: "BMP581 Pressure" - oversampling: 128x +<<: !include common.yaml diff --git a/tests/components/bp1658cj/common.yaml b/tests/components/bp1658cj/common.yaml new file mode 100644 index 0000000000..e1d71bd4f3 --- /dev/null +++ b/tests/components/bp1658cj/common.yaml @@ -0,0 +1,22 @@ +bp1658cj: + clock_pin: ${clock_pin} + data_pin: ${data_pin} + max_power_color_channels: 4 + max_power_white_channels: 6 + +output: + - platform: bp1658cj + id: bp1658cj_red + channel: 1 + - platform: bp1658cj + id: bp1658cj_green + channel: 2 + - platform: bp1658cj + id: bp1658cj_blue + channel: 0 + - platform: bp1658cj + id: bp1658cj_coldwhite + channel: 3 + - platform: bp1658cj + id: bp1658cj_warmwhite + channel: 4 diff --git a/tests/components/bp1658cj/test.esp32-ard.yaml b/tests/components/bp1658cj/test.esp32-ard.yaml index 5f9e25d3bd..d295973e3f 100644 --- a/tests/components/bp1658cj/test.esp32-ard.yaml +++ b/tests/components/bp1658cj/test.esp32-ard.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 16 - data_pin: 17 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp32-c3-ard.yaml b/tests/components/bp1658cj/test.esp32-c3-ard.yaml index 74d3155371..7808481215 100644 --- a/tests/components/bp1658cj/test.esp32-c3-ard.yaml +++ b/tests/components/bp1658cj/test.esp32-c3-ard.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 5 - data_pin: 4 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp32-c3-idf.yaml b/tests/components/bp1658cj/test.esp32-c3-idf.yaml index 74d3155371..7808481215 100644 --- a/tests/components/bp1658cj/test.esp32-c3-idf.yaml +++ b/tests/components/bp1658cj/test.esp32-c3-idf.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 5 - data_pin: 4 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp32-idf.yaml b/tests/components/bp1658cj/test.esp32-idf.yaml index 5f9e25d3bd..d295973e3f 100644 --- a/tests/components/bp1658cj/test.esp32-idf.yaml +++ b/tests/components/bp1658cj/test.esp32-idf.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 16 - data_pin: 17 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp8266-ard.yaml b/tests/components/bp1658cj/test.esp8266-ard.yaml index 74d3155371..7808481215 100644 --- a/tests/components/bp1658cj/test.esp8266-ard.yaml +++ b/tests/components/bp1658cj/test.esp8266-ard.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 5 - data_pin: 4 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp1658cj/test.rp2040-ard.yaml b/tests/components/bp1658cj/test.rp2040-ard.yaml index 74d3155371..7808481215 100644 --- a/tests/components/bp1658cj/test.rp2040-ard.yaml +++ b/tests/components/bp1658cj/test.rp2040-ard.yaml @@ -1,22 +1,5 @@ -bp1658cj: - clock_pin: 5 - data_pin: 4 - max_power_color_channels: 4 - max_power_white_channels: 6 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp1658cj - id: bp1658cj_red - channel: 1 - - platform: bp1658cj - id: bp1658cj_green - channel: 2 - - platform: bp1658cj - id: bp1658cj_blue - channel: 0 - - platform: bp1658cj - id: bp1658cj_coldwhite - channel: 3 - - platform: bp1658cj - id: bp1658cj_warmwhite - channel: 4 +<<: !include common.yaml diff --git a/tests/components/bp5758d/common.yaml b/tests/components/bp5758d/common.yaml new file mode 100644 index 0000000000..4a39a6f69f --- /dev/null +++ b/tests/components/bp5758d/common.yaml @@ -0,0 +1,25 @@ +bp5758d: + clock_pin: ${clock_pin} + data_pin: ${data_pin} + +output: + - platform: bp5758d + id: bp5758d_red + channel: 2 + current: 10 + - platform: bp5758d + id: bp5758d_green + channel: 3 + current: 10 + - platform: bp5758d + id: bp5758d_blue + channel: 1 + current: 10 + - platform: bp5758d + id: bp5758d_coldwhite + channel: 5 + current: 10 + - platform: bp5758d + id: bp5758d_warmwhite + channel: 4 + current: 10 diff --git a/tests/components/bp5758d/test.esp32-ard.yaml b/tests/components/bp5758d/test.esp32-ard.yaml index b7929a0518..d295973e3f 100644 --- a/tests/components/bp5758d/test.esp32-ard.yaml +++ b/tests/components/bp5758d/test.esp32-ard.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 16 - data_pin: 17 +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp32-c3-ard.yaml b/tests/components/bp5758d/test.esp32-c3-ard.yaml index ec74e935cd..7808481215 100644 --- a/tests/components/bp5758d/test.esp32-c3-ard.yaml +++ b/tests/components/bp5758d/test.esp32-c3-ard.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 5 - data_pin: 4 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp32-c3-idf.yaml b/tests/components/bp5758d/test.esp32-c3-idf.yaml index ec74e935cd..7808481215 100644 --- a/tests/components/bp5758d/test.esp32-c3-idf.yaml +++ b/tests/components/bp5758d/test.esp32-c3-idf.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 5 - data_pin: 4 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp32-idf.yaml b/tests/components/bp5758d/test.esp32-idf.yaml index b7929a0518..d295973e3f 100644 --- a/tests/components/bp5758d/test.esp32-idf.yaml +++ b/tests/components/bp5758d/test.esp32-idf.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 16 - data_pin: 17 +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp8266-ard.yaml b/tests/components/bp5758d/test.esp8266-ard.yaml index ec74e935cd..7808481215 100644 --- a/tests/components/bp5758d/test.esp8266-ard.yaml +++ b/tests/components/bp5758d/test.esp8266-ard.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 5 - data_pin: 4 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml diff --git a/tests/components/bp5758d/test.rp2040-ard.yaml b/tests/components/bp5758d/test.rp2040-ard.yaml index ec74e935cd..7808481215 100644 --- a/tests/components/bp5758d/test.rp2040-ard.yaml +++ b/tests/components/bp5758d/test.rp2040-ard.yaml @@ -1,25 +1,5 @@ -bp5758d: - clock_pin: 5 - data_pin: 4 +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 -output: - - platform: bp5758d - id: bp5758d_red - channel: 2 - current: 10 - - platform: bp5758d - id: bp5758d_green - channel: 3 - current: 10 - - platform: bp5758d - id: bp5758d_blue - channel: 1 - current: 10 - - platform: bp5758d - id: bp5758d_coldwhite - channel: 5 - current: 10 - - platform: bp5758d - id: bp5758d_warmwhite - channel: 4 - current: 10 +<<: !include common.yaml