diff --git a/tests/components/ufire_ec/common.yaml b/tests/components/ufire_ec/common.yaml new file mode 100644 index 0000000000..dcc957aaee --- /dev/null +++ b/tests/components/ufire_ec/common.yaml @@ -0,0 +1,25 @@ +esphome: + on_boot: + then: + - ufire_ec.calibrate_probe: + id: ufire_ec_board + solution: 0.146 + temperature: !lambda "return id(test_sensor).state;" + - ufire_ec.reset: + +i2c: + - id: i2c_ufire_ec + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: template + id: test_sensor + lambda: "return 21;" + - platform: ufire_ec + id: ufire_ec_board + ec: + name: Ufire EC + temperature_sensor: test_sensor + temperature_compensation: 20.0 + temperature_coefficient: 0.019 diff --git a/tests/components/ufire_ec/test.esp32-ard.yaml b/tests/components/ufire_ec/test.esp32-ard.yaml index 5e6a0daa9e..63c3bd6afd 100644 --- a/tests/components/ufire_ec/test.esp32-ard.yaml +++ b/tests/components/ufire_ec/test.esp32-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_ufire_ec - scl: 16 - sda: 17 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp32-c3-ard.yaml b/tests/components/ufire_ec/test.esp32-c3-ard.yaml index aa72c992b8..ee2c29ca4e 100644 --- a/tests/components/ufire_ec/test.esp32-c3-ard.yaml +++ b/tests/components/ufire_ec/test.esp32-c3-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ec - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp32-c3-idf.yaml b/tests/components/ufire_ec/test.esp32-c3-idf.yaml index aa72c992b8..ee2c29ca4e 100644 --- a/tests/components/ufire_ec/test.esp32-c3-idf.yaml +++ b/tests/components/ufire_ec/test.esp32-c3-idf.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ec - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp32-idf.yaml b/tests/components/ufire_ec/test.esp32-idf.yaml index 5e6a0daa9e..63c3bd6afd 100644 --- a/tests/components/ufire_ec/test.esp32-idf.yaml +++ b/tests/components/ufire_ec/test.esp32-idf.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_ufire_ec - scl: 16 - sda: 17 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp8266-ard.yaml b/tests/components/ufire_ec/test.esp8266-ard.yaml index aa72c992b8..ee2c29ca4e 100644 --- a/tests/components/ufire_ec/test.esp8266-ard.yaml +++ b/tests/components/ufire_ec/test.esp8266-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ec - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ec/test.rp2040-ard.yaml b/tests/components/ufire_ec/test.rp2040-ard.yaml index aa72c992b8..ee2c29ca4e 100644 --- a/tests/components/ufire_ec/test.rp2040-ard.yaml +++ b/tests/components/ufire_ec/test.rp2040-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ec.calibrate_probe: - id: ufire_ec_board - solution: 0.146 - temperature: !lambda "return id(test_sensor).state;" - - ufire_ec.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ec - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ec - id: ufire_ec_board - ec: - name: Ufire EC - temperature_sensor: test_sensor - temperature_compensation: 20.0 - temperature_coefficient: 0.019 +<<: !include common.yaml diff --git a/tests/components/ufire_ise/common.yaml b/tests/components/ufire_ise/common.yaml new file mode 100644 index 0000000000..d6ead8c479 --- /dev/null +++ b/tests/components/ufire_ise/common.yaml @@ -0,0 +1,25 @@ +esphome: + on_boot: + then: + - ufire_ise.calibrate_probe_high: + id: ufire_ise_sensor + solution: 7.0 + - ufire_ise.calibrate_probe_low: + id: ufire_ise_sensor + solution: 4.0 + - ufire_ise.reset: + +i2c: + - id: i2c_ufire_ise + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: template + id: test_sensor + lambda: "return 21;" + - platform: ufire_ise + id: ufire_ise_sensor + temperature_sensor: test_sensor + ph: + name: Ufire pH diff --git a/tests/components/ufire_ise/test.esp32-ard.yaml b/tests/components/ufire_ise/test.esp32-ard.yaml index 9ed0ac433a..63c3bd6afd 100644 --- a/tests/components/ufire_ise/test.esp32-ard.yaml +++ b/tests/components/ufire_ise/test.esp32-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_ufire_ise - scl: 16 - sda: 17 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp32-c3-ard.yaml b/tests/components/ufire_ise/test.esp32-c3-ard.yaml index 36aec73113..ee2c29ca4e 100644 --- a/tests/components/ufire_ise/test.esp32-c3-ard.yaml +++ b/tests/components/ufire_ise/test.esp32-c3-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ise - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp32-c3-idf.yaml b/tests/components/ufire_ise/test.esp32-c3-idf.yaml index 36aec73113..ee2c29ca4e 100644 --- a/tests/components/ufire_ise/test.esp32-c3-idf.yaml +++ b/tests/components/ufire_ise/test.esp32-c3-idf.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ise - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp32-idf.yaml b/tests/components/ufire_ise/test.esp32-idf.yaml index 9ed0ac433a..63c3bd6afd 100644 --- a/tests/components/ufire_ise/test.esp32-idf.yaml +++ b/tests/components/ufire_ise/test.esp32-idf.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_ufire_ise - scl: 16 - sda: 17 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp8266-ard.yaml b/tests/components/ufire_ise/test.esp8266-ard.yaml index 36aec73113..ee2c29ca4e 100644 --- a/tests/components/ufire_ise/test.esp8266-ard.yaml +++ b/tests/components/ufire_ise/test.esp8266-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ise - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/ufire_ise/test.rp2040-ard.yaml b/tests/components/ufire_ise/test.rp2040-ard.yaml index 36aec73113..ee2c29ca4e 100644 --- a/tests/components/ufire_ise/test.rp2040-ard.yaml +++ b/tests/components/ufire_ise/test.rp2040-ard.yaml @@ -1,25 +1,5 @@ -esphome: - on_boot: - then: - - ufire_ise.calibrate_probe_high: - id: ufire_ise_sensor - solution: 7.0 - - ufire_ise.calibrate_probe_low: - id: ufire_ise_sensor - solution: 4.0 - - ufire_ise.reset: +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_ufire_ise - scl: 5 - sda: 4 - -sensor: - - platform: template - id: test_sensor - lambda: "return 21;" - - platform: ufire_ise - id: ufire_ise_sensor - temperature_sensor: test_sensor - ph: - name: Ufire pH +<<: !include common.yaml diff --git a/tests/components/uln2003/common.yaml b/tests/components/uln2003/common.yaml new file mode 100644 index 0000000000..f848030592 --- /dev/null +++ b/tests/components/uln2003/common.yaml @@ -0,0 +1,29 @@ +esphome: + on_boot: + then: + - stepper.report_position: + id: uln2003_stepper + position: 250 + - stepper.set_target: + id: uln2003_stepper + target: 250 + - stepper.set_acceleration: + id: uln2003_stepper + acceleration: 250 steps/s^2 + - stepper.set_deceleration: + id: uln2003_stepper + deceleration: 250 steps/s^2 + - stepper.set_speed: + id: uln2003_stepper + speed: 250 steps/s + +stepper: + - platform: uln2003 + id: uln2003_stepper + pin_a: ${pin_a} + pin_b: ${pin_b} + pin_c: ${pin_c} + pin_d: ${pin_d} + max_speed: 250 steps/s + acceleration: 100 steps/s^2 + deceleration: 200 steps/s^2 diff --git a/tests/components/uln2003/test.esp32-ard.yaml b/tests/components/uln2003/test.esp32-ard.yaml index 61a6e94396..ee4cff0923 100644 --- a/tests/components/uln2003/test.esp32-ard.yaml +++ b/tests/components/uln2003/test.esp32-ard.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO12 + pin_b: GPIO13 + pin_c: GPIO14 + pin_d: GPIO15 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 12 - pin_b: 13 - pin_c: 14 - pin_d: 15 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/uln2003/test.esp32-c3-ard.yaml b/tests/components/uln2003/test.esp32-c3-ard.yaml index 2d19d4dba3..11d16a4d5d 100644 --- a/tests/components/uln2003/test.esp32-c3-ard.yaml +++ b/tests/components/uln2003/test.esp32-c3-ard.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO0 + pin_b: GPIO1 + pin_c: GPIO2 + pin_d: GPIO3 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 0 - pin_b: 1 - pin_c: 2 - pin_d: 3 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/uln2003/test.esp32-c3-idf.yaml b/tests/components/uln2003/test.esp32-c3-idf.yaml index 2d19d4dba3..11d16a4d5d 100644 --- a/tests/components/uln2003/test.esp32-c3-idf.yaml +++ b/tests/components/uln2003/test.esp32-c3-idf.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO0 + pin_b: GPIO1 + pin_c: GPIO2 + pin_d: GPIO3 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 0 - pin_b: 1 - pin_c: 2 - pin_d: 3 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/uln2003/test.esp32-idf.yaml b/tests/components/uln2003/test.esp32-idf.yaml index 61a6e94396..ee4cff0923 100644 --- a/tests/components/uln2003/test.esp32-idf.yaml +++ b/tests/components/uln2003/test.esp32-idf.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO12 + pin_b: GPIO13 + pin_c: GPIO14 + pin_d: GPIO15 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 12 - pin_b: 13 - pin_c: 14 - pin_d: 15 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/uln2003/test.esp8266-ard.yaml b/tests/components/uln2003/test.esp8266-ard.yaml index 61a6e94396..ee4cff0923 100644 --- a/tests/components/uln2003/test.esp8266-ard.yaml +++ b/tests/components/uln2003/test.esp8266-ard.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO12 + pin_b: GPIO13 + pin_c: GPIO14 + pin_d: GPIO15 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 12 - pin_b: 13 - pin_c: 14 - pin_d: 15 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/uln2003/test.rp2040-ard.yaml b/tests/components/uln2003/test.rp2040-ard.yaml index 2d19d4dba3..11d16a4d5d 100644 --- a/tests/components/uln2003/test.rp2040-ard.yaml +++ b/tests/components/uln2003/test.rp2040-ard.yaml @@ -1,29 +1,7 @@ -esphome: - on_boot: - then: - - stepper.report_position: - id: uln2003_stepper - position: 250 - - stepper.set_target: - id: uln2003_stepper - target: 250 - - stepper.set_acceleration: - id: uln2003_stepper - acceleration: 250 steps/s^2 - - stepper.set_deceleration: - id: uln2003_stepper - deceleration: 250 steps/s^2 - - stepper.set_speed: - id: uln2003_stepper - speed: 250 steps/s +substitutions: + pin_a: GPIO0 + pin_b: GPIO1 + pin_c: GPIO2 + pin_d: GPIO3 -stepper: - - platform: uln2003 - id: uln2003_stepper - pin_a: 0 - pin_b: 1 - pin_c: 2 - pin_d: 3 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 +<<: !include common.yaml diff --git a/tests/components/vbus/common.yaml b/tests/components/vbus/common.yaml new file mode 100644 index 0000000000..a1f94cd839 --- /dev/null +++ b/tests/components/vbus/common.yaml @@ -0,0 +1,42 @@ +uart: + - id: uart_vbus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +vbus: + +binary_sensor: + - platform: vbus + model: deltasol_bs_plus + relay1: + name: Relay 1 On + relay2: + name: Relay 2 On + sensor1_error: + name: Sensor 1 Error + - platform: vbus + model: custom + command: 0x100 + source: 0x1234 + dest: 0x10 + binary_sensors: + - id: vcustom_b + name: VBus Custom Binary Sensor + lambda: return x[0] & 1; + +sensor: + - platform: vbus + model: deltasol c + temperature_1: + name: Temperature 1 + temperature_2: + name: Temperature 2 + temperature_3: + name: Temperature 3 + operating_hours_1: + name: Operating Hours 1 + heat_quantity: + name: Heat Quantity + time: + name: System Time diff --git a/tests/components/vbus/test.esp32-ard.yaml b/tests/components/vbus/test.esp32-ard.yaml index a0e5ca42cc..f486544afa 100644 --- a/tests/components/vbus/test.esp32-ard.yaml +++ b/tests/components/vbus/test.esp32-ard.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/vbus/test.esp32-c3-ard.yaml b/tests/components/vbus/test.esp32-c3-ard.yaml index 67ee542031..b516342f3b 100644 --- a/tests/components/vbus/test.esp32-c3-ard.yaml +++ b/tests/components/vbus/test.esp32-c3-ard.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/vbus/test.esp32-c3-idf.yaml b/tests/components/vbus/test.esp32-c3-idf.yaml index 67ee542031..b516342f3b 100644 --- a/tests/components/vbus/test.esp32-c3-idf.yaml +++ b/tests/components/vbus/test.esp32-c3-idf.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/vbus/test.esp32-idf.yaml b/tests/components/vbus/test.esp32-idf.yaml index a0e5ca42cc..f486544afa 100644 --- a/tests/components/vbus/test.esp32-idf.yaml +++ b/tests/components/vbus/test.esp32-idf.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/vbus/test.esp8266-ard.yaml b/tests/components/vbus/test.esp8266-ard.yaml index 67ee542031..b516342f3b 100644 --- a/tests/components/vbus/test.esp8266-ard.yaml +++ b/tests/components/vbus/test.esp8266-ard.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/vbus/test.rp2040-ard.yaml b/tests/components/vbus/test.rp2040-ard.yaml index 67ee542031..b516342f3b 100644 --- a/tests/components/vbus/test.rp2040-ard.yaml +++ b/tests/components/vbus/test.rp2040-ard.yaml @@ -1,42 +1,5 @@ -uart: - - id: uart_vbus - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -vbus: - -binary_sensor: - - platform: vbus - model: deltasol_bs_plus - relay1: - name: Relay 1 On - relay2: - name: Relay 2 On - sensor1_error: - name: Sensor 1 Error - - platform: vbus - model: custom - command: 0x100 - source: 0x1234 - dest: 0x10 - binary_sensors: - - id: vcustom_b - name: VBus Custom Binary Sensor - lambda: return x[0] & 1; - -sensor: - - platform: vbus - model: deltasol c - temperature_1: - name: Temperature 1 - temperature_2: - name: Temperature 2 - temperature_3: - name: Temperature 3 - operating_hours_1: - name: Operating Hours 1 - heat_quantity: - name: Heat Quantity - time: - name: System Time +<<: !include common.yaml diff --git a/tests/components/veml3235/common.yaml b/tests/components/veml3235/common.yaml new file mode 100644 index 0000000000..b89a9e12c7 --- /dev/null +++ b/tests/components/veml3235/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_veml3235 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: veml3235 + id: veml3235_sensor + name: VEML3235 Light Sensor + auto_gain: true + auto_gain_threshold_high: 90% + auto_gain_threshold_low: 15% + digital_gain: 1X + gain: 1X + integration_time: 50ms diff --git a/tests/components/veml3235/test.esp32-ard.yaml b/tests/components/veml3235/test.esp32-ard.yaml index 3442fa4317..63c3bd6afd 100644 --- a/tests/components/veml3235/test.esp32-ard.yaml +++ b/tests/components/veml3235/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml3235/test.esp32-c3-ard.yaml b/tests/components/veml3235/test.esp32-c3-ard.yaml index 1f79c5f50c..ee2c29ca4e 100644 --- a/tests/components/veml3235/test.esp32-c3-ard.yaml +++ b/tests/components/veml3235/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml3235/test.esp32-c3-idf.yaml b/tests/components/veml3235/test.esp32-c3-idf.yaml index 1f79c5f50c..ee2c29ca4e 100644 --- a/tests/components/veml3235/test.esp32-c3-idf.yaml +++ b/tests/components/veml3235/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml3235/test.esp32-idf.yaml b/tests/components/veml3235/test.esp32-idf.yaml index 3442fa4317..63c3bd6afd 100644 --- a/tests/components/veml3235/test.esp32-idf.yaml +++ b/tests/components/veml3235/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml3235/test.esp8266-ard.yaml b/tests/components/veml3235/test.esp8266-ard.yaml index 1f79c5f50c..ee2c29ca4e 100644 --- a/tests/components/veml3235/test.esp8266-ard.yaml +++ b/tests/components/veml3235/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml3235/test.rp2040-ard.yaml b/tests/components/veml3235/test.rp2040-ard.yaml index 1f79c5f50c..ee2c29ca4e 100644 --- a/tests/components/veml3235/test.rp2040-ard.yaml +++ b/tests/components/veml3235/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_veml3235 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: veml3235 - id: veml3235_sensor - name: VEML3235 Light Sensor - auto_gain: true - auto_gain_threshold_high: 90% - auto_gain_threshold_low: 15% - digital_gain: 1X - gain: 1X - integration_time: 50ms +<<: !include common.yaml diff --git a/tests/components/veml7700/common.yaml b/tests/components/veml7700/common.yaml index 6620c8d7e1..af4ebee6e7 100644 --- a/tests/components/veml7700/common.yaml +++ b/tests/components/veml7700/common.yaml @@ -1,3 +1,8 @@ +i2c: + - id: i2c_veml7700 + scl: ${scl_pin} + sda: ${sda_pin} + sensor: - platform: veml7700 address: 0x10 diff --git a/tests/components/veml7700/test.esp32-ard.yaml b/tests/components/veml7700/test.esp32-ard.yaml index 4b812a1392..63c3bd6afd 100644 --- a/tests/components/veml7700/test.esp32-ard.yaml +++ b/tests/components/veml7700/test.esp32-ard.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp32-c3-ard.yaml b/tests/components/veml7700/test.esp32-c3-ard.yaml index ce0fa0125b..ee2c29ca4e 100644 --- a/tests/components/veml7700/test.esp32-c3-ard.yaml +++ b/tests/components/veml7700/test.esp32-c3-ard.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp32-c3-idf.yaml b/tests/components/veml7700/test.esp32-c3-idf.yaml index ce0fa0125b..ee2c29ca4e 100644 --- a/tests/components/veml7700/test.esp32-c3-idf.yaml +++ b/tests/components/veml7700/test.esp32-c3-idf.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp32-idf.yaml b/tests/components/veml7700/test.esp32-idf.yaml index 4b812a1392..63c3bd6afd 100644 --- a/tests/components/veml7700/test.esp32-idf.yaml +++ b/tests/components/veml7700/test.esp32-idf.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp8266-ard.yaml b/tests/components/veml7700/test.esp8266-ard.yaml index ce0fa0125b..ee2c29ca4e 100644 --- a/tests/components/veml7700/test.esp8266-ard.yaml +++ b/tests/components/veml7700/test.esp8266-ard.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 <<: !include common.yaml diff --git a/tests/components/veml7700/test.rp2040-ard.yaml b/tests/components/veml7700/test.rp2040-ard.yaml index ce0fa0125b..ee2c29ca4e 100644 --- a/tests/components/veml7700/test.rp2040-ard.yaml +++ b/tests/components/veml7700/test.rp2040-ard.yaml @@ -1,6 +1,5 @@ -i2c: - - id: i2c_veml7700 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 <<: !include common.yaml diff --git a/tests/components/vl53l0x/common.yaml b/tests/components/vl53l0x/common.yaml new file mode 100644 index 0000000000..973e481b1a --- /dev/null +++ b/tests/components/vl53l0x/common.yaml @@ -0,0 +1,12 @@ +i2c: + - id: i2c_vl53l0x + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: vl53l0x + name: VL53L0x Distance + address: 0x29 + enable_pin: 3 + timeout: 200us + update_interval: 60s diff --git a/tests/components/vl53l0x/test.esp32-ard.yaml b/tests/components/vl53l0x/test.esp32-ard.yaml index 8f35de0e72..63c3bd6afd 100644 --- a/tests/components/vl53l0x/test.esp32-ard.yaml +++ b/tests/components/vl53l0x/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp32-c3-ard.yaml b/tests/components/vl53l0x/test.esp32-c3-ard.yaml index 832f7dcfbc..ee2c29ca4e 100644 --- a/tests/components/vl53l0x/test.esp32-c3-ard.yaml +++ b/tests/components/vl53l0x/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp32-c3-idf.yaml b/tests/components/vl53l0x/test.esp32-c3-idf.yaml index 832f7dcfbc..ee2c29ca4e 100644 --- a/tests/components/vl53l0x/test.esp32-c3-idf.yaml +++ b/tests/components/vl53l0x/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp32-idf.yaml b/tests/components/vl53l0x/test.esp32-idf.yaml index 8f35de0e72..63c3bd6afd 100644 --- a/tests/components/vl53l0x/test.esp32-idf.yaml +++ b/tests/components/vl53l0x/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp8266-ard.yaml b/tests/components/vl53l0x/test.esp8266-ard.yaml index 832f7dcfbc..ee2c29ca4e 100644 --- a/tests/components/vl53l0x/test.esp8266-ard.yaml +++ b/tests/components/vl53l0x/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/vl53l0x/test.rp2040-ard.yaml b/tests/components/vl53l0x/test.rp2040-ard.yaml index 832f7dcfbc..ee2c29ca4e 100644 --- a/tests/components/vl53l0x/test.rp2040-ard.yaml +++ b/tests/components/vl53l0x/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_vl53l0x - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: vl53l0x - name: VL53L0x Distance - address: 0x29 - enable_pin: 3 - timeout: 200us - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/voice_assistant/common.yaml b/tests/components/voice_assistant/common.yaml new file mode 100644 index 0000000000..e7374941f7 --- /dev/null +++ b/tests/components/voice_assistant/common.yaml @@ -0,0 +1,57 @@ +esphome: + on_boot: + then: + - voice_assistant.start + - voice_assistant.start_continuous + - voice_assistant.stop + +wifi: + ssid: MySSID + password: password1 + +api: + +i2s_audio: + i2s_lrclk_pin: ${i2s_lrclk_pin} + i2s_bclk_pin: ${i2s_bclk_pin} + i2s_mclk_pin: ${i2s_mclk_pin} + +microphone: + - platform: i2s_audio + id: mic_id_external + i2s_din_pin: ${i2s_din_pin} + adc_type: external + pdm: false + +speaker: + - platform: i2s_audio + id: speaker_id + dac_type: external + i2s_dout_pin: ${i2s_dout_pin} + +voice_assistant: + microphone: mic_id_external + speaker: speaker_id + conversation_timeout: 60s + on_listening: + - logger.log: "Voice assistant microphone listening" + on_start: + - logger.log: "Voice assistant started" + on_stt_end: + - logger.log: + format: "Voice assistant STT ended with result %s" + args: [x.c_str()] + on_tts_start: + - logger.log: + format: "Voice assistant TTS started with text %s" + args: [x.c_str()] + on_tts_end: + - logger.log: + format: "Voice assistant TTS ended with url %s" + args: [x.c_str()] + on_end: + - logger.log: "Voice assistant ended" + on_error: + - logger.log: + format: "Voice assistant error - code %s, message: %s" + args: [code.c_str(), message.c_str()] diff --git a/tests/components/voice_assistant/test.esp32-ard.yaml b/tests/components/voice_assistant/test.esp32-ard.yaml index cbf9460087..f6e553f9dc 100644 --- a/tests/components/voice_assistant/test.esp32-ard.yaml +++ b/tests/components/voice_assistant/test.esp32-ard.yaml @@ -1,57 +1,8 @@ -esphome: - on_boot: - then: - - voice_assistant.start - - voice_assistant.start_continuous - - voice_assistant.stop +substitutions: + i2s_lrclk_pin: GPIO16 + i2s_bclk_pin: GPIO17 + i2s_mclk_pin: GPIO15 + i2s_din_pin: GPIO13 + i2s_dout_pin: GPIO12 -wifi: - ssid: MySSID - password: password1 - -api: - -i2s_audio: - i2s_lrclk_pin: 16 - i2s_bclk_pin: 17 - i2s_mclk_pin: 15 - -microphone: - - platform: i2s_audio - id: mic_id_external - i2s_din_pin: 13 - adc_type: external - pdm: false - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 12 - -voice_assistant: - microphone: mic_id_external - speaker: speaker_id - conversation_timeout: 60s - on_listening: - - logger.log: "Voice assistant microphone listening" - on_start: - - logger.log: "Voice assistant started" - on_stt_end: - - logger.log: - format: "Voice assistant STT ended with result %s" - args: [x.c_str()] - on_tts_start: - - logger.log: - format: "Voice assistant TTS started with text %s" - args: [x.c_str()] - on_tts_end: - - logger.log: - format: "Voice assistant TTS ended with url %s" - args: [x.c_str()] - on_end: - - logger.log: "Voice assistant ended" - on_error: - - logger.log: - format: "Voice assistant error - code %s, message: %s" - args: [code.c_str(), message.c_str()] +<<: !include common.yaml diff --git a/tests/components/voice_assistant/test.esp32-c3-ard.yaml b/tests/components/voice_assistant/test.esp32-c3-ard.yaml index 86357fad36..f596d927cb 100644 --- a/tests/components/voice_assistant/test.esp32-c3-ard.yaml +++ b/tests/components/voice_assistant/test.esp32-c3-ard.yaml @@ -1,56 +1,8 @@ -esphome: - on_boot: - then: - - voice_assistant.start - - voice_assistant.start_continuous - - voice_assistant.stop +substitutions: + i2s_lrclk_pin: GPIO6 + i2s_bclk_pin: GPIO7 + i2s_mclk_pin: GPIO5 + i2s_din_pin: GPIO3 + i2s_dout_pin: GPIO2 -wifi: - ssid: MySSID - password: password1 - -api: - -i2s_audio: - i2s_lrclk_pin: 6 - i2s_bclk_pin: 7 - i2s_mclk_pin: 5 - -microphone: - - platform: i2s_audio - id: mic_id_external - i2s_din_pin: 3 - adc_type: external - pdm: false - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 2 - -voice_assistant: - microphone: mic_id_external - speaker: speaker_id - on_listening: - - logger.log: "Voice assistant microphone listening" - on_start: - - logger.log: "Voice assistant started" - on_stt_end: - - logger.log: - format: "Voice assistant STT ended with result %s" - args: [x.c_str()] - on_tts_start: - - logger.log: - format: "Voice assistant TTS started with text %s" - args: [x.c_str()] - on_tts_end: - - logger.log: - format: "Voice assistant TTS ended with url %s" - args: [x.c_str()] - on_end: - - logger.log: "Voice assistant ended" - on_error: - - logger.log: - format: "Voice assistant error - code %s, message: %s" - args: [code.c_str(), message.c_str()] +<<: !include common.yaml diff --git a/tests/components/voice_assistant/test.esp32-c3-idf.yaml b/tests/components/voice_assistant/test.esp32-c3-idf.yaml index 86357fad36..f596d927cb 100644 --- a/tests/components/voice_assistant/test.esp32-c3-idf.yaml +++ b/tests/components/voice_assistant/test.esp32-c3-idf.yaml @@ -1,56 +1,8 @@ -esphome: - on_boot: - then: - - voice_assistant.start - - voice_assistant.start_continuous - - voice_assistant.stop +substitutions: + i2s_lrclk_pin: GPIO6 + i2s_bclk_pin: GPIO7 + i2s_mclk_pin: GPIO5 + i2s_din_pin: GPIO3 + i2s_dout_pin: GPIO2 -wifi: - ssid: MySSID - password: password1 - -api: - -i2s_audio: - i2s_lrclk_pin: 6 - i2s_bclk_pin: 7 - i2s_mclk_pin: 5 - -microphone: - - platform: i2s_audio - id: mic_id_external - i2s_din_pin: 3 - adc_type: external - pdm: false - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 2 - -voice_assistant: - microphone: mic_id_external - speaker: speaker_id - on_listening: - - logger.log: "Voice assistant microphone listening" - on_start: - - logger.log: "Voice assistant started" - on_stt_end: - - logger.log: - format: "Voice assistant STT ended with result %s" - args: [x.c_str()] - on_tts_start: - - logger.log: - format: "Voice assistant TTS started with text %s" - args: [x.c_str()] - on_tts_end: - - logger.log: - format: "Voice assistant TTS ended with url %s" - args: [x.c_str()] - on_end: - - logger.log: "Voice assistant ended" - on_error: - - logger.log: - format: "Voice assistant error - code %s, message: %s" - args: [code.c_str(), message.c_str()] +<<: !include common.yaml diff --git a/tests/components/voice_assistant/test.esp32-idf.yaml b/tests/components/voice_assistant/test.esp32-idf.yaml index da9b50721f..f6e553f9dc 100644 --- a/tests/components/voice_assistant/test.esp32-idf.yaml +++ b/tests/components/voice_assistant/test.esp32-idf.yaml @@ -1,56 +1,8 @@ -esphome: - on_boot: - then: - - voice_assistant.start - - voice_assistant.start_continuous - - voice_assistant.stop +substitutions: + i2s_lrclk_pin: GPIO16 + i2s_bclk_pin: GPIO17 + i2s_mclk_pin: GPIO15 + i2s_din_pin: GPIO13 + i2s_dout_pin: GPIO12 -wifi: - ssid: MySSID - password: password1 - -api: - -i2s_audio: - i2s_lrclk_pin: 16 - i2s_bclk_pin: 17 - i2s_mclk_pin: 15 - -microphone: - - platform: i2s_audio - id: mic_id_external - i2s_din_pin: 13 - adc_type: external - pdm: false - -speaker: - - platform: i2s_audio - id: speaker_id - dac_type: external - i2s_dout_pin: 12 - -voice_assistant: - microphone: mic_id_external - speaker: speaker_id - on_listening: - - logger.log: "Voice assistant microphone listening" - on_start: - - logger.log: "Voice assistant started" - on_stt_end: - - logger.log: - format: "Voice assistant STT ended with result %s" - args: [x.c_str()] - on_tts_start: - - logger.log: - format: "Voice assistant TTS started with text %s" - args: [x.c_str()] - on_tts_end: - - logger.log: - format: "Voice assistant TTS ended with url %s" - args: [x.c_str()] - on_end: - - logger.log: "Voice assistant ended" - on_error: - - logger.log: - format: "Voice assistant error - code %s, message: %s" - args: [code.c_str(), message.c_str()] +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/common.yaml b/tests/components/waveshare_epaper/common.yaml new file mode 100644 index 0000000000..92c443908e --- /dev/null +++ b/tests/components/waveshare_epaper/common.yaml @@ -0,0 +1,190 @@ +spi: + - id: spi_waveshare_epaper + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + +display: + - platform: waveshare_epaper + model: 2.13in-ttgo-b1 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.13in-ttgo-b74 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.90in + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + reset_duration: 200ms + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.90inv2 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.90in-dke + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 1 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.70in-b + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.70in-bv2 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 1.54in-m5coreink-m09 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.13inv3 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 2.13inv2 + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + full_update_every: 30 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + - platform: waveshare_epaper + model: 7.50in-bv3-bwr + cs_pin: + allow_other_uses: true + number: ${cs_pin} + dc_pin: + allow_other_uses: true + number: ${dc_pin} + busy_pin: + allow_other_uses: true + number: ${busy_pin} + reset_pin: + allow_other_uses: true + number: ${reset_pin} + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); diff --git a/tests/components/waveshare_epaper/test.esp32-ard.yaml b/tests/components/waveshare_epaper/test.esp32-ard.yaml index 944f98a1e9..c658ea91ee 100644 --- a/tests/components/waveshare_epaper/test.esp32-ard.yaml +++ b/tests/components/waveshare_epaper/test.esp32-ard.yaml @@ -1,207 +1,9 @@ ---- -spi: - - id: spi_id_1 - clk_pin: - number: GPIO18 - mosi_pin: - number: GPIO23 - miso_pin: - number: GPIO19 - interface: hardware +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO18 + dc_pin: GPIO19 + busy_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: waveshare_epaper - model: 2.13in-ttgo-b1 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.13in-ttgo-b74 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.90in - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.90inv2 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.90in-dke - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.70in-b - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.70in-bv2 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 1.54in-m5coreink-m09 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.13inv3 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 2.13inv2 - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - model: 7.50in-bv3-bwr - spi_id: spi_id_1 - cs_pin: - allow_other_uses: true - number: GPIO25 - dc_pin: - allow_other_uses: true - number: GPIO26 - busy_pin: - allow_other_uses: true - number: GPIO27 - reset_pin: - allow_other_uses: true - number: GPIO32 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp32-c3-ard.yaml b/tests/components/waveshare_epaper/test.esp32-c3-ard.yaml index 5d651bd180..e2873f0fe9 100644 --- a/tests/components/waveshare_epaper/test.esp32-c3-ard.yaml +++ b/tests/components/waveshare_epaper/test.esp32-c3-ard.yaml @@ -1,123 +1,9 @@ -spi: - - id: spi_waveshare_epaper - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + cs_pin: GPIO0 + dc_pin: GPIO5 + busy_pin: GPIO3 + reset_pin: GPIO4 -display: - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.13in-ttgo-b1 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90in - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90inv2 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-b - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-bv2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 1.54in-m5coreink-m09 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 7.50in-bv3-bwr - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml b/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml index 5d651bd180..e2873f0fe9 100644 --- a/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml +++ b/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml @@ -1,123 +1,9 @@ -spi: - - id: spi_waveshare_epaper - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + cs_pin: GPIO0 + dc_pin: GPIO5 + busy_pin: GPIO3 + reset_pin: GPIO4 -display: - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.13in-ttgo-b1 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90in - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90inv2 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-b - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-bv2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 1.54in-m5coreink-m09 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 7.50in-bv3-bwr - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp32-idf.yaml b/tests/components/waveshare_epaper/test.esp32-idf.yaml index 47f894d967..c658ea91ee 100644 --- a/tests/components/waveshare_epaper/test.esp32-idf.yaml +++ b/tests/components/waveshare_epaper/test.esp32-idf.yaml @@ -1,123 +1,9 @@ -spi: - - id: spi_bme280 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + cs_pin: GPIO18 + dc_pin: GPIO19 + busy_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.13in-ttgo-b1 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90in - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90inv2 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-b - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-bv2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 1.54in-m5coreink-m09 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 7.50in-bv3-bwr - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp8266-ard.yaml b/tests/components/waveshare_epaper/test.esp8266-ard.yaml index ceda328598..bc178b7009 100644 --- a/tests/components/waveshare_epaper/test.esp8266-ard.yaml +++ b/tests/components/waveshare_epaper/test.esp8266-ard.yaml @@ -1,123 +1,9 @@ -spi: - - id: spi_bme280 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + cs_pin: GPIO15 + dc_pin: GPIO12 + busy_pin: GPIO5 + reset_pin: GPIO4 -display: - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.13in-ttgo-b1 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90in - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.90inv2 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-b - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 2.70in-bv2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 1.54in-m5coreink-m09 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 4 - dc_pin: - allow_other_uses: true - number: 4 - busy_pin: - allow_other_uses: true - number: 4 - reset_pin: - allow_other_uses: true - number: 4 - model: 7.50in-bv3-bwr - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.rp2040-ard.yaml b/tests/components/waveshare_epaper/test.rp2040-ard.yaml index be7e780033..801b0b51c5 100644 --- a/tests/components/waveshare_epaper/test.rp2040-ard.yaml +++ b/tests/components/waveshare_epaper/test.rp2040-ard.yaml @@ -1,123 +1,9 @@ -spi: - - id: spi_bme280 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + cs_pin: GPIO5 + dc_pin: GPIO4 + busy_pin: GPIO0 + reset_pin: GPIO1 -display: - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 2.13in-ttgo-b1 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 2.90in - full_update_every: 30 - reset_duration: 200ms - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 2.90inv2 - full_update_every: 30 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 2.70in-b - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 2.70in-bv2 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 1.54in-m5coreink-m09 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - - platform: waveshare_epaper - cs_pin: - allow_other_uses: true - number: 5 - dc_pin: - allow_other_uses: true - number: 5 - busy_pin: - allow_other_uses: true - number: 5 - reset_pin: - allow_other_uses: true - number: 5 - model: 7.50in-bv3-bwr - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/whirlpool/common.yaml b/tests/components/whirlpool/common.yaml new file mode 100644 index 0000000000..804c1aac26 --- /dev/null +++ b/tests/components/whirlpool/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: whirlpool + name: Whirlpool Climate diff --git a/tests/components/whirlpool/test.esp32-ard.yaml b/tests/components/whirlpool/test.esp32-ard.yaml index 4d0afc39a4..7b012aa64c 100644 --- a/tests/components/whirlpool/test.esp32-ard.yaml +++ b/tests/components/whirlpool/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whirlpool - name: Whirlpool Climate +<<: !include common.yaml diff --git a/tests/components/whirlpool/test.esp32-c3-ard.yaml b/tests/components/whirlpool/test.esp32-c3-ard.yaml index 4d0afc39a4..7b012aa64c 100644 --- a/tests/components/whirlpool/test.esp32-c3-ard.yaml +++ b/tests/components/whirlpool/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whirlpool - name: Whirlpool Climate +<<: !include common.yaml diff --git a/tests/components/whirlpool/test.esp32-c3-idf.yaml b/tests/components/whirlpool/test.esp32-c3-idf.yaml index 4d0afc39a4..7b012aa64c 100644 --- a/tests/components/whirlpool/test.esp32-c3-idf.yaml +++ b/tests/components/whirlpool/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whirlpool - name: Whirlpool Climate +<<: !include common.yaml diff --git a/tests/components/whirlpool/test.esp32-idf.yaml b/tests/components/whirlpool/test.esp32-idf.yaml index 4d0afc39a4..7b012aa64c 100644 --- a/tests/components/whirlpool/test.esp32-idf.yaml +++ b/tests/components/whirlpool/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whirlpool - name: Whirlpool Climate +<<: !include common.yaml diff --git a/tests/components/whirlpool/test.esp8266-ard.yaml b/tests/components/whirlpool/test.esp8266-ard.yaml index efd530c160..f5097fcf5f 100644 --- a/tests/components/whirlpool/test.esp8266-ard.yaml +++ b/tests/components/whirlpool/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: whirlpool - name: Whirlpool Climate +<<: !include common.yaml diff --git a/tests/components/whynter/common.yaml b/tests/components/whynter/common.yaml new file mode 100644 index 0000000000..04ad6bed54 --- /dev/null +++ b/tests/components/whynter/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: whynter + name: Whynter Climate diff --git a/tests/components/whynter/test.esp32-ard.yaml b/tests/components/whynter/test.esp32-ard.yaml index dc8fb9584d..7b012aa64c 100644 --- a/tests/components/whynter/test.esp32-ard.yaml +++ b/tests/components/whynter/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whynter - name: Whynter Climate +<<: !include common.yaml diff --git a/tests/components/whynter/test.esp32-c3-ard.yaml b/tests/components/whynter/test.esp32-c3-ard.yaml index dc8fb9584d..7b012aa64c 100644 --- a/tests/components/whynter/test.esp32-c3-ard.yaml +++ b/tests/components/whynter/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whynter - name: Whynter Climate +<<: !include common.yaml diff --git a/tests/components/whynter/test.esp32-c3-idf.yaml b/tests/components/whynter/test.esp32-c3-idf.yaml index dc8fb9584d..7b012aa64c 100644 --- a/tests/components/whynter/test.esp32-c3-idf.yaml +++ b/tests/components/whynter/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whynter - name: Whynter Climate +<<: !include common.yaml diff --git a/tests/components/whynter/test.esp32-idf.yaml b/tests/components/whynter/test.esp32-idf.yaml index dc8fb9584d..7b012aa64c 100644 --- a/tests/components/whynter/test.esp32-idf.yaml +++ b/tests/components/whynter/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: whynter - name: Whynter Climate +<<: !include common.yaml diff --git a/tests/components/whynter/test.esp8266-ard.yaml b/tests/components/whynter/test.esp8266-ard.yaml index a656a7427d..f5097fcf5f 100644 --- a/tests/components/whynter/test.esp8266-ard.yaml +++ b/tests/components/whynter/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: whynter - name: Whynter Climate +<<: !include common.yaml diff --git a/tests/components/wl_134/common.yaml b/tests/components/wl_134/common.yaml new file mode 100644 index 0000000000..71c50be79b --- /dev/null +++ b/tests/components/wl_134/common.yaml @@ -0,0 +1,10 @@ +uart: + - id: uart_wl_134 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +text_sensor: + - platform: wl_134 + name: Transponder Code + reset: true diff --git a/tests/components/wl_134/test.esp32-ard.yaml b/tests/components/wl_134/test.esp32-ard.yaml index d517889d28..f486544afa 100644 --- a/tests/components/wl_134/test.esp32-ard.yaml +++ b/tests/components/wl_134/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/wl_134/test.esp32-c3-ard.yaml b/tests/components/wl_134/test.esp32-c3-ard.yaml index 7cda1ba060..b516342f3b 100644 --- a/tests/components/wl_134/test.esp32-c3-ard.yaml +++ b/tests/components/wl_134/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/wl_134/test.esp32-c3-idf.yaml b/tests/components/wl_134/test.esp32-c3-idf.yaml index 7cda1ba060..b516342f3b 100644 --- a/tests/components/wl_134/test.esp32-c3-idf.yaml +++ b/tests/components/wl_134/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/wl_134/test.esp32-idf.yaml b/tests/components/wl_134/test.esp32-idf.yaml index d517889d28..f486544afa 100644 --- a/tests/components/wl_134/test.esp32-idf.yaml +++ b/tests/components/wl_134/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/wl_134/test.esp8266-ard.yaml b/tests/components/wl_134/test.esp8266-ard.yaml index 7cda1ba060..b516342f3b 100644 --- a/tests/components/wl_134/test.esp8266-ard.yaml +++ b/tests/components/wl_134/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/wl_134/test.rp2040-ard.yaml b/tests/components/wl_134/test.rp2040-ard.yaml index 7cda1ba060..b516342f3b 100644 --- a/tests/components/wl_134/test.rp2040-ard.yaml +++ b/tests/components/wl_134/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_wl_134 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -text_sensor: - - platform: wl_134 - name: Transponder Code - reset: true +<<: !include common.yaml diff --git a/tests/components/x9c/common.yaml b/tests/components/x9c/common.yaml new file mode 100644 index 0000000000..07713c66c3 --- /dev/null +++ b/tests/components/x9c/common.yaml @@ -0,0 +1,8 @@ +output: + - platform: x9c + id: test_x9c + cs_pin: ${cs_pin} + inc_pin: ${inc_pin} + ud_pin: ${ud_pin} + initial_value: 0.5 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32-ard.yaml b/tests/components/x9c/test.esp32-ard.yaml index f587b69b4f..6dfe3a67eb 100644 --- a/tests/components/x9c/test.esp32-ard.yaml +++ b/tests/components/x9c/test.esp32-ard.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 13 - inc_pin: 14 - ud_pin: 15 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO13 + inc_pin: GPIO14 + ud_pin: GPIO15 + +<<: !include common.yaml diff --git a/tests/components/x9c/test.esp32-c3-ard.yaml b/tests/components/x9c/test.esp32-c3-ard.yaml index 972c743fcd..b06e15a98c 100644 --- a/tests/components/x9c/test.esp32-c3-ard.yaml +++ b/tests/components/x9c/test.esp32-c3-ard.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 3 - inc_pin: 4 - ud_pin: 5 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO3 + inc_pin: GPIO4 + ud_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/x9c/test.esp32-c3-idf.yaml b/tests/components/x9c/test.esp32-c3-idf.yaml index 972c743fcd..b06e15a98c 100644 --- a/tests/components/x9c/test.esp32-c3-idf.yaml +++ b/tests/components/x9c/test.esp32-c3-idf.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 3 - inc_pin: 4 - ud_pin: 5 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO3 + inc_pin: GPIO4 + ud_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/x9c/test.esp32-idf.yaml b/tests/components/x9c/test.esp32-idf.yaml index f587b69b4f..6dfe3a67eb 100644 --- a/tests/components/x9c/test.esp32-idf.yaml +++ b/tests/components/x9c/test.esp32-idf.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 13 - inc_pin: 14 - ud_pin: 15 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO13 + inc_pin: GPIO14 + ud_pin: GPIO15 + +<<: !include common.yaml diff --git a/tests/components/x9c/test.esp8266-ard.yaml b/tests/components/x9c/test.esp8266-ard.yaml index f587b69b4f..6dfe3a67eb 100644 --- a/tests/components/x9c/test.esp8266-ard.yaml +++ b/tests/components/x9c/test.esp8266-ard.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 13 - inc_pin: 14 - ud_pin: 15 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO13 + inc_pin: GPIO14 + ud_pin: GPIO15 + +<<: !include common.yaml diff --git a/tests/components/x9c/test.rp2040-ard.yaml b/tests/components/x9c/test.rp2040-ard.yaml index 972c743fcd..b06e15a98c 100644 --- a/tests/components/x9c/test.rp2040-ard.yaml +++ b/tests/components/x9c/test.rp2040-ard.yaml @@ -1,8 +1,6 @@ -output: - - platform: x9c - id: test_x9c - cs_pin: 3 - inc_pin: 4 - ud_pin: 5 - initial_value: 0.5 - step_delay: 50us +substitutions: + cs_pin: GPIO3 + inc_pin: GPIO4 + ud_pin: GPIO5 + +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/common.yaml b/tests/components/xgzp68xx/common.yaml new file mode 100644 index 0000000000..224dd9ed14 --- /dev/null +++ b/tests/components/xgzp68xx/common.yaml @@ -0,0 +1,12 @@ +i2c: + - id: i2c_xgzp68xx + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: xgzp68xx + k_value: 4096 + temperature: + name: Pressure Temperature + pressure: + name: Differential pressure diff --git a/tests/components/xgzp68xx/test.esp32-ard.yaml b/tests/components/xgzp68xx/test.esp32-ard.yaml index fb55421123..63c3bd6afd 100644 --- a/tests/components/xgzp68xx/test.esp32-ard.yaml +++ b/tests/components/xgzp68xx/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp32-c3-ard.yaml b/tests/components/xgzp68xx/test.esp32-c3-ard.yaml index 25df8cc225..ee2c29ca4e 100644 --- a/tests/components/xgzp68xx/test.esp32-c3-ard.yaml +++ b/tests/components/xgzp68xx/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp32-c3-idf.yaml b/tests/components/xgzp68xx/test.esp32-c3-idf.yaml index 25df8cc225..ee2c29ca4e 100644 --- a/tests/components/xgzp68xx/test.esp32-c3-idf.yaml +++ b/tests/components/xgzp68xx/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp32-idf.yaml b/tests/components/xgzp68xx/test.esp32-idf.yaml index fb55421123..63c3bd6afd 100644 --- a/tests/components/xgzp68xx/test.esp32-idf.yaml +++ b/tests/components/xgzp68xx/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp8266-ard.yaml b/tests/components/xgzp68xx/test.esp8266-ard.yaml index 25df8cc225..ee2c29ca4e 100644 --- a/tests/components/xgzp68xx/test.esp8266-ard.yaml +++ b/tests/components/xgzp68xx/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.rp2040-ard.yaml b/tests/components/xgzp68xx/test.rp2040-ard.yaml index 25df8cc225..ee2c29ca4e 100644 --- a/tests/components/xgzp68xx/test.rp2040-ard.yaml +++ b/tests/components/xgzp68xx/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -i2c: - - id: i2c_xgzp68xx - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: xgzp68xx - k_value: 4096 - temperature: - name: Pressure Temperature - pressure: - name: Differential pressure +<<: !include common.yaml diff --git a/tests/components/xl9535/common.yaml b/tests/components/xl9535/common.yaml new file mode 100644 index 0000000000..e01163cf12 --- /dev/null +++ b/tests/components/xl9535/common.yaml @@ -0,0 +1,26 @@ +i2c: + - id: i2c_xl9535 + scl: ${scl_pin} + sda: ${sda_pin} + +xl9535: + - id: xl9535_hub + address: 0x20 + +binary_sensor: + - platform: gpio + name: XL9535 Pin 0 + pin: + xl9535: xl9535_hub + number: 0 + mode: + input: true + inverted: false + - platform: gpio + name: XL9535 Pin 17 + pin: + xl9535: xl9535_hub + number: 17 + mode: + input: true + inverted: false diff --git a/tests/components/xl9535/test.esp32-ard.yaml b/tests/components/xl9535/test.esp32-ard.yaml index a65aae890e..63c3bd6afd 100644 --- a/tests/components/xl9535/test.esp32-ard.yaml +++ b/tests/components/xl9535/test.esp32-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xl9535/test.esp32-c3-ard.yaml b/tests/components/xl9535/test.esp32-c3-ard.yaml index 178adf870e..ee2c29ca4e 100644 --- a/tests/components/xl9535/test.esp32-c3-ard.yaml +++ b/tests/components/xl9535/test.esp32-c3-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xl9535/test.esp32-c3-idf.yaml b/tests/components/xl9535/test.esp32-c3-idf.yaml index 178adf870e..ee2c29ca4e 100644 --- a/tests/components/xl9535/test.esp32-c3-idf.yaml +++ b/tests/components/xl9535/test.esp32-c3-idf.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xl9535/test.esp32-idf.yaml b/tests/components/xl9535/test.esp32-idf.yaml index a65aae890e..63c3bd6afd 100644 --- a/tests/components/xl9535/test.esp32-idf.yaml +++ b/tests/components/xl9535/test.esp32-idf.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xl9535/test.esp8266-ard.yaml b/tests/components/xl9535/test.esp8266-ard.yaml index 178adf870e..ee2c29ca4e 100644 --- a/tests/components/xl9535/test.esp8266-ard.yaml +++ b/tests/components/xl9535/test.esp8266-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xl9535/test.rp2040-ard.yaml b/tests/components/xl9535/test.rp2040-ard.yaml index 178adf870e..ee2c29ca4e 100644 --- a/tests/components/xl9535/test.rp2040-ard.yaml +++ b/tests/components/xl9535/test.rp2040-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_xl9535 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -xl9535: - - id: xl9535_hub - address: 0x20 - -binary_sensor: - - platform: gpio - name: XL9535 Pin 0 - pin: - xl9535: xl9535_hub - number: 0 - mode: - input: true - inverted: false - - platform: gpio - name: XL9535 Pin 17 - pin: - xl9535: xl9535_hub - number: 17 - mode: - input: true - inverted: false +<<: !include common.yaml diff --git a/tests/components/xpt2046/common.yaml b/tests/components/xpt2046/common.yaml new file mode 100644 index 0000000000..9ef680cff4 --- /dev/null +++ b/tests/components/xpt2046/common.yaml @@ -0,0 +1,35 @@ +spi: + - id: spi_xpt2046 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +display: + - platform: ili9xxx + id: xpt_display + dimensions: 320x240 + model: TFT 2.4 + cs_pin: ${disp_cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + invert_colors: false + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); + +touchscreen: + - platform: xpt2046 + id: xpt_touchscreen + cs_pin: ${cs_pin} + interrupt_pin: ${interrupt_pin} + display: xpt_display + update_interval: 50ms + threshold: 400 + calibration: + x_min: 280 + x_max: 3860 + y_min: 340 + y_max: 3860 + on_touch: + - logger.log: + format: Touch at (%d, %d) + args: [touch.x, touch.y] diff --git a/tests/components/xpt2046/test.esp32-ard.yaml b/tests/components/xpt2046/test.esp32-ard.yaml index 9e305791e0..b39174947b 100644 --- a/tests/components/xpt2046/test.esp32-ard.yaml +++ b/tests/components/xpt2046/test.esp32-ard.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO17 + mosi_pin: GPIO18 + miso_pin: GPIO19 + dc_pin: GPIO13 + cs_pin: GPIO14 + disp_cs_pin: GPIO4 + interrupt_pin: GPIO21 + reset_pin: GPIO22 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 13 - dc_pin: 14 - reset_pin: 21 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 18 - interrupt_pin: 19 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 280 - x_max: 3860 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp32-c3-ard.yaml b/tests/components/xpt2046/test.esp32-c3-ard.yaml index c03fd6b345..79b84902ac 100644 --- a/tests/components/xpt2046/test.esp32-c3-ard.yaml +++ b/tests/components/xpt2046/test.esp32-c3-ard.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO4 + mosi_pin: GPIO5 + miso_pin: GPIO6 + dc_pin: GPIO7 + cs_pin: GPIO0 + disp_cs_pin: GPIO1 + interrupt_pin: GPIO3 + reset_pin: GPIO10 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 8 - dc_pin: 9 - reset_pin: 10 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 4 - interrupt_pin: 3 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 28 - x_max: 280 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp32-c3-idf.yaml b/tests/components/xpt2046/test.esp32-c3-idf.yaml index 787ca9b1ed..79b84902ac 100644 --- a/tests/components/xpt2046/test.esp32-c3-idf.yaml +++ b/tests/components/xpt2046/test.esp32-c3-idf.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO4 + mosi_pin: GPIO5 + miso_pin: GPIO6 + dc_pin: GPIO7 + cs_pin: GPIO0 + disp_cs_pin: GPIO1 + interrupt_pin: GPIO3 + reset_pin: GPIO10 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 8 - dc_pin: 9 - reset_pin: 10 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 4 - interrupt_pin: 3 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 50 - x_max: 280 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp32-idf.yaml b/tests/components/xpt2046/test.esp32-idf.yaml index e79997146b..b39174947b 100644 --- a/tests/components/xpt2046/test.esp32-idf.yaml +++ b/tests/components/xpt2046/test.esp32-idf.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO17 + mosi_pin: GPIO18 + miso_pin: GPIO19 + dc_pin: GPIO13 + cs_pin: GPIO14 + disp_cs_pin: GPIO4 + interrupt_pin: GPIO21 + reset_pin: GPIO22 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 13 - dc_pin: 14 - reset_pin: 21 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 18 - interrupt_pin: 19 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 50 - x_max: 280 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp32-s2-ard.yaml b/tests/components/xpt2046/test.esp32-s2-ard.yaml deleted file mode 100644 index df2a99b4f5..0000000000 --- a/tests/components/xpt2046/test.esp32-s2-ard.yaml +++ /dev/null @@ -1,38 +0,0 @@ -spi: - clk_pin: 7 - mosi_pin: 11 - miso_pin: 9 - -display: - - platform: ili9xxx - id: my_display - model: ili9341 - cs_pin: 5 - dc_pin: 12 - reset_pin: 33 - auto_clear_enabled: false - data_rate: 40MHz - dimensions: 320x240 - update_interval: never - invert_colors: false - transform: - mirror_y: false - mirror_x: false - swap_xy: true - -touchscreen: - - platform: xpt2046 - display: my_display - id: my_toucher - update_interval: 50ms - cs_pin: 18 - threshold: 300 - calibration: - x_min: 210 - x_max: 3890 - y_min: 170 - y_max: 3730 - transform: - mirror_x: false - mirror_y: true - swap_xy: true diff --git a/tests/components/xpt2046/test.esp8266-ard.yaml b/tests/components/xpt2046/test.esp8266-ard.yaml index ab71f7b8bc..246c5c8953 100644 --- a/tests/components/xpt2046/test.esp8266-ard.yaml +++ b/tests/components/xpt2046/test.esp8266-ard.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + dc_pin: GPIO15 + cs_pin: GPIO16 + disp_cs_pin: GPIO4 + interrupt_pin: GPIO5 + reset_pin: GPIO2 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 15 - dc_pin: 4 - reset_pin: 5 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 0 - interrupt_pin: 16 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 50 - x_max: 280 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/xpt2046/test.rp2040-ard.yaml b/tests/components/xpt2046/test.rp2040-ard.yaml index 622e69ac98..e693b363d9 100644 --- a/tests/components/xpt2046/test.rp2040-ard.yaml +++ b/tests/components/xpt2046/test.rp2040-ard.yaml @@ -1,35 +1,11 @@ -spi: - - id: spi_xpt2046 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO8 + dc_pin: GPIO9 + cs_pin: GPIO0 + disp_cs_pin: GPIO1 + interrupt_pin: GPIO2 + reset_pin: GPIO3 -display: - - platform: ili9xxx - id: xpt_display - dimensions: 320x240 - model: TFT 2.4 - cs_pin: 8 - dc_pin: 9 - reset_pin: 10 - invert_colors: false - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); - -touchscreen: - - platform: xpt2046 - id: xpt_touchscreen - cs_pin: 5 - interrupt_pin: 6 - display: xpt_display - update_interval: 50ms - threshold: 400 - calibration: - x_min: 280 - x_max: 3860 - y_min: 340 - y_max: 3860 - on_touch: - - logger.log: - format: Touch at (%d, %d) - args: [touch.x, touch.y] +<<: !include common.yaml diff --git a/tests/components/yashima/common.yaml b/tests/components/yashima/common.yaml new file mode 100644 index 0000000000..bfe181f1a6 --- /dev/null +++ b/tests/components/yashima/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: yashima + name: Yashima Climate diff --git a/tests/components/yashima/test.esp32-ard.yaml b/tests/components/yashima/test.esp32-ard.yaml index 4b6d6daee4..7b012aa64c 100644 --- a/tests/components/yashima/test.esp32-ard.yaml +++ b/tests/components/yashima/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: yashima - name: Yashima Climate +<<: !include common.yaml diff --git a/tests/components/yashima/test.esp32-c3-ard.yaml b/tests/components/yashima/test.esp32-c3-ard.yaml index 4b6d6daee4..7b012aa64c 100644 --- a/tests/components/yashima/test.esp32-c3-ard.yaml +++ b/tests/components/yashima/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: yashima - name: Yashima Climate +<<: !include common.yaml diff --git a/tests/components/yashima/test.esp32-c3-idf.yaml b/tests/components/yashima/test.esp32-c3-idf.yaml index 4b6d6daee4..7b012aa64c 100644 --- a/tests/components/yashima/test.esp32-c3-idf.yaml +++ b/tests/components/yashima/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: yashima - name: Yashima Climate +<<: !include common.yaml diff --git a/tests/components/yashima/test.esp32-idf.yaml b/tests/components/yashima/test.esp32-idf.yaml index 4b6d6daee4..7b012aa64c 100644 --- a/tests/components/yashima/test.esp32-idf.yaml +++ b/tests/components/yashima/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: yashima - name: Yashima Climate +<<: !include common.yaml diff --git a/tests/components/yashima/test.esp8266-ard.yaml b/tests/components/yashima/test.esp8266-ard.yaml index 296a7ede25..f5097fcf5f 100644 --- a/tests/components/yashima/test.esp8266-ard.yaml +++ b/tests/components/yashima/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: yashima - name: Yashima Climate +<<: !include common.yaml diff --git a/tests/components/zhlt01/common.yaml b/tests/components/zhlt01/common.yaml new file mode 100644 index 0000000000..0adbe77325 --- /dev/null +++ b/tests/components/zhlt01/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: ${pin} + carrier_duty_percent: 50% + +climate: + - platform: zhlt01 + name: ZH/LT-01 Climate diff --git a/tests/components/zhlt01/test.esp32-ard.yaml b/tests/components/zhlt01/test.esp32-ard.yaml index d1dc3b4926..7b012aa64c 100644 --- a/tests/components/zhlt01/test.esp32-ard.yaml +++ b/tests/components/zhlt01/test.esp32-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: zhlt01 - name: ZH/LT-01 Climate +<<: !include common.yaml diff --git a/tests/components/zhlt01/test.esp32-c3-ard.yaml b/tests/components/zhlt01/test.esp32-c3-ard.yaml index d1dc3b4926..7b012aa64c 100644 --- a/tests/components/zhlt01/test.esp32-c3-ard.yaml +++ b/tests/components/zhlt01/test.esp32-c3-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: zhlt01 - name: ZH/LT-01 Climate +<<: !include common.yaml diff --git a/tests/components/zhlt01/test.esp32-c3-idf.yaml b/tests/components/zhlt01/test.esp32-c3-idf.yaml index d1dc3b4926..7b012aa64c 100644 --- a/tests/components/zhlt01/test.esp32-c3-idf.yaml +++ b/tests/components/zhlt01/test.esp32-c3-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: zhlt01 - name: ZH/LT-01 Climate +<<: !include common.yaml diff --git a/tests/components/zhlt01/test.esp32-idf.yaml b/tests/components/zhlt01/test.esp32-idf.yaml index d1dc3b4926..7b012aa64c 100644 --- a/tests/components/zhlt01/test.esp32-idf.yaml +++ b/tests/components/zhlt01/test.esp32-idf.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% +substitutions: + pin: GPIO2 -climate: - - platform: zhlt01 - name: ZH/LT-01 Climate +<<: !include common.yaml diff --git a/tests/components/zhlt01/test.esp8266-ard.yaml b/tests/components/zhlt01/test.esp8266-ard.yaml index 40a00bc458..f5097fcf5f 100644 --- a/tests/components/zhlt01/test.esp8266-ard.yaml +++ b/tests/components/zhlt01/test.esp8266-ard.yaml @@ -1,7 +1,4 @@ -remote_transmitter: - pin: 5 - carrier_duty_percent: 50% +substitutions: + pin: GPIO5 -climate: - - platform: zhlt01 - name: ZH/LT-01 Climate +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/common.yaml b/tests/components/zio_ultrasonic/common.yaml new file mode 100644 index 0000000000..e13853d8f1 --- /dev/null +++ b/tests/components/zio_ultrasonic/common.yaml @@ -0,0 +1,9 @@ +i2c: + - id: i2c_zio_ultrasonic + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: zio_ultrasonic + name: "Distance" + update_interval: 60s diff --git a/tests/components/zio_ultrasonic/test.esp32-ard.yaml b/tests/components/zio_ultrasonic/test.esp32-ard.yaml index ad4050307e..63c3bd6afd 100644 --- a/tests/components/zio_ultrasonic/test.esp32-ard.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp32-c3-ard.yaml b/tests/components/zio_ultrasonic/test.esp32-c3-ard.yaml index 36e1697a38..ee2c29ca4e 100644 --- a/tests/components/zio_ultrasonic/test.esp32-c3-ard.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-c3-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml b/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml index 36e1697a38..ee2c29ca4e 100644 --- a/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp32-idf.yaml b/tests/components/zio_ultrasonic/test.esp32-idf.yaml index ad4050307e..63c3bd6afd 100644 --- a/tests/components/zio_ultrasonic/test.esp32-idf.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-idf.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp8266-ard.yaml b/tests/components/zio_ultrasonic/test.esp8266-ard.yaml index 36e1697a38..ee2c29ca4e 100644 --- a/tests/components/zio_ultrasonic/test.esp8266-ard.yaml +++ b/tests/components/zio_ultrasonic/test.esp8266-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.rp2040-ard.yaml b/tests/components/zio_ultrasonic/test.rp2040-ard.yaml index 36e1697a38..ee2c29ca4e 100644 --- a/tests/components/zio_ultrasonic/test.rp2040-ard.yaml +++ b/tests/components/zio_ultrasonic/test.rp2040-ard.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: zio_ultrasonic - name: "Distance" - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/zyaura/common.yaml b/tests/components/zyaura/common.yaml new file mode 100644 index 0000000000..e2a994a317 --- /dev/null +++ b/tests/components/zyaura/common.yaml @@ -0,0 +1,10 @@ +sensor: + - platform: zyaura + clock_pin: ${clock_pin} + data_pin: ${data_pin} + co2: + name: ZyAura CO2 + temperature: + name: ZyAura Temperature + humidity: + name: ZyAura Humidity diff --git a/tests/components/zyaura/test.esp32-ard.yaml b/tests/components/zyaura/test.esp32-ard.yaml index 29116a978b..d295973e3f 100644 --- a/tests/components/zyaura/test.esp32-ard.yaml +++ b/tests/components/zyaura/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 16 - data_pin: 17 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/zyaura/test.esp32-c3-ard.yaml b/tests/components/zyaura/test.esp32-c3-ard.yaml index 90205c468c..7808481215 100644 --- a/tests/components/zyaura/test.esp32-c3-ard.yaml +++ b/tests/components/zyaura/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 5 - data_pin: 4 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/zyaura/test.esp32-c3-idf.yaml b/tests/components/zyaura/test.esp32-c3-idf.yaml index 90205c468c..7808481215 100644 --- a/tests/components/zyaura/test.esp32-c3-idf.yaml +++ b/tests/components/zyaura/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 5 - data_pin: 4 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/zyaura/test.esp32-idf.yaml b/tests/components/zyaura/test.esp32-idf.yaml index 29116a978b..d295973e3f 100644 --- a/tests/components/zyaura/test.esp32-idf.yaml +++ b/tests/components/zyaura/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 16 - data_pin: 17 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO16 + data_pin: GPIO17 + +<<: !include common.yaml diff --git a/tests/components/zyaura/test.esp8266-ard.yaml b/tests/components/zyaura/test.esp8266-ard.yaml index 90205c468c..7808481215 100644 --- a/tests/components/zyaura/test.esp8266-ard.yaml +++ b/tests/components/zyaura/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 5 - data_pin: 4 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/zyaura/test.rp2040-ard.yaml b/tests/components/zyaura/test.rp2040-ard.yaml index 90205c468c..7808481215 100644 --- a/tests/components/zyaura/test.rp2040-ard.yaml +++ b/tests/components/zyaura/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -sensor: - - platform: zyaura - clock_pin: 5 - data_pin: 4 - co2: - name: ZyAura CO2 - temperature: - name: ZyAura Temperature - humidity: - name: ZyAura Humidity +substitutions: + clock_pin: GPIO5 + data_pin: GPIO4 + +<<: !include common.yaml