diff --git a/tests/components/dac7678/common.yaml b/tests/components/dac7678/common.yaml new file mode 100644 index 0000000000..efad81a5ff --- /dev/null +++ b/tests/components/dac7678/common.yaml @@ -0,0 +1,43 @@ +i2c: + - id: i2c_dac7678 + scl: ${scl_pin} + sda: ${sda_pin} + +dac7678: + address: 0x4A + id: dac7678_hub + internal_reference: true + +output: + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 0 + id: dac7678_1_ch0 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 1 + id: dac7678_1_ch1 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 2 + id: dac7678_1_ch2 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 3 + id: dac7678_1_ch3 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 4 + id: dac7678_1_ch4 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 5 + id: dac7678_1_ch5 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 6 + id: dac7678_1_ch6 + - platform: dac7678 + dac7678_id: dac7678_hub + channel: 7 + id: dac7678_1_ch7 diff --git a/tests/components/dac7678/test.esp32-ard.yaml b/tests/components/dac7678/test.esp32-ard.yaml index 946a7ca58d..63c3bd6afd 100644 --- a/tests/components/dac7678/test.esp32-ard.yaml +++ b/tests/components/dac7678/test.esp32-ard.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/dac7678/test.esp32-c3-ard.yaml b/tests/components/dac7678/test.esp32-c3-ard.yaml index 7e3455bb68..ee2c29ca4e 100644 --- a/tests/components/dac7678/test.esp32-c3-ard.yaml +++ b/tests/components/dac7678/test.esp32-c3-ard.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/dac7678/test.esp32-c3-idf.yaml b/tests/components/dac7678/test.esp32-c3-idf.yaml index 7e3455bb68..ee2c29ca4e 100644 --- a/tests/components/dac7678/test.esp32-c3-idf.yaml +++ b/tests/components/dac7678/test.esp32-c3-idf.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/dac7678/test.esp32-idf.yaml b/tests/components/dac7678/test.esp32-idf.yaml index 946a7ca58d..63c3bd6afd 100644 --- a/tests/components/dac7678/test.esp32-idf.yaml +++ b/tests/components/dac7678/test.esp32-idf.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/dac7678/test.esp8266-ard.yaml b/tests/components/dac7678/test.esp8266-ard.yaml index 7e3455bb68..ee2c29ca4e 100644 --- a/tests/components/dac7678/test.esp8266-ard.yaml +++ b/tests/components/dac7678/test.esp8266-ard.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/dac7678/test.rp2040-ard.yaml b/tests/components/dac7678/test.rp2040-ard.yaml index 7e3455bb68..ee2c29ca4e 100644 --- a/tests/components/dac7678/test.rp2040-ard.yaml +++ b/tests/components/dac7678/test.rp2040-ard.yaml @@ -1,43 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -dac7678: - address: 0x4A - id: dac7678_hub - internal_reference: true - -output: - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 0 - id: dac7678_1_ch0 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 1 - id: dac7678_1_ch1 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 2 - id: dac7678_1_ch2 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 3 - id: dac7678_1_ch3 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 4 - id: dac7678_1_ch4 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 5 - id: dac7678_1_ch5 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 6 - id: dac7678_1_ch6 - - platform: dac7678 - dac7678_id: dac7678_hub - channel: 7 - id: dac7678_1_ch7 +<<: !include common.yaml diff --git a/tests/components/daikin/common.yaml b/tests/components/daikin/common.yaml new file mode 100644 index 0000000000..27f381b422 --- /dev/null +++ b/tests/components/daikin/common.yaml @@ -0,0 +1,12 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: heatpumpir + protocol: daikin + horizontal_default: middle + vertical_default: middle + name: HeatpumpIR Climate + min_temperature: 18 + max_temperature: 30 diff --git a/tests/components/daikin/test.esp32-ard.yaml b/tests/components/daikin/test.esp32-ard.yaml index 6672fe3e45..7b012aa64c 100644 --- a/tests/components/daikin/test.esp32-ard.yaml +++ b/tests/components/daikin/test.esp32-ard.yaml @@ -1,12 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: heatpumpir - protocol: daikin - horizontal_default: middle - vertical_default: middle - name: HeatpumpIR Climate - min_temperature: 18 - max_temperature: 30 +<<: !include common.yaml diff --git a/tests/components/daikin/test.esp8266-ard.yaml b/tests/components/daikin/test.esp8266-ard.yaml index 47f02bbad9..f5097fcf5f 100644 --- a/tests/components/daikin/test.esp8266-ard.yaml +++ b/tests/components/daikin/test.esp8266-ard.yaml @@ -1,12 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: heatpumpir - protocol: daikin - horizontal_default: middle - vertical_default: middle - name: HeatpumpIR Climate - min_temperature: 18 - max_temperature: 30 +<<: !include common.yaml diff --git a/tests/components/daikin_arc/common.yaml b/tests/components/daikin_arc/common.yaml new file mode 100644 index 0000000000..5c0510f6df --- /dev/null +++ b/tests/components/daikin_arc/common.yaml @@ -0,0 +1,19 @@ +remote_transmitter: + pin: ${tx_pin} + carrier_duty_percent: 50% + id: tsvr + +remote_receiver: + id: rcvr + pin: + number: ${rx_pin} + inverted: true + mode: + input: true + pullup: true + tolerance: 40% + +climate: + - platform: daikin_arc + name: Daikin AC + receiver_id: rcvr diff --git a/tests/components/daikin_arc/test.esp32-ard.yaml b/tests/components/daikin_arc/test.esp32-ard.yaml index a8556e8576..cd59eb0832 100644 --- a/tests/components/daikin_arc/test.esp32-ard.yaml +++ b/tests/components/daikin_arc/test.esp32-ard.yaml @@ -1,19 +1,5 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - id: tsvr +substitutions: + tx_pin: GPIO2 + rx_pin: GPIO4 -remote_receiver: - id: rcvr - pin: - number: 27 - inverted: true - mode: - input: true - pullup: true - tolerance: 40% - -climate: - - platform: daikin_arc - name: "AC" - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/daikin_arc/test.esp8266-ard.yaml b/tests/components/daikin_arc/test.esp8266-ard.yaml index abf1b34a6e..8e08490d0c 100644 --- a/tests/components/daikin_arc/test.esp8266-ard.yaml +++ b/tests/components/daikin_arc/test.esp8266-ard.yaml @@ -1,19 +1,5 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% - id: tsvr +substitutions: + tx_pin: GPIO5 + rx_pin: GPIO4 -remote_receiver: - id: rcvr - pin: - number: 2 - inverted: true - mode: - input: true - pullup: true - tolerance: 40% - -climate: - - platform: daikin_arc - name: "AC" - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/daikin_brc/common.yaml b/tests/components/daikin_brc/common.yaml new file mode 100644 index 0000000000..c9d7baa989 --- /dev/null +++ b/tests/components/daikin_brc/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: daikin_brc + name: Daikin_brc Climate diff --git a/tests/components/daikin_brc/test.esp32-ard.yaml b/tests/components/daikin_brc/test.esp32-ard.yaml index 89a5b00f5d..7b012aa64c 100644 --- a/tests/components/daikin_brc/test.esp32-ard.yaml +++ b/tests/components/daikin_brc/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: daikin_brc - name: Daikin_brc Climate +<<: !include common.yaml diff --git a/tests/components/daikin_brc/test.esp32-c3-ard.yaml b/tests/components/daikin_brc/test.esp32-c3-ard.yaml index 89a5b00f5d..7b012aa64c 100644 --- a/tests/components/daikin_brc/test.esp32-c3-ard.yaml +++ b/tests/components/daikin_brc/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: daikin_brc - name: Daikin_brc Climate +<<: !include common.yaml diff --git a/tests/components/daikin_brc/test.esp32-c3-idf.yaml b/tests/components/daikin_brc/test.esp32-c3-idf.yaml index 89a5b00f5d..7b012aa64c 100644 --- a/tests/components/daikin_brc/test.esp32-c3-idf.yaml +++ b/tests/components/daikin_brc/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: daikin_brc - name: Daikin_brc Climate +<<: !include common.yaml diff --git a/tests/components/daikin_brc/test.esp32-idf.yaml b/tests/components/daikin_brc/test.esp32-idf.yaml index 89a5b00f5d..7b012aa64c 100644 --- a/tests/components/daikin_brc/test.esp32-idf.yaml +++ b/tests/components/daikin_brc/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: daikin_brc - name: Daikin_brc Climate +<<: !include common.yaml diff --git a/tests/components/daikin_brc/test.esp8266-ard.yaml b/tests/components/daikin_brc/test.esp8266-ard.yaml index b8c74803a2..f5097fcf5f 100644 --- a/tests/components/daikin_brc/test.esp8266-ard.yaml +++ b/tests/components/daikin_brc/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: daikin_brc - name: Daikin_brc Climate +<<: !include common.yaml diff --git a/tests/components/daly_bms/common.yaml b/tests/components/daly_bms/common.yaml new file mode 100644 index 0000000000..a4cb849f9f --- /dev/null +++ b/tests/components/daly_bms/common.yaml @@ -0,0 +1,53 @@ +uart: + - id: uart_daly_bms + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + +daly_bms: + update_interval: 20s + +binary_sensor: + - platform: daly_bms + charging_mos_enabled: + name: Charging MOS + discharging_mos_enabled: + name: Discharging MOS + +sensor: + - platform: daly_bms + voltage: + name: Battery Voltage + current: + name: Battery Current + battery_level: + name: Battery Level + max_cell_voltage: + name: Max Cell Voltage + max_cell_voltage_number: + name: Max Cell Voltage Number + min_cell_voltage: + name: Min Cell Voltage + min_cell_voltage_number: + name: Min Cell Voltage Number + max_temperature: + name: Max Temperature + max_temperature_probe_number: + name: Max Temperature Probe Number + min_temperature: + name: Min Temperature + min_temperature_probe_number: + name: Min Temperature Probe Number + remaining_capacity: + name: Remaining Capacity + cells_number: + name: Cells Number + temperature_1: + name: Temperature 1 + temperature_2: + name: Temperature 2 + +text_sensor: + - platform: daly_bms + status: + name: BMS Status diff --git a/tests/components/daly_bms/test.esp32-ard.yaml b/tests/components/daly_bms/test.esp32-ard.yaml index ec9607334d..811f6b72a6 100644 --- a/tests/components/daly_bms/test.esp32-ard.yaml +++ b/tests/components/daly_bms/test.esp32-ard.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 4800 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp32-c3-ard.yaml b/tests/components/daly_bms/test.esp32-c3-ard.yaml index 237a6570b5..c79d14c740 100644 --- a/tests/components/daly_bms/test.esp32-c3-ard.yaml +++ b/tests/components/daly_bms/test.esp32-c3-ard.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 4800 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp32-c3-idf.yaml b/tests/components/daly_bms/test.esp32-c3-idf.yaml index 237a6570b5..c79d14c740 100644 --- a/tests/components/daly_bms/test.esp32-c3-idf.yaml +++ b/tests/components/daly_bms/test.esp32-c3-idf.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 4800 +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp32-idf.yaml b/tests/components/daly_bms/test.esp32-idf.yaml index ec9607334d..811f6b72a6 100644 --- a/tests/components/daly_bms/test.esp32-idf.yaml +++ b/tests/components/daly_bms/test.esp32-idf.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 4800 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp8266-ard.yaml b/tests/components/daly_bms/test.esp8266-ard.yaml index 237a6570b5..3b44f9c9c3 100644 --- a/tests/components/daly_bms/test.esp8266-ard.yaml +++ b/tests/components/daly_bms/test.esp8266-ard.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 4800 +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/daly_bms/test.rp2040-ard.yaml b/tests/components/daly_bms/test.rp2040-ard.yaml index 237a6570b5..b516342f3b 100644 --- a/tests/components/daly_bms/test.rp2040-ard.yaml +++ b/tests/components/daly_bms/test.rp2040-ard.yaml @@ -1,55 +1,5 @@ -uart: - - id: uart_daly_bms - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 4800 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -daly_bms: - update_interval: 20s - -binary_sensor: - - platform: daly_bms - charging_mos_enabled: - name: Charging MOS - discharging_mos_enabled: - name: Discharging MOS - -sensor: - - platform: daly_bms - voltage: - name: Battery Voltage - current: - name: Battery Current - battery_level: - name: Battery Level - max_cell_voltage: - name: Max Cell Voltage - max_cell_voltage_number: - name: Max Cell Voltage Number - min_cell_voltage: - name: Min Cell Voltage - min_cell_voltage_number: - name: Min Cell Voltage Number - max_temperature: - name: Max Temperature - max_temperature_probe_number: - name: Max Temperature Probe Number - min_temperature: - name: Min Temperature - min_temperature_probe_number: - name: Min Temperature Probe Number - remaining_capacity: - name: Remaining Capacity - cells_number: - name: Cells Number - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - -text_sensor: - - platform: daly_bms - status: - name: BMS Status +<<: !include common.yaml diff --git a/tests/components/deep_sleep/common-esp32.yaml b/tests/components/deep_sleep/common-esp32.yaml new file mode 100644 index 0000000000..c20e1a902e --- /dev/null +++ b/tests/components/deep_sleep/common-esp32.yaml @@ -0,0 +1,7 @@ +deep_sleep: + run_duration: + default: 10s + gpio_wakeup_reason: 30s + sleep_duration: 50s + wakeup_pin: ${wakeup_pin} + wakeup_pin_mode: INVERT_WAKEUP diff --git a/tests/components/deep_sleep/common.yaml b/tests/components/deep_sleep/common.yaml new file mode 100644 index 0000000000..c090cb83e2 --- /dev/null +++ b/tests/components/deep_sleep/common.yaml @@ -0,0 +1,6 @@ +esphome: + on_boot: + then: + - deep_sleep.prevent + - delay: 1s + - deep_sleep.allow diff --git a/tests/components/deep_sleep/test.esp32-ard.yaml b/tests/components/deep_sleep/test.esp32-ard.yaml index 94942fd5b0..10c17af0f5 100644 --- a/tests/components/deep_sleep/test.esp32-ard.yaml +++ b/tests/components/deep_sleep/test.esp32-ard.yaml @@ -1,14 +1,5 @@ -esphome: - on_boot: - then: - - deep_sleep.prevent - - delay: 1s - - deep_sleep.allow +substitutions: + wakeup_pin: GPIO4 -deep_sleep: - run_duration: - default: 10s - gpio_wakeup_reason: 30s - sleep_duration: 50s - wakeup_pin: 4 - wakeup_pin_mode: INVERT_WAKEUP +<<: !include common.yaml +<<: !include common-esp32.yaml diff --git a/tests/components/deep_sleep/test.esp32-c3-ard.yaml b/tests/components/deep_sleep/test.esp32-c3-ard.yaml index 94942fd5b0..10c17af0f5 100644 --- a/tests/components/deep_sleep/test.esp32-c3-ard.yaml +++ b/tests/components/deep_sleep/test.esp32-c3-ard.yaml @@ -1,14 +1,5 @@ -esphome: - on_boot: - then: - - deep_sleep.prevent - - delay: 1s - - deep_sleep.allow +substitutions: + wakeup_pin: GPIO4 -deep_sleep: - run_duration: - default: 10s - gpio_wakeup_reason: 30s - sleep_duration: 50s - wakeup_pin: 4 - wakeup_pin_mode: INVERT_WAKEUP +<<: !include common.yaml +<<: !include common-esp32.yaml diff --git a/tests/components/deep_sleep/test.esp32-c3-idf.yaml b/tests/components/deep_sleep/test.esp32-c3-idf.yaml index 94942fd5b0..10c17af0f5 100644 --- a/tests/components/deep_sleep/test.esp32-c3-idf.yaml +++ b/tests/components/deep_sleep/test.esp32-c3-idf.yaml @@ -1,14 +1,5 @@ -esphome: - on_boot: - then: - - deep_sleep.prevent - - delay: 1s - - deep_sleep.allow +substitutions: + wakeup_pin: GPIO4 -deep_sleep: - run_duration: - default: 10s - gpio_wakeup_reason: 30s - sleep_duration: 50s - wakeup_pin: 4 - wakeup_pin_mode: INVERT_WAKEUP +<<: !include common.yaml +<<: !include common-esp32.yaml diff --git a/tests/components/deep_sleep/test.esp32-idf.yaml b/tests/components/deep_sleep/test.esp32-idf.yaml index 94942fd5b0..10c17af0f5 100644 --- a/tests/components/deep_sleep/test.esp32-idf.yaml +++ b/tests/components/deep_sleep/test.esp32-idf.yaml @@ -1,14 +1,5 @@ -esphome: - on_boot: - then: - - deep_sleep.prevent - - delay: 1s - - deep_sleep.allow +substitutions: + wakeup_pin: GPIO4 -deep_sleep: - run_duration: - default: 10s - gpio_wakeup_reason: 30s - sleep_duration: 50s - wakeup_pin: 4 - wakeup_pin_mode: INVERT_WAKEUP +<<: !include common.yaml +<<: !include common-esp32.yaml diff --git a/tests/components/deep_sleep/test.esp8266-ard.yaml b/tests/components/deep_sleep/test.esp8266-ard.yaml index 0992fa9696..df08ec8a14 100644 --- a/tests/components/deep_sleep/test.esp8266-ard.yaml +++ b/tests/components/deep_sleep/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -esphome: - on_boot: - then: - - deep_sleep.prevent - - delay: 1s - - deep_sleep.allow - deep_sleep: run_duration: 10s sleep_duration: 50s + +<<: !include common.yaml diff --git a/tests/components/delonghi/common.yaml b/tests/components/delonghi/common.yaml new file mode 100644 index 0000000000..8e9a1293d7 --- /dev/null +++ b/tests/components/delonghi/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: delonghi + name: Delonghi Climate diff --git a/tests/components/delonghi/test.esp32-ard.yaml b/tests/components/delonghi/test.esp32-ard.yaml index cfe0f837f0..7b012aa64c 100644 --- a/tests/components/delonghi/test.esp32-ard.yaml +++ b/tests/components/delonghi/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: delonghi - name: Delonghi Climate +<<: !include common.yaml diff --git a/tests/components/delonghi/test.esp32-c3-ard.yaml b/tests/components/delonghi/test.esp32-c3-ard.yaml index cfe0f837f0..7b012aa64c 100644 --- a/tests/components/delonghi/test.esp32-c3-ard.yaml +++ b/tests/components/delonghi/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: delonghi - name: Delonghi Climate +<<: !include common.yaml diff --git a/tests/components/delonghi/test.esp32-c3-idf.yaml b/tests/components/delonghi/test.esp32-c3-idf.yaml index cfe0f837f0..7b012aa64c 100644 --- a/tests/components/delonghi/test.esp32-c3-idf.yaml +++ b/tests/components/delonghi/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: delonghi - name: Delonghi Climate +<<: !include common.yaml diff --git a/tests/components/delonghi/test.esp32-idf.yaml b/tests/components/delonghi/test.esp32-idf.yaml index cfe0f837f0..7b012aa64c 100644 --- a/tests/components/delonghi/test.esp32-idf.yaml +++ b/tests/components/delonghi/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: delonghi - name: Delonghi Climate +<<: !include common.yaml diff --git a/tests/components/delonghi/test.esp8266-ard.yaml b/tests/components/delonghi/test.esp8266-ard.yaml index adc478a6e6..f5097fcf5f 100644 --- a/tests/components/delonghi/test.esp8266-ard.yaml +++ b/tests/components/delonghi/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: delonghi - name: Delonghi Climate +<<: !include common.yaml diff --git a/tests/components/dfplayer/common.yaml b/tests/components/dfplayer/common.yaml new file mode 100644 index 0000000000..d7446141c3 --- /dev/null +++ b/tests/components/dfplayer/common.yaml @@ -0,0 +1,42 @@ +esphome: + on_boot: + then: + - dfplayer.play: 5 + - dfplayer.play: + file: 4 + loop: true + - dfplayer.play_folder: + folder: 1 + file: 3 + - dfplayer.play_folder: + folder: 1 + loop: true + - dfplayer.set_device: + device: TF_CARD + - dfplayer.set_volume: 5 + - dfplayer.set_eq: ROCK + - dfplayer.play_next + - dfplayer.play_previous + - dfplayer.reset + - dfplayer.start + - dfplayer.pause + - dfplayer.stop + - dfplayer.random + - dfplayer.volume_up + - dfplayer.volume_down + - dfplayer.sleep + +uart: + - id: uart_dfplayer + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +dfplayer: + on_finished_playback: + then: + if: + condition: + not: dfplayer.is_playing + then: + logger.log: Playback finished event diff --git a/tests/components/dfplayer/test.esp32-ard.yaml b/tests/components/dfplayer/test.esp32-ard.yaml index 03b44b8ca9..811f6b72a6 100644 --- a/tests/components/dfplayer/test.esp32-ard.yaml +++ b/tests/components/dfplayer/test.esp32-ard.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -uart: - - id: uart_dfplayer - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp32-c3-ard.yaml b/tests/components/dfplayer/test.esp32-c3-ard.yaml index 94355915a7..c79d14c740 100644 --- a/tests/components/dfplayer/test.esp32-c3-ard.yaml +++ b/tests/components/dfplayer/test.esp32-c3-ard.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -uart: - - id: uart_dfplayer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp32-c3-idf.yaml b/tests/components/dfplayer/test.esp32-c3-idf.yaml index 94355915a7..c79d14c740 100644 --- a/tests/components/dfplayer/test.esp32-c3-idf.yaml +++ b/tests/components/dfplayer/test.esp32-c3-idf.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -uart: - - id: uart_dfplayer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp32-idf.yaml b/tests/components/dfplayer/test.esp32-idf.yaml index 03b44b8ca9..811f6b72a6 100644 --- a/tests/components/dfplayer/test.esp32-idf.yaml +++ b/tests/components/dfplayer/test.esp32-idf.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -uart: - - id: uart_dfplayer - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp8266-ard.yaml b/tests/components/dfplayer/test.esp8266-ard.yaml index 94355915a7..3b44f9c9c3 100644 --- a/tests/components/dfplayer/test.esp8266-ard.yaml +++ b/tests/components/dfplayer/test.esp8266-ard.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -uart: - - id: uart_dfplayer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfplayer/test.rp2040-ard.yaml b/tests/components/dfplayer/test.rp2040-ard.yaml index 94355915a7..b516342f3b 100644 --- a/tests/components/dfplayer/test.rp2040-ard.yaml +++ b/tests/components/dfplayer/test.rp2040-ard.yaml @@ -1,42 +1,5 @@ -esphome: - on_boot: - then: - - dfplayer.play: 5 - - dfplayer.play: - file: 4 - loop: true - - dfplayer.play_folder: - folder: 1 - file: 3 - - dfplayer.play_folder: - folder: 1 - loop: true - - dfplayer.set_device: - device: TF_CARD - - dfplayer.set_volume: 5 - - dfplayer.set_eq: ROCK - - dfplayer.play_next - - dfplayer.play_previous - - dfplayer.reset - - dfplayer.start - - dfplayer.pause - - dfplayer.stop - - dfplayer.random - - dfplayer.volume_up - - dfplayer.volume_down - - dfplayer.sleep +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_dfplayer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfplayer: - on_finished_playback: - then: - if: - condition: - not: dfplayer.is_playing - then: - logger.log: Playback finished event +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/common.yaml b/tests/components/dfrobot_sen0395/common.yaml new file mode 100644 index 0000000000..69bcebf182 --- /dev/null +++ b/tests/components/dfrobot_sen0395/common.yaml @@ -0,0 +1,28 @@ +esphome: + on_boot: + then: + - dfrobot_sen0395.settings: + id: mmwave + factory_reset: true + detection_segments: + - [0cm, 5m] + - 600cm + - !lambda "return 7;" + output_latency: + delay_after_detect: 0s + delay_after_disappear: 0s + sensitivity: 6 + - dfrobot_sen0395.reset + +uart: + - id: uart_dfrobot_sen0395 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +dfrobot_sen0395: + - id: mmwave + +binary_sensor: + - platform: dfrobot_sen0395 + id: mmwave_detected diff --git a/tests/components/dfrobot_sen0395/test.esp32-ard.yaml b/tests/components/dfrobot_sen0395/test.esp32-ard.yaml index 5c06fc6660..811f6b72a6 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp32-c3-ard.yaml b/tests/components/dfrobot_sen0395/test.esp32-c3-ard.yaml index 71b17cecd5..c79d14c740 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-c3-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-c3-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml b/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml index 71b17cecd5..c79d14c740 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO7 + rx_pin: GPIO8 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp32-idf.yaml b/tests/components/dfrobot_sen0395/test.esp32-idf.yaml index 5c06fc6660..811f6b72a6 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-idf.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-idf.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml b/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml index 71b17cecd5..3b44f9c9c3 100644 --- a/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml b/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml index 71b17cecd5..b516342f3b 100644 --- a/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - dfrobot_sen0395.settings: - id: mmwave - factory_reset: true - detection_segments: - - [0cm, 5m] - - 600cm - - !lambda "return 7;" - output_latency: - delay_after_detect: 0s - delay_after_disappear: 0s - sensitivity: 6 - - dfrobot_sen0395.reset +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_dfrobot_sen0395 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -dfrobot_sen0395: - - id: mmwave - -binary_sensor: - - platform: dfrobot_sen0395 - id: mmwave_detected +<<: !include common.yaml diff --git a/tests/components/dht12/common.yaml b/tests/components/dht12/common.yaml new file mode 100644 index 0000000000..91346e0e27 --- /dev/null +++ b/tests/components/dht12/common.yaml @@ -0,0 +1,12 @@ +i2c: + - id: i2c_dht12 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: dht12 + temperature: + name: DHT12 Temperature + humidity: + name: DHT12 Humidity + update_interval: 15s diff --git a/tests/components/dht12/test.esp32-ard.yaml b/tests/components/dht12/test.esp32-ard.yaml index 02a00f5df7..63c3bd6afd 100644 --- a/tests/components/dht12/test.esp32-ard.yaml +++ b/tests/components/dht12/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dht12/test.esp32-c3-ard.yaml b/tests/components/dht12/test.esp32-c3-ard.yaml index c06c20fd9f..ee2c29ca4e 100644 --- a/tests/components/dht12/test.esp32-c3-ard.yaml +++ b/tests/components/dht12/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dht12/test.esp32-c3-idf.yaml b/tests/components/dht12/test.esp32-c3-idf.yaml index c06c20fd9f..ee2c29ca4e 100644 --- a/tests/components/dht12/test.esp32-c3-idf.yaml +++ b/tests/components/dht12/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dht12/test.esp32-idf.yaml b/tests/components/dht12/test.esp32-idf.yaml index 02a00f5df7..63c3bd6afd 100644 --- a/tests/components/dht12/test.esp32-idf.yaml +++ b/tests/components/dht12/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dht12/test.esp8266-ard.yaml b/tests/components/dht12/test.esp8266-ard.yaml index c06c20fd9f..ee2c29ca4e 100644 --- a/tests/components/dht12/test.esp8266-ard.yaml +++ b/tests/components/dht12/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dht12/test.rp2040-ard.yaml b/tests/components/dht12/test.rp2040-ard.yaml index c06c20fd9f..ee2c29ca4e 100644 --- a/tests/components/dht12/test.rp2040-ard.yaml +++ b/tests/components/dht12/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dht12 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dht12 - temperature: - name: DHT12 Temperature - humidity: - name: DHT12 Humidity - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/dps310/common.yaml b/tests/components/dps310/common.yaml new file mode 100644 index 0000000000..e6c0c9fab8 --- /dev/null +++ b/tests/components/dps310/common.yaml @@ -0,0 +1,12 @@ +i2c: + - id: i2c_dps310 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: dps310 + temperature: + name: DPS310 Temperature + pressure: + name: DPS310 Pressure + address: 0x77 diff --git a/tests/components/dps310/test.esp32-ard.yaml b/tests/components/dps310/test.esp32-ard.yaml index 417cab5c40..63c3bd6afd 100644 --- a/tests/components/dps310/test.esp32-ard.yaml +++ b/tests/components/dps310/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/dps310/test.esp32-c3-ard.yaml b/tests/components/dps310/test.esp32-c3-ard.yaml index 0e15e9ccc5..ee2c29ca4e 100644 --- a/tests/components/dps310/test.esp32-c3-ard.yaml +++ b/tests/components/dps310/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/dps310/test.esp32-c3-idf.yaml b/tests/components/dps310/test.esp32-c3-idf.yaml index 0e15e9ccc5..ee2c29ca4e 100644 --- a/tests/components/dps310/test.esp32-c3-idf.yaml +++ b/tests/components/dps310/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/dps310/test.esp32-idf.yaml b/tests/components/dps310/test.esp32-idf.yaml index 417cab5c40..63c3bd6afd 100644 --- a/tests/components/dps310/test.esp32-idf.yaml +++ b/tests/components/dps310/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/dps310/test.esp8266-ard.yaml b/tests/components/dps310/test.esp8266-ard.yaml index 0e15e9ccc5..ee2c29ca4e 100644 --- a/tests/components/dps310/test.esp8266-ard.yaml +++ b/tests/components/dps310/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/dps310/test.rp2040-ard.yaml b/tests/components/dps310/test.rp2040-ard.yaml index 0e15e9ccc5..ee2c29ca4e 100644 --- a/tests/components/dps310/test.rp2040-ard.yaml +++ b/tests/components/dps310/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_dps310 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: dps310 - temperature: - name: DPS310 Temperature - pressure: - name: DPS310 Pressure - address: 0x77 +<<: !include common.yaml diff --git a/tests/components/ds1307/common.yaml b/tests/components/ds1307/common.yaml new file mode 100644 index 0000000000..3466a9eec8 --- /dev/null +++ b/tests/components/ds1307/common.yaml @@ -0,0 +1,9 @@ +i2c: + - id: i2c_ds1307 + scl: ${scl_pin} + sda: ${sda_pin} + +time: + - platform: ds1307 + id: ds1307_time + update_interval: never diff --git a/tests/components/ds1307/test.esp32-ard.yaml b/tests/components/ds1307/test.esp32-ard.yaml index 017c7aac92..63c3bd6afd 100644 --- a/tests/components/ds1307/test.esp32-ard.yaml +++ b/tests/components/ds1307/test.esp32-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/ds1307/test.esp32-c3-ard.yaml b/tests/components/ds1307/test.esp32-c3-ard.yaml index c309b9c212..ee2c29ca4e 100644 --- a/tests/components/ds1307/test.esp32-c3-ard.yaml +++ b/tests/components/ds1307/test.esp32-c3-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/ds1307/test.esp32-c3-idf.yaml b/tests/components/ds1307/test.esp32-c3-idf.yaml index c309b9c212..ee2c29ca4e 100644 --- a/tests/components/ds1307/test.esp32-c3-idf.yaml +++ b/tests/components/ds1307/test.esp32-c3-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/ds1307/test.esp32-idf.yaml b/tests/components/ds1307/test.esp32-idf.yaml index 017c7aac92..63c3bd6afd 100644 --- a/tests/components/ds1307/test.esp32-idf.yaml +++ b/tests/components/ds1307/test.esp32-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/ds1307/test.esp8266-ard.yaml b/tests/components/ds1307/test.esp8266-ard.yaml index c309b9c212..ee2c29ca4e 100644 --- a/tests/components/ds1307/test.esp8266-ard.yaml +++ b/tests/components/ds1307/test.esp8266-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/ds1307/test.rp2040-ard.yaml b/tests/components/ds1307/test.rp2040-ard.yaml index c309b9c212..ee2c29ca4e 100644 --- a/tests/components/ds1307/test.rp2040-ard.yaml +++ b/tests/components/ds1307/test.rp2040-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -time: - - platform: ds1307 - id: ds1307_time - update_interval: never +<<: !include common.yaml diff --git a/tests/components/dsmr/common.yaml b/tests/components/dsmr/common.yaml new file mode 100644 index 0000000000..2901b811fe --- /dev/null +++ b/tests/components/dsmr/common.yaml @@ -0,0 +1,12 @@ +uart: + - id: uart_dsmr + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +dsmr: + decryption_key: 00112233445566778899aabbccddeeff + max_telegram_length: 1000 + request_pin: ${request_pin} + request_interval: 20s + receive_timeout: 100ms diff --git a/tests/components/dsmr/test.esp32-ard.yaml b/tests/components/dsmr/test.esp32-ard.yaml index 1fd0448ab3..7a65a48ec0 100644 --- a/tests/components/dsmr/test.esp32-ard.yaml +++ b/tests/components/dsmr/test.esp32-ard.yaml @@ -1,12 +1,6 @@ -uart: - - id: uart_dsmr - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO12 + rx_pin: GPIO14 + request_pin: GPIO15 -dsmr: - decryption_key: 00112233445566778899aabbccddeeff - max_telegram_length: 1000 - request_pin: 15 - request_interval: 20s - receive_timeout: 100ms +<<: !include common.yaml diff --git a/tests/components/dsmr/test.esp32-c3-ard.yaml b/tests/components/dsmr/test.esp32-c3-ard.yaml index e813556be8..72998506ac 100644 --- a/tests/components/dsmr/test.esp32-c3-ard.yaml +++ b/tests/components/dsmr/test.esp32-c3-ard.yaml @@ -1,12 +1,6 @@ -uart: - - id: uart_dsmr - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + request_pin: GPIO6 -dsmr: - decryption_key: 00112233445566778899aabbccddeeff - max_telegram_length: 1000 - request_pin: 6 - request_interval: 20s - receive_timeout: 100ms +<<: !include common.yaml diff --git a/tests/components/dsmr/test.esp8266-ard.yaml b/tests/components/dsmr/test.esp8266-ard.yaml index 8037fb4b1a..a47bd58806 100644 --- a/tests/components/dsmr/test.esp8266-ard.yaml +++ b/tests/components/dsmr/test.esp8266-ard.yaml @@ -1,12 +1,6 @@ -uart: - - id: uart_dsmr - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + request_pin: GPIO15 -dsmr: - decryption_key: 00112233445566778899aabbccddeeff - max_telegram_length: 1000 - request_pin: 15 - request_interval: 20s - receive_timeout: 100ms +<<: !include common.yaml diff --git a/tests/components/dsmr/test.rp2040-ard.yaml b/tests/components/dsmr/test.rp2040-ard.yaml index e813556be8..72998506ac 100644 --- a/tests/components/dsmr/test.rp2040-ard.yaml +++ b/tests/components/dsmr/test.rp2040-ard.yaml @@ -1,12 +1,6 @@ -uart: - - id: uart_dsmr - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + request_pin: GPIO6 -dsmr: - decryption_key: 00112233445566778899aabbccddeeff - max_telegram_length: 1000 - request_pin: 6 - request_interval: 20s - receive_timeout: 100ms +<<: !include common.yaml