From cecce0f3cbde410b0cd96db63d9648c35b659eaf Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Tue, 4 Feb 2025 20:37:15 -0600 Subject: [PATCH] [CI] Consolidate some tests (N, O, P) (#8204) --- tests/components/ntc/common.yaml | 25 ++ tests/components/ntc/test.esp32-ard.yaml | 30 +-- tests/components/ntc/test.esp32-c3-ard.yaml | 30 +-- tests/components/ntc/test.esp32-c3-idf.yaml | 4 + tests/components/ntc/test.esp32-idf.yaml | 30 +-- tests/components/ntc/test.esp32-s2-ard.yaml | 30 +-- tests/components/ntc/test.esp32-s2-idf.yaml | 4 + tests/components/ntc/test.esp32-s3-ard.yaml | 30 +-- tests/components/ntc/test.esp32-s3-idf.yaml | 4 + tests/components/ntc/test.esp8266-ard.yaml | 29 +- tests/components/ntc/test.rp2040-ard.yaml | 29 +- tests/components/output/common.yaml | 13 + tests/components/output/test.esp32-ard.yaml | 16 +- .../components/output/test.esp32-c3-ard.yaml | 16 +- .../components/output/test.esp32-c3-idf.yaml | 16 +- tests/components/output/test.esp32-idf.yaml | 16 +- tests/components/output/test.esp8266-ard.yaml | 16 +- tests/components/output/test.rp2040-ard.yaml | 16 +- tests/components/partition/common-ard.yaml | 22 ++ tests/components/partition/common-idf.yaml | 21 ++ .../components/partition/test.esp32-ard.yaml | 27 +- .../partition/test.esp32-c3-ard.yaml | 27 +- .../partition/test.esp32-c3-idf.yaml | 26 +- .../components/partition/test.esp32-idf.yaml | 26 +- tests/components/pca6416a/common.yaml | 17 ++ tests/components/pca6416a/test.esp32-ard.yaml | 20 +- .../pca6416a/test.esp32-c3-ard.yaml | 20 +- .../pca6416a/test.esp32-c3-idf.yaml | 20 +- tests/components/pca6416a/test.esp32-idf.yaml | 20 +- .../components/pca6416a/test.esp8266-ard.yaml | 20 +- .../components/pca6416a/test.rp2040-ard.yaml | 20 +- tests/components/pca9554/common.yaml | 26 ++ tests/components/pca9554/test.esp32-ard.yaml | 29 +- .../components/pca9554/test.esp32-c3-ard.yaml | 29 +- .../components/pca9554/test.esp32-c3-idf.yaml | 29 +- tests/components/pca9554/test.esp32-idf.yaml | 29 +- .../components/pca9554/test.esp8266-ard.yaml | 29 +- tests/components/pca9554/test.rp2040-ard.yaml | 29 +- tests/components/pca9685/common.yaml | 34 +++ tests/components/pca9685/test.esp32-ard.yaml | 37 +-- .../components/pca9685/test.esp32-c3-ard.yaml | 37 +-- .../components/pca9685/test.esp32-c3-idf.yaml | 37 +-- tests/components/pca9685/test.esp32-idf.yaml | 37 +-- .../components/pca9685/test.esp8266-ard.yaml | 37 +-- tests/components/pca9685/test.rp2040-ard.yaml | 29 +- tests/components/pcd8544/common.yaml | 14 + tests/components/pcd8544/test.esp32-ard.yaml | 21 +- .../components/pcd8544/test.esp32-c3-ard.yaml | 21 +- .../components/pcd8544/test.esp32-c3-idf.yaml | 21 +- tests/components/pcd8544/test.esp32-idf.yaml | 21 +- .../components/pcd8544/test.esp8266-ard.yaml | 21 +- tests/components/pcd8544/test.rp2040-ard.yaml | 21 +- tests/components/pcf85063/common.yaml | 12 + tests/components/pcf85063/test.esp32-ard.yaml | 15 +- .../pcf85063/test.esp32-c3-ard.yaml | 15 +- .../pcf85063/test.esp32-c3-idf.yaml | 15 +- tests/components/pcf85063/test.esp32-idf.yaml | 15 +- .../components/pcf85063/test.esp8266-ard.yaml | 15 +- .../components/pcf85063/test.rp2040-ard.yaml | 15 +- tests/components/pcf8563/common.yaml | 12 + tests/components/pcf8563/test.esp32-ard.yaml | 15 +- .../components/pcf8563/test.esp32-c3-ard.yaml | 15 +- .../components/pcf8563/test.esp32-c3-idf.yaml | 15 +- tests/components/pcf8563/test.esp32-idf.yaml | 15 +- .../components/pcf8563/test.esp8266-ard.yaml | 15 +- tests/components/pcf8563/test.rp2040-ard.yaml | 15 +- tests/components/pcf8574/common.yaml | 28 ++ tests/components/pcf8574/test.esp32-ard.yaml | 31 +-- .../components/pcf8574/test.esp32-c3-ard.yaml | 31 +-- .../components/pcf8574/test.esp32-c3-idf.yaml | 31 +-- tests/components/pcf8574/test.esp32-idf.yaml | 31 +-- .../components/pcf8574/test.esp8266-ard.yaml | 31 +-- tests/components/pcf8574/test.rp2040-ard.yaml | 31 +-- tests/components/pipsolar/common.yaml | 249 +++++++++++++++++ tests/components/pipsolar/test.esp32-ard.yaml | 252 +----------------- .../pipsolar/test.esp32-c3-ard.yaml | 252 +----------------- .../pipsolar/test.esp32-c3-idf.yaml | 252 +----------------- tests/components/pipsolar/test.esp32-idf.yaml | 252 +----------------- .../components/pipsolar/test.esp8266-ard.yaml | 252 +----------------- .../components/pipsolar/test.rp2040-ard.yaml | 252 +----------------- tests/components/pm1006/common.yaml | 10 + tests/components/pm1006/test.esp32-ard.yaml | 13 +- .../components/pm1006/test.esp32-c3-ard.yaml | 13 +- .../components/pm1006/test.esp32-c3-idf.yaml | 13 +- tests/components/pm1006/test.esp32-idf.yaml | 13 +- tests/components/pm1006/test.esp8266-ard.yaml | 13 +- tests/components/pm1006/test.rp2040-ard.yaml | 13 +- tests/components/pmsa003i/common.yaml | 27 ++ tests/components/pmsa003i/test.esp32-ard.yaml | 30 +-- .../pmsa003i/test.esp32-c3-ard.yaml | 30 +-- .../pmsa003i/test.esp32-c3-idf.yaml | 30 +-- tests/components/pmsa003i/test.esp32-idf.yaml | 30 +-- .../components/pmsa003i/test.esp8266-ard.yaml | 30 +-- .../components/pmsa003i/test.rp2040-ard.yaml | 30 +-- tests/components/pmsx003/common.yaml | 34 +++ tests/components/pmsx003/test.esp32-ard.yaml | 37 +-- .../components/pmsx003/test.esp32-c3-ard.yaml | 37 +-- .../components/pmsx003/test.esp32-c3-idf.yaml | 37 +-- tests/components/pmsx003/test.esp32-idf.yaml | 37 +-- .../components/pmsx003/test.esp8266-ard.yaml | 37 +-- tests/components/pmsx003/test.rp2040-ard.yaml | 37 +-- tests/components/pmwcs3/common.yaml | 15 ++ tests/components/pmwcs3/test.esp32-ard.yaml | 18 +- .../components/pmwcs3/test.esp32-c3-ard.yaml | 18 +- .../components/pmwcs3/test.esp32-c3-idf.yaml | 18 +- tests/components/pmwcs3/test.esp32-idf.yaml | 18 +- tests/components/pmwcs3/test.esp8266-ard.yaml | 18 +- tests/components/pmwcs3/test.rp2040-ard.yaml | 18 +- tests/components/pn532_i2c/common.yaml | 13 + .../components/pn532_i2c/test.esp32-ard.yaml | 16 +- .../pn532_i2c/test.esp32-c3-ard.yaml | 16 +- .../pn532_i2c/test.esp32-c3-idf.yaml | 16 +- .../components/pn532_i2c/test.esp32-idf.yaml | 16 +- .../pn532_i2c/test.esp8266-ard.yaml | 16 +- .../components/pn532_i2c/test.rp2040-ard.yaml | 16 +- tests/components/pn532_spi/common.yaml | 15 ++ .../components/pn532_spi/test.esp32-ard.yaml | 20 +- .../pn532_spi/test.esp32-c3-ard.yaml | 20 +- .../pn532_spi/test.esp32-c3-idf.yaml | 20 +- .../components/pn532_spi/test.esp32-idf.yaml | 20 +- .../pn532_spi/test.esp8266-ard.yaml | 20 +- .../components/pn532_spi/test.rp2040-ard.yaml | 20 +- tests/components/pn7150_i2c/common.yaml | 35 +++ .../components/pn7150_i2c/test.esp32-ard.yaml | 40 +-- .../pn7150_i2c/test.esp32-c3-ard.yaml | 40 +-- .../pn7150_i2c/test.esp32-c3-idf.yaml | 40 +-- .../components/pn7150_i2c/test.esp32-idf.yaml | 40 +-- .../pn7150_i2c/test.esp8266-ard.yaml | 40 +-- .../pn7150_i2c/test.rp2040-ard.yaml | 40 +-- tests/components/pn7160_i2c/common.yaml | 35 +++ .../components/pn7160_i2c/test.esp32-ard.yaml | 40 +-- .../pn7160_i2c/test.esp32-c3-ard.yaml | 40 +-- .../pn7160_i2c/test.esp32-c3-idf.yaml | 40 +-- .../components/pn7160_i2c/test.esp32-idf.yaml | 40 +-- .../pn7160_i2c/test.esp8266-ard.yaml | 40 +-- .../pn7160_i2c/test.rp2040-ard.yaml | 40 +-- tests/components/pn7160_spi/common.yaml | 37 +++ .../components/pn7160_spi/test.esp32-ard.yaml | 44 +-- .../pn7160_spi/test.esp32-c3-ard.yaml | 44 +-- .../pn7160_spi/test.esp32-c3-idf.yaml | 44 +-- .../components/pn7160_spi/test.esp32-idf.yaml | 44 +-- .../pn7160_spi/test.esp8266-ard.yaml | 44 +-- .../pn7160_spi/test.rp2040-ard.yaml | 44 +-- tests/components/pylontech/common.yaml | 48 ++++ .../components/pylontech/test.esp32-ard.yaml | 51 +--- .../pylontech/test.esp32-c3-ard.yaml | 51 +--- .../pylontech/test.esp32-c3-idf.yaml | 51 +--- .../components/pylontech/test.esp32-idf.yaml | 51 +--- .../pylontech/test.esp8266-ard.yaml | 51 +--- .../components/pylontech/test.rp2040-ard.yaml | 51 +--- tests/components/pzem004t/common.yaml | 14 + tests/components/pzem004t/test.esp32-ard.yaml | 17 +- .../pzem004t/test.esp32-c3-ard.yaml | 17 +- .../pzem004t/test.esp32-c3-idf.yaml | 17 +- tests/components/pzem004t/test.esp32-idf.yaml | 17 +- .../components/pzem004t/test.esp8266-ard.yaml | 17 +- .../components/pzem004t/test.rp2040-ard.yaml | 17 +- tests/components/pzemac/common.yaml | 28 ++ tests/components/pzemac/test.esp32-ard.yaml | 31 +-- .../components/pzemac/test.esp32-c3-ard.yaml | 31 +-- .../components/pzemac/test.esp32-c3-idf.yaml | 31 +-- tests/components/pzemac/test.esp32-idf.yaml | 31 +-- tests/components/pzemac/test.esp8266-ard.yaml | 31 +-- tests/components/pzemac/test.rp2040-ard.yaml | 31 +-- tests/components/pzemdc/common.yaml | 23 ++ tests/components/pzemdc/test.esp32-ard.yaml | 26 +- .../components/pzemdc/test.esp32-c3-ard.yaml | 26 +- .../components/pzemdc/test.esp32-c3-idf.yaml | 26 +- tests/components/pzemdc/test.esp32-idf.yaml | 26 +- tests/components/pzemdc/test.esp8266-ard.yaml | 26 +- tests/components/pzemdc/test.rp2040-ard.yaml | 26 +- 171 files changed, 1479 insertions(+), 4560 deletions(-) create mode 100644 tests/components/ntc/common.yaml create mode 100644 tests/components/ntc/test.esp32-c3-idf.yaml create mode 100644 tests/components/ntc/test.esp32-s2-idf.yaml create mode 100644 tests/components/ntc/test.esp32-s3-idf.yaml create mode 100644 tests/components/output/common.yaml create mode 100644 tests/components/partition/common-ard.yaml create mode 100644 tests/components/partition/common-idf.yaml create mode 100644 tests/components/pca6416a/common.yaml create mode 100644 tests/components/pca9554/common.yaml create mode 100644 tests/components/pca9685/common.yaml create mode 100644 tests/components/pcd8544/common.yaml create mode 100644 tests/components/pcf85063/common.yaml create mode 100644 tests/components/pcf8563/common.yaml create mode 100644 tests/components/pcf8574/common.yaml create mode 100644 tests/components/pipsolar/common.yaml create mode 100644 tests/components/pm1006/common.yaml create mode 100644 tests/components/pmsa003i/common.yaml create mode 100644 tests/components/pmsx003/common.yaml create mode 100644 tests/components/pmwcs3/common.yaml create mode 100644 tests/components/pn532_i2c/common.yaml create mode 100644 tests/components/pn532_spi/common.yaml create mode 100644 tests/components/pn7150_i2c/common.yaml create mode 100644 tests/components/pn7160_i2c/common.yaml create mode 100644 tests/components/pn7160_spi/common.yaml create mode 100644 tests/components/pylontech/common.yaml create mode 100644 tests/components/pzem004t/common.yaml create mode 100644 tests/components/pzemac/common.yaml create mode 100644 tests/components/pzemdc/common.yaml diff --git a/tests/components/ntc/common.yaml b/tests/components/ntc/common.yaml new file mode 100644 index 0000000000..79ae7f601d --- /dev/null +++ b/tests/components/ntc/common.yaml @@ -0,0 +1,25 @@ +sensor: + - platform: adc + id: my_sensor + pin: ${pin} + - platform: resistance + sensor: my_sensor + configuration: DOWNSTREAM + resistor: 10kΩ + reference_voltage: 3.3V + name: Resistance + id: resist + - platform: ntc + sensor: resist + name: NTC Sensor + calibration: + b_constant: 3950 + reference_resistance: 10k + reference_temperature: 25°C + - platform: ntc + sensor: resist + name: NTC Sensor2 + calibration: + - 10.0kOhm -> 25°C + - 27.219kOhm -> 0°C + - 14.674kOhm -> 15°C diff --git a/tests/components/ntc/test.esp32-ard.yaml b/tests/components/ntc/test.esp32-ard.yaml index 3e0e901b6e..06864605a6 100644 --- a/tests/components/ntc/test.esp32-ard.yaml +++ b/tests/components/ntc/test.esp32-ard.yaml @@ -1,26 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 32 - attenuation: 11db - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO32 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-c3-ard.yaml b/tests/components/ntc/test.esp32-c3-ard.yaml index c0edb83d9d..37fb325f4a 100644 --- a/tests/components/ntc/test.esp32-c3-ard.yaml +++ b/tests/components/ntc/test.esp32-c3-ard.yaml @@ -1,26 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 4 - attenuation: 11db - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-c3-idf.yaml b/tests/components/ntc/test.esp32-c3-idf.yaml new file mode 100644 index 0000000000..37fb325f4a --- /dev/null +++ b/tests/components/ntc/test.esp32-c3-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-idf.yaml b/tests/components/ntc/test.esp32-idf.yaml index 3e0e901b6e..06864605a6 100644 --- a/tests/components/ntc/test.esp32-idf.yaml +++ b/tests/components/ntc/test.esp32-idf.yaml @@ -1,26 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 32 - attenuation: 11db - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO32 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-s2-ard.yaml b/tests/components/ntc/test.esp32-s2-ard.yaml index c0edb83d9d..37fb325f4a 100644 --- a/tests/components/ntc/test.esp32-s2-ard.yaml +++ b/tests/components/ntc/test.esp32-s2-ard.yaml @@ -1,26 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 4 - attenuation: 11db - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-s2-idf.yaml b/tests/components/ntc/test.esp32-s2-idf.yaml new file mode 100644 index 0000000000..37fb325f4a --- /dev/null +++ b/tests/components/ntc/test.esp32-s2-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-s3-ard.yaml b/tests/components/ntc/test.esp32-s3-ard.yaml index c0edb83d9d..37fb325f4a 100644 --- a/tests/components/ntc/test.esp32-s3-ard.yaml +++ b/tests/components/ntc/test.esp32-s3-ard.yaml @@ -1,26 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 4 - attenuation: 11db - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp32-s3-idf.yaml b/tests/components/ntc/test.esp32-s3-idf.yaml new file mode 100644 index 0000000000..37fb325f4a --- /dev/null +++ b/tests/components/ntc/test.esp32-s3-idf.yaml @@ -0,0 +1,4 @@ +substitutions: + pin: GPIO4 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.esp8266-ard.yaml b/tests/components/ntc/test.esp8266-ard.yaml index 370d16d3f7..4a6d36cbb4 100644 --- a/tests/components/ntc/test.esp8266-ard.yaml +++ b/tests/components/ntc/test.esp8266-ard.yaml @@ -1,25 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: A0 - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: A0 + +<<: !include common.yaml diff --git a/tests/components/ntc/test.rp2040-ard.yaml b/tests/components/ntc/test.rp2040-ard.yaml index 9c7ba7b539..9479437434 100644 --- a/tests/components/ntc/test.rp2040-ard.yaml +++ b/tests/components/ntc/test.rp2040-ard.yaml @@ -1,25 +1,4 @@ -sensor: - - platform: adc - id: my_sensor - pin: 26 - - platform: resistance - sensor: my_sensor - configuration: DOWNSTREAM - resistor: 10kΩ - reference_voltage: 3.3V - name: Resistance - id: resist - - platform: ntc - sensor: resist - name: NTC Sensor - calibration: - b_constant: 3950 - reference_resistance: 10k - reference_temperature: 25°C - - platform: ntc - sensor: resist - name: NTC Sensor2 - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C +substitutions: + pin: GPIO26 + +<<: !include common.yaml diff --git a/tests/components/output/common.yaml b/tests/components/output/common.yaml new file mode 100644 index 0000000000..5f31ae50a8 --- /dev/null +++ b/tests/components/output/common.yaml @@ -0,0 +1,13 @@ +esphome: + on_boot: + then: + - output.turn_off: light_output_1 + - output.turn_on: light_output_1 + - output.set_level: + id: light_output_1 + level: 50% + +output: + - platform: ${output_platform} + id: light_output_1 + pin: ${pin} diff --git a/tests/components/output/test.esp32-ard.yaml b/tests/components/output/test.esp32-ard.yaml index 480f9dfe1f..7687f2a7c8 100644 --- a/tests/components/output/test.esp32-ard.yaml +++ b/tests/components/output/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: ledc + pin: GPIO12 -output: - - platform: ledc - id: light_output_1 - pin: 12 +<<: !include common.yaml diff --git a/tests/components/output/test.esp32-c3-ard.yaml b/tests/components/output/test.esp32-c3-ard.yaml index c56d85c296..2227643703 100644 --- a/tests/components/output/test.esp32-c3-ard.yaml +++ b/tests/components/output/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: ledc + pin: GPIO1 -output: - - platform: ledc - id: light_output_1 - pin: 1 +<<: !include common.yaml diff --git a/tests/components/output/test.esp32-c3-idf.yaml b/tests/components/output/test.esp32-c3-idf.yaml index c56d85c296..2227643703 100644 --- a/tests/components/output/test.esp32-c3-idf.yaml +++ b/tests/components/output/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: ledc + pin: GPIO1 -output: - - platform: ledc - id: light_output_1 - pin: 1 +<<: !include common.yaml diff --git a/tests/components/output/test.esp32-idf.yaml b/tests/components/output/test.esp32-idf.yaml index 480f9dfe1f..7687f2a7c8 100644 --- a/tests/components/output/test.esp32-idf.yaml +++ b/tests/components/output/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: ledc + pin: GPIO12 -output: - - platform: ledc - id: light_output_1 - pin: 12 +<<: !include common.yaml diff --git a/tests/components/output/test.esp8266-ard.yaml b/tests/components/output/test.esp8266-ard.yaml index d9cb353636..34152066ba 100644 --- a/tests/components/output/test.esp8266-ard.yaml +++ b/tests/components/output/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: esp8266_pwm + pin: GPIO12 -output: - - platform: esp8266_pwm - id: light_output_1 - pin: 12 +<<: !include common.yaml diff --git a/tests/components/output/test.rp2040-ard.yaml b/tests/components/output/test.rp2040-ard.yaml index 399259fdd9..cc8d89ee06 100644 --- a/tests/components/output/test.rp2040-ard.yaml +++ b/tests/components/output/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -esphome: - on_boot: - then: - - output.turn_off: light_output_1 - - output.turn_on: light_output_1 - - output.set_level: - id: light_output_1 - level: 50% +substitutions: + output_platform: rp2040_pwm + pin: GPIO12 -output: - - platform: rp2040_pwm - id: light_output_1 - pin: 12 +<<: !include common.yaml diff --git a/tests/components/partition/common-ard.yaml b/tests/components/partition/common-ard.yaml new file mode 100644 index 0000000000..654eacf54f --- /dev/null +++ b/tests/components/partition/common-ard.yaml @@ -0,0 +1,22 @@ +light: + - platform: ${light_platform} + id: part_leds + default_transition_length: 500ms + chipset: ws2812 + num_leds: 256 + rgb_order: GRB + rmt_channel: 1 + pin: ${pin} + - platform: partition + name: Partition Light + segments: + - id: part_leds + from: 0 + to: 0 + - id: part_leds + from: 1 + to: 10 + - id: part_leds + from: 20 + to: 25 + - single_light_id: part_leds diff --git a/tests/components/partition/common-idf.yaml b/tests/components/partition/common-idf.yaml new file mode 100644 index 0000000000..b2ceadd6f7 --- /dev/null +++ b/tests/components/partition/common-idf.yaml @@ -0,0 +1,21 @@ +light: + - platform: ${light_platform} + id: part_leds + default_transition_length: 500ms + chipset: ws2812 + num_leds: 256 + rgb_order: GRB + pin: ${pin} + - platform: partition + name: Partition Light + segments: + - id: part_leds + from: 0 + to: 0 + - id: part_leds + from: 1 + to: 10 + - id: part_leds + from: 20 + to: 25 + - single_light_id: part_leds diff --git a/tests/components/partition/test.esp32-ard.yaml b/tests/components/partition/test.esp32-ard.yaml index c8eae67d40..32cf2a64ba 100644 --- a/tests/components/partition/test.esp32-ard.yaml +++ b/tests/components/partition/test.esp32-ard.yaml @@ -1,22 +1,5 @@ -light: - - platform: fastled_clockless - id: part_leds - chipset: WS2812B - pin: 2 - num_leds: 256 - rgb_order: GRB - default_transition_length: 0s - color_correct: [50%, 50%, 50%] - - platform: partition - name: Partition Light - segments: - - id: part_leds - from: 0 - to: 0 - - id: part_leds - from: 1 - to: 10 - - id: part_leds - from: 20 - to: 25 - - single_light_id: part_leds +substitutions: + light_platform: esp32_rmt_led_strip + pin: GPIO2 + +<<: !include common-ard.yaml diff --git a/tests/components/partition/test.esp32-c3-ard.yaml b/tests/components/partition/test.esp32-c3-ard.yaml index 77cfc5ad44..32cf2a64ba 100644 --- a/tests/components/partition/test.esp32-c3-ard.yaml +++ b/tests/components/partition/test.esp32-c3-ard.yaml @@ -1,22 +1,5 @@ -light: - - platform: esp32_rmt_led_strip - id: part_leds - default_transition_length: 500ms - chipset: ws2812 - rgb_order: GRB - num_leds: 256 - pin: 2 - rmt_channel: 0 - - platform: partition - name: Partition Light - segments: - - id: part_leds - from: 0 - to: 0 - - id: part_leds - from: 1 - to: 10 - - id: part_leds - from: 20 - to: 25 - - single_light_id: part_leds +substitutions: + light_platform: esp32_rmt_led_strip + pin: GPIO2 + +<<: !include common-ard.yaml diff --git a/tests/components/partition/test.esp32-c3-idf.yaml b/tests/components/partition/test.esp32-c3-idf.yaml index 397e1b0642..d9dc4f6804 100644 --- a/tests/components/partition/test.esp32-c3-idf.yaml +++ b/tests/components/partition/test.esp32-c3-idf.yaml @@ -1,21 +1,5 @@ -light: - - platform: esp32_rmt_led_strip - id: part_leds - default_transition_length: 500ms - chipset: ws2812 - rgb_order: GRB - num_leds: 256 - pin: 2 - - platform: partition - name: Partition Light - segments: - - id: part_leds - from: 0 - to: 0 - - id: part_leds - from: 1 - to: 10 - - id: part_leds - from: 20 - to: 25 - - single_light_id: part_leds +substitutions: + light_platform: esp32_rmt_led_strip + pin: GPIO2 + +<<: !include common-idf.yaml diff --git a/tests/components/partition/test.esp32-idf.yaml b/tests/components/partition/test.esp32-idf.yaml index 397e1b0642..7dc7d15553 100644 --- a/tests/components/partition/test.esp32-idf.yaml +++ b/tests/components/partition/test.esp32-idf.yaml @@ -1,21 +1,5 @@ -light: - - platform: esp32_rmt_led_strip - id: part_leds - default_transition_length: 500ms - chipset: ws2812 - rgb_order: GRB - num_leds: 256 - pin: 2 - - platform: partition - name: Partition Light - segments: - - id: part_leds - from: 0 - to: 0 - - id: part_leds - from: 1 - to: 10 - - id: part_leds - from: 20 - to: 25 - - single_light_id: part_leds +substitutions: + light_platform: esp32_rmt_led_strip + pin: GPIO12 + +<<: !include common-idf.yaml diff --git a/tests/components/pca6416a/common.yaml b/tests/components/pca6416a/common.yaml new file mode 100644 index 0000000000..ea538387e4 --- /dev/null +++ b/tests/components/pca6416a/common.yaml @@ -0,0 +1,17 @@ +i2c: + - id: i2c_pca6416a + scl: ${scl_pin} + sda: ${sda_pin} + +pca6416a: + - id: pca6416a_hub + address: 0x21 + +binary_sensor: + - platform: gpio + name: PCA6416A Binary Sensor + pin: + pca6416a: pca6416a_hub + number: 15 + mode: INPUT + inverted: true diff --git a/tests/components/pca6416a/test.esp32-ard.yaml b/tests/components/pca6416a/test.esp32-ard.yaml index 669e9416e4..63c3bd6afd 100644 --- a/tests/components/pca6416a/test.esp32-ard.yaml +++ b/tests/components/pca6416a/test.esp32-ard.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp32-c3-ard.yaml b/tests/components/pca6416a/test.esp32-c3-ard.yaml index fe940c44cc..ee2c29ca4e 100644 --- a/tests/components/pca6416a/test.esp32-c3-ard.yaml +++ b/tests/components/pca6416a/test.esp32-c3-ard.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp32-c3-idf.yaml b/tests/components/pca6416a/test.esp32-c3-idf.yaml index fe940c44cc..ee2c29ca4e 100644 --- a/tests/components/pca6416a/test.esp32-c3-idf.yaml +++ b/tests/components/pca6416a/test.esp32-c3-idf.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp32-idf.yaml b/tests/components/pca6416a/test.esp32-idf.yaml index 669e9416e4..63c3bd6afd 100644 --- a/tests/components/pca6416a/test.esp32-idf.yaml +++ b/tests/components/pca6416a/test.esp32-idf.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp8266-ard.yaml b/tests/components/pca6416a/test.esp8266-ard.yaml index fe940c44cc..ee2c29ca4e 100644 --- a/tests/components/pca6416a/test.esp8266-ard.yaml +++ b/tests/components/pca6416a/test.esp8266-ard.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca6416a/test.rp2040-ard.yaml b/tests/components/pca6416a/test.rp2040-ard.yaml index fe940c44cc..ee2c29ca4e 100644 --- a/tests/components/pca6416a/test.rp2040-ard.yaml +++ b/tests/components/pca6416a/test.rp2040-ard.yaml @@ -1,17 +1,5 @@ -i2c: - - id: i2c_pca6416a - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca6416a: - - id: pca6416a_hub - address: 0x21 - -binary_sensor: - - platform: gpio - name: PCA6416A Binary Sensor - pin: - pca6416a: pca6416a_hub - number: 15 - mode: INPUT - inverted: true +<<: !include common.yaml diff --git a/tests/components/pca9554/common.yaml b/tests/components/pca9554/common.yaml new file mode 100644 index 0000000000..db2ec2b826 --- /dev/null +++ b/tests/components/pca9554/common.yaml @@ -0,0 +1,26 @@ +i2c: + - id: i2c_pca9554 + scl: ${scl_pin} + sda: ${sda_pin} + +pca9554: + - id: pca9554_hub + pin_count: 8 + address: 0x3F + +binary_sensor: + - platform: gpio + id: pca9554_input + name: PCA9554 Binary Sensor + pin: + pca9554: pca9554_hub + number: 1 + mode: INPUT + inverted: true + - platform: gpio + id: pca9554_output + pin: + pca9554: pca9554_hub + number: 0 + mode: OUTPUT + inverted: false diff --git a/tests/components/pca9554/test.esp32-ard.yaml b/tests/components/pca9554/test.esp32-ard.yaml index 8fe9686303..63c3bd6afd 100644 --- a/tests/components/pca9554/test.esp32-ard.yaml +++ b/tests/components/pca9554/test.esp32-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9554/test.esp32-c3-ard.yaml b/tests/components/pca9554/test.esp32-c3-ard.yaml index 0ff453e64f..ee2c29ca4e 100644 --- a/tests/components/pca9554/test.esp32-c3-ard.yaml +++ b/tests/components/pca9554/test.esp32-c3-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9554/test.esp32-c3-idf.yaml b/tests/components/pca9554/test.esp32-c3-idf.yaml index 0ff453e64f..ee2c29ca4e 100644 --- a/tests/components/pca9554/test.esp32-c3-idf.yaml +++ b/tests/components/pca9554/test.esp32-c3-idf.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9554/test.esp32-idf.yaml b/tests/components/pca9554/test.esp32-idf.yaml index 8fe9686303..63c3bd6afd 100644 --- a/tests/components/pca9554/test.esp32-idf.yaml +++ b/tests/components/pca9554/test.esp32-idf.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9554/test.esp8266-ard.yaml b/tests/components/pca9554/test.esp8266-ard.yaml index 0ff453e64f..ee2c29ca4e 100644 --- a/tests/components/pca9554/test.esp8266-ard.yaml +++ b/tests/components/pca9554/test.esp8266-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9554/test.rp2040-ard.yaml b/tests/components/pca9554/test.rp2040-ard.yaml index 0ff453e64f..ee2c29ca4e 100644 --- a/tests/components/pca9554/test.rp2040-ard.yaml +++ b/tests/components/pca9554/test.rp2040-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pca9685/common.yaml b/tests/components/pca9685/common.yaml new file mode 100644 index 0000000000..57cdc5de9b --- /dev/null +++ b/tests/components/pca9685/common.yaml @@ -0,0 +1,34 @@ +i2c: + - id: i2c_pca9685 + scl: ${scl_pin} + sda: ${sda_pin} + +pca9685: + frequency: 500 + address: 0x0 + +output: + - platform: pca9685 + id: pca_0 + channel: 0 + - platform: pca9685 + id: pca_1 + channel: 1 + - platform: pca9685 + id: pca_2 + channel: 2 + - platform: pca9685 + id: pca_3 + channel: 3 + - platform: pca9685 + id: pca_4 + channel: 4 + - platform: pca9685 + id: pca_5 + channel: 5 + - platform: pca9685 + id: pca_6 + channel: 6 + - platform: pca9685 + id: pca_7 + channel: 7 diff --git a/tests/components/pca9685/test.esp32-ard.yaml b/tests/components/pca9685/test.esp32-ard.yaml index d02a16bcd1..63c3bd6afd 100644 --- a/tests/components/pca9685/test.esp32-ard.yaml +++ b/tests/components/pca9685/test.esp32-ard.yaml @@ -1,34 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca9685: - frequency: 500 - address: 0x0 - -output: - - platform: pca9685 - id: pca_0 - channel: 0 - - platform: pca9685 - id: pca_1 - channel: 1 - - platform: pca9685 - id: pca_2 - channel: 2 - - platform: pca9685 - id: pca_3 - channel: 3 - - platform: pca9685 - id: pca_4 - channel: 4 - - platform: pca9685 - id: pca_5 - channel: 5 - - platform: pca9685 - id: pca_6 - channel: 6 - - platform: pca9685 - id: pca_7 - channel: 7 +<<: !include common.yaml diff --git a/tests/components/pca9685/test.esp32-c3-ard.yaml b/tests/components/pca9685/test.esp32-c3-ard.yaml index e532f323be..ee2c29ca4e 100644 --- a/tests/components/pca9685/test.esp32-c3-ard.yaml +++ b/tests/components/pca9685/test.esp32-c3-ard.yaml @@ -1,34 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9685: - frequency: 500 - address: 0x0 - -output: - - platform: pca9685 - id: pca_0 - channel: 0 - - platform: pca9685 - id: pca_1 - channel: 1 - - platform: pca9685 - id: pca_2 - channel: 2 - - platform: pca9685 - id: pca_3 - channel: 3 - - platform: pca9685 - id: pca_4 - channel: 4 - - platform: pca9685 - id: pca_5 - channel: 5 - - platform: pca9685 - id: pca_6 - channel: 6 - - platform: pca9685 - id: pca_7 - channel: 7 +<<: !include common.yaml diff --git a/tests/components/pca9685/test.esp32-c3-idf.yaml b/tests/components/pca9685/test.esp32-c3-idf.yaml index e532f323be..ee2c29ca4e 100644 --- a/tests/components/pca9685/test.esp32-c3-idf.yaml +++ b/tests/components/pca9685/test.esp32-c3-idf.yaml @@ -1,34 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9685: - frequency: 500 - address: 0x0 - -output: - - platform: pca9685 - id: pca_0 - channel: 0 - - platform: pca9685 - id: pca_1 - channel: 1 - - platform: pca9685 - id: pca_2 - channel: 2 - - platform: pca9685 - id: pca_3 - channel: 3 - - platform: pca9685 - id: pca_4 - channel: 4 - - platform: pca9685 - id: pca_5 - channel: 5 - - platform: pca9685 - id: pca_6 - channel: 6 - - platform: pca9685 - id: pca_7 - channel: 7 +<<: !include common.yaml diff --git a/tests/components/pca9685/test.esp32-idf.yaml b/tests/components/pca9685/test.esp32-idf.yaml index d02a16bcd1..63c3bd6afd 100644 --- a/tests/components/pca9685/test.esp32-idf.yaml +++ b/tests/components/pca9685/test.esp32-idf.yaml @@ -1,34 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pca9685: - frequency: 500 - address: 0x0 - -output: - - platform: pca9685 - id: pca_0 - channel: 0 - - platform: pca9685 - id: pca_1 - channel: 1 - - platform: pca9685 - id: pca_2 - channel: 2 - - platform: pca9685 - id: pca_3 - channel: 3 - - platform: pca9685 - id: pca_4 - channel: 4 - - platform: pca9685 - id: pca_5 - channel: 5 - - platform: pca9685 - id: pca_6 - channel: 6 - - platform: pca9685 - id: pca_7 - channel: 7 +<<: !include common.yaml diff --git a/tests/components/pca9685/test.esp8266-ard.yaml b/tests/components/pca9685/test.esp8266-ard.yaml index e532f323be..ee2c29ca4e 100644 --- a/tests/components/pca9685/test.esp8266-ard.yaml +++ b/tests/components/pca9685/test.esp8266-ard.yaml @@ -1,34 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9685: - frequency: 500 - address: 0x0 - -output: - - platform: pca9685 - id: pca_0 - channel: 0 - - platform: pca9685 - id: pca_1 - channel: 1 - - platform: pca9685 - id: pca_2 - channel: 2 - - platform: pca9685 - id: pca_3 - channel: 3 - - platform: pca9685 - id: pca_4 - channel: 4 - - platform: pca9685 - id: pca_5 - channel: 5 - - platform: pca9685 - id: pca_6 - channel: 6 - - platform: pca9685 - id: pca_7 - channel: 7 +<<: !include common.yaml diff --git a/tests/components/pca9685/test.rp2040-ard.yaml b/tests/components/pca9685/test.rp2040-ard.yaml index 0ff453e64f..ee2c29ca4e 100644 --- a/tests/components/pca9685/test.rp2040-ard.yaml +++ b/tests/components/pca9685/test.rp2040-ard.yaml @@ -1,26 +1,5 @@ -i2c: - - id: i2c_pca9554 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pca9554: - - id: pca9554_hub - pin_count: 8 - address: 0x3F - -binary_sensor: - - platform: gpio - id: pca9554_input - name: PCA9554 Binary Sensor - pin: - pca9554: pca9554_hub - number: 1 - mode: INPUT - inverted: true - - platform: gpio - id: pca9554_output - pin: - pca9554: pca9554_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcd8544/common.yaml b/tests/components/pcd8544/common.yaml new file mode 100644 index 0000000000..0fb969eeb8 --- /dev/null +++ b/tests/components/pcd8544/common.yaml @@ -0,0 +1,14 @@ +spi: + - id: spi_pcd8544 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +display: + - platform: pcd8544 + cs_pin: ${cs_pin} + dc_pin: ${dc_pin} + reset_pin: ${reset_pin} + contrast: 60 + lambda: |- + it.rectangle(0, 0, it.get_width(), it.get_height()); diff --git a/tests/components/pcd8544/test.esp32-ard.yaml b/tests/components/pcd8544/test.esp32-ard.yaml index 20c05c407f..09e9db5a38 100644 --- a/tests/components/pcd8544/test.esp32-ard.yaml +++ b/tests/components/pcd8544/test.esp32-ard.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: pcd8544 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp32-c3-ard.yaml b/tests/components/pcd8544/test.esp32-c3-ard.yaml index 57771d2d73..c5c932c92c 100644 --- a/tests/components/pcd8544/test.esp32-c3-ard.yaml +++ b/tests/components/pcd8544/test.esp32-c3-ard.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: pcd8544 - cs_pin: 2 - dc_pin: 3 - reset_pin: 1 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp32-c3-idf.yaml b/tests/components/pcd8544/test.esp32-c3-idf.yaml index 57771d2d73..c5c932c92c 100644 --- a/tests/components/pcd8544/test.esp32-c3-idf.yaml +++ b/tests/components/pcd8544/test.esp32-c3-idf.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + dc_pin: GPIO9 + reset_pin: GPIO10 -display: - - platform: pcd8544 - cs_pin: 2 - dc_pin: 3 - reset_pin: 1 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp32-idf.yaml b/tests/components/pcd8544/test.esp32-idf.yaml index 20c05c407f..09e9db5a38 100644 --- a/tests/components/pcd8544/test.esp32-idf.yaml +++ b/tests/components/pcd8544/test.esp32-idf.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 + dc_pin: GPIO13 + reset_pin: GPIO14 -display: - - platform: pcd8544 - cs_pin: 12 - dc_pin: 13 - reset_pin: 14 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp8266-ard.yaml b/tests/components/pcd8544/test.esp8266-ard.yaml index 6e6022c6d2..3f023a60eb 100644 --- a/tests/components/pcd8544/test.esp8266-ard.yaml +++ b/tests/components/pcd8544/test.esp8266-ard.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: pcd8544 - cs_pin: 15 - dc_pin: 16 - reset_pin: 5 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcd8544/test.rp2040-ard.yaml b/tests/components/pcd8544/test.rp2040-ard.yaml index 7181f99fb1..d7fd6ee294 100644 --- a/tests/components/pcd8544/test.rp2040-ard.yaml +++ b/tests/components/pcd8544/test.rp2040-ard.yaml @@ -1,14 +1,9 @@ -spi: - - id: spi_pcd8544 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + dc_pin: GPIO15 + reset_pin: GPIO16 -display: - - platform: pcd8544 - cs_pin: 6 - dc_pin: 5 - reset_pin: 7 - contrast: 60 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +<<: !include common.yaml diff --git a/tests/components/pcf85063/common.yaml b/tests/components/pcf85063/common.yaml new file mode 100644 index 0000000000..f3b68412c5 --- /dev/null +++ b/tests/components/pcf85063/common.yaml @@ -0,0 +1,12 @@ +esphome: + on_boot: + - pcf85063.read_time + - pcf85063.write_time + +i2c: + - id: i2c_pcf85063 + scl: ${scl_pin} + sda: ${sda_pin} + +time: + - platform: pcf85063 diff --git a/tests/components/pcf85063/test.esp32-ard.yaml b/tests/components/pcf85063/test.esp32-ard.yaml index 9cce415103..63c3bd6afd 100644 --- a/tests/components/pcf85063/test.esp32-ard.yaml +++ b/tests/components/pcf85063/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_pcf85063 - scl: 16 - sda: 17 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp32-c3-ard.yaml b/tests/components/pcf85063/test.esp32-c3-ard.yaml index 9e1a3da81e..ee2c29ca4e 100644 --- a/tests/components/pcf85063/test.esp32-c3-ard.yaml +++ b/tests/components/pcf85063/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf85063 - scl: 5 - sda: 4 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp32-c3-idf.yaml b/tests/components/pcf85063/test.esp32-c3-idf.yaml index 9e1a3da81e..ee2c29ca4e 100644 --- a/tests/components/pcf85063/test.esp32-c3-idf.yaml +++ b/tests/components/pcf85063/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf85063 - scl: 5 - sda: 4 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp32-idf.yaml b/tests/components/pcf85063/test.esp32-idf.yaml index 9cce415103..63c3bd6afd 100644 --- a/tests/components/pcf85063/test.esp32-idf.yaml +++ b/tests/components/pcf85063/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_pcf85063 - scl: 16 - sda: 17 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp8266-ard.yaml b/tests/components/pcf85063/test.esp8266-ard.yaml index 9e1a3da81e..ee2c29ca4e 100644 --- a/tests/components/pcf85063/test.esp8266-ard.yaml +++ b/tests/components/pcf85063/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf85063 - scl: 5 - sda: 4 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf85063/test.rp2040-ard.yaml b/tests/components/pcf85063/test.rp2040-ard.yaml index 9e1a3da81e..ee2c29ca4e 100644 --- a/tests/components/pcf85063/test.rp2040-ard.yaml +++ b/tests/components/pcf85063/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf85063.read_time - - pcf85063.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf85063 - scl: 5 - sda: 4 - -time: - - platform: pcf85063 +<<: !include common.yaml diff --git a/tests/components/pcf8563/common.yaml b/tests/components/pcf8563/common.yaml new file mode 100644 index 0000000000..30be6b893c --- /dev/null +++ b/tests/components/pcf8563/common.yaml @@ -0,0 +1,12 @@ +esphome: + on_boot: + - pcf8563.read_time + - pcf8563.write_time + +i2c: + - id: i2c_pcf8563 + scl: ${scl_pin} + sda: ${sda_pin} + +time: + - platform: pcf8563 diff --git a/tests/components/pcf8563/test.esp32-ard.yaml b/tests/components/pcf8563/test.esp32-ard.yaml index e95b487b19..63c3bd6afd 100644 --- a/tests/components/pcf8563/test.esp32-ard.yaml +++ b/tests/components/pcf8563/test.esp32-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_pcf8563 - scl: 16 - sda: 17 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp32-c3-ard.yaml b/tests/components/pcf8563/test.esp32-c3-ard.yaml index f91a465e0f..ee2c29ca4e 100644 --- a/tests/components/pcf8563/test.esp32-c3-ard.yaml +++ b/tests/components/pcf8563/test.esp32-c3-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp32-c3-idf.yaml b/tests/components/pcf8563/test.esp32-c3-idf.yaml index f91a465e0f..ee2c29ca4e 100644 --- a/tests/components/pcf8563/test.esp32-c3-idf.yaml +++ b/tests/components/pcf8563/test.esp32-c3-idf.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp32-idf.yaml b/tests/components/pcf8563/test.esp32-idf.yaml index e95b487b19..63c3bd6afd 100644 --- a/tests/components/pcf8563/test.esp32-idf.yaml +++ b/tests/components/pcf8563/test.esp32-idf.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -i2c: - - id: i2c_pcf8563 - scl: 16 - sda: 17 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp8266-ard.yaml b/tests/components/pcf8563/test.esp8266-ard.yaml index f91a465e0f..ee2c29ca4e 100644 --- a/tests/components/pcf8563/test.esp8266-ard.yaml +++ b/tests/components/pcf8563/test.esp8266-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8563/test.rp2040-ard.yaml b/tests/components/pcf8563/test.rp2040-ard.yaml index f91a465e0f..ee2c29ca4e 100644 --- a/tests/components/pcf8563/test.rp2040-ard.yaml +++ b/tests/components/pcf8563/test.rp2040-ard.yaml @@ -1,12 +1,5 @@ -esphome: - on_boot: - - pcf8563.read_time - - pcf8563.write_time +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 - -time: - - platform: pcf8563 +<<: !include common.yaml diff --git a/tests/components/pcf8574/common.yaml b/tests/components/pcf8574/common.yaml new file mode 100644 index 0000000000..f5fcfad64a --- /dev/null +++ b/tests/components/pcf8574/common.yaml @@ -0,0 +1,28 @@ +i2c: + - id: i2c_pcf8574 + scl: ${scl_pin} + sda: ${sda_pin} + +pcf8574: + - id: pcf8574_hub + address: 0x21 + pcf8575: false + +binary_sensor: + - platform: gpio + id: pcf8574_binary_sensor + name: PCF Binary Sensor + pin: + pcf8574: pcf8574_hub + number: 1 + mode: INPUT + inverted: true + +output: + - platform: gpio + id: pcf8574_output + pin: + pcf8574: pcf8574_hub + number: 0 + mode: OUTPUT + inverted: false diff --git a/tests/components/pcf8574/test.esp32-ard.yaml b/tests/components/pcf8574/test.esp32-ard.yaml index aeed55f4fe..63c3bd6afd 100644 --- a/tests/components/pcf8574/test.esp32-ard.yaml +++ b/tests/components/pcf8574/test.esp32-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp32-c3-ard.yaml b/tests/components/pcf8574/test.esp32-c3-ard.yaml index 551e425892..ee2c29ca4e 100644 --- a/tests/components/pcf8574/test.esp32-c3-ard.yaml +++ b/tests/components/pcf8574/test.esp32-c3-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp32-c3-idf.yaml b/tests/components/pcf8574/test.esp32-c3-idf.yaml index 551e425892..ee2c29ca4e 100644 --- a/tests/components/pcf8574/test.esp32-c3-idf.yaml +++ b/tests/components/pcf8574/test.esp32-c3-idf.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp32-idf.yaml b/tests/components/pcf8574/test.esp32-idf.yaml index aeed55f4fe..63c3bd6afd 100644 --- a/tests/components/pcf8574/test.esp32-idf.yaml +++ b/tests/components/pcf8574/test.esp32-idf.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp8266-ard.yaml b/tests/components/pcf8574/test.esp8266-ard.yaml index 551e425892..ee2c29ca4e 100644 --- a/tests/components/pcf8574/test.esp8266-ard.yaml +++ b/tests/components/pcf8574/test.esp8266-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pcf8574/test.rp2040-ard.yaml b/tests/components/pcf8574/test.rp2040-ard.yaml index 551e425892..ee2c29ca4e 100644 --- a/tests/components/pcf8574/test.rp2040-ard.yaml +++ b/tests/components/pcf8574/test.rp2040-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_pcf8563 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pcf8574: - - id: pcf8574_hub - address: 0x21 - pcf8575: false - -binary_sensor: - - platform: gpio - id: pcf8574_binary_sensor - name: PCF Binary Sensor - pin: - pcf8574: pcf8574_hub - number: 1 - mode: INPUT - inverted: true - -output: - - platform: gpio - id: pcf8574_output - pin: - pcf8574: pcf8574_hub - number: 0 - mode: OUTPUT - inverted: false +<<: !include common.yaml diff --git a/tests/components/pipsolar/common.yaml b/tests/components/pipsolar/common.yaml new file mode 100644 index 0000000000..64e2c0476d --- /dev/null +++ b/tests/components/pipsolar/common.yaml @@ -0,0 +1,249 @@ +esphome: + on_boot: + then: + - output.pipsolar.set_level: + id: inverter0_battery_recharge_voltage_out + value: 48.0 + +uart: + - id: uart_pipsolar + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 + +pipsolar: + id: inverter0 + +binary_sensor: + - platform: pipsolar + pipsolar_id: inverter0 + add_sbu_priority_version: + id: inverter0_add_sbu_priority_version + name: inverter0_add_sbu_priority_version + configuration_status: + id: inverter0_configuration_status + name: inverter0_configuration_status + scc_firmware_version: + id: inverter0_scc_firmware_version + name: inverter0_scc_firmware_version + load_status: + id: inverter0_load_status + name: inverter0_load_status + battery_voltage_to_steady_while_charging: + id: inverter0_battery_voltage_to_steady_while_charging + name: inverter0_battery_voltage_to_steady_while_charging + charging_status: + id: inverter0_charging_status + name: inverter0_charging_status + scc_charging_status: + id: inverter0_scc_charging_status + name: inverter0_scc_charging_status + ac_charging_status: + id: inverter0_ac_charging_status + name: inverter0_ac_charging_status + charging_to_floating_mode: + id: inverter0_charging_to_floating_mode + name: inverter0_charging_to_floating_mode + switch_on: + id: inverter0_switch_on + name: inverter0_switch_on + dustproof_installed: + id: inverter0_dustproof_installed + name: inverter0_dustproof_installed + silence_buzzer_open_buzzer: + id: inverter0_silence_buzzer_open_buzzer + name: inverter0_silence_buzzer_open_buzzer + overload_bypass_function: + id: inverter0_overload_bypass_function + name: inverter0_overload_bypass_function + lcd_escape_to_default: + id: inverter0_lcd_escape_to_default + name: inverter0_lcd_escape_to_default + overload_restart_function: + id: inverter0_overload_restart_function + name: inverter0_overload_restart_function + over_temperature_restart_function: + id: inverter0_over_temperature_restart_function + name: inverter0_over_temperature_restart_function + backlight_on: + id: inverter0_backlight_on + name: inverter0_backlight_on + +output: + - platform: pipsolar + pipsolar_id: inverter0 + battery_recharge_voltage: + id: inverter0_battery_recharge_voltage_out + +sensor: + - platform: pipsolar + pipsolar_id: inverter0 + grid_rating_voltage: + id: inverter0_grid_rating_voltage + name: inverter0_grid_rating_voltage + grid_rating_current: + id: inverter0_grid_rating_current + name: inverter0_grid_rating_current + ac_output_rating_voltage: + id: inverter0_ac_output_rating_voltage + name: inverter0_ac_output_rating_voltage + ac_output_rating_frequency: + id: inverter0_ac_output_rating_frequency + name: inverter0_ac_output_rating_frequency + ac_output_rating_current: + id: inverter0_ac_output_rating_current + name: inverter0_ac_output_rating_current + ac_output_rating_apparent_power: + id: inverter0_ac_output_rating_apparent_power + name: inverter0_ac_output_rating_apparent_power + ac_output_rating_active_power: + id: inverter0_ac_output_rating_active_power + name: inverter0_ac_output_rating_active_power + battery_rating_voltage: + id: inverter0_battery_rating_voltage + name: inverter0_battery_rating_voltage + battery_recharge_voltage: + id: inverter0_battery_recharge_voltage + name: inverter0_battery_recharge_voltage + battery_under_voltage: + id: inverter0_battery_under_voltage + name: inverter0_battery_under_voltage + battery_bulk_voltage: + id: inverter0_battery_bulk_voltage + name: inverter0_battery_bulk_voltage + battery_float_voltage: + id: inverter0_battery_float_voltage + name: inverter0_battery_float_voltage + battery_type: + id: inverter0_battery_type + name: inverter0_battery_type + current_max_ac_charging_current: + id: inverter0_current_max_ac_charging_current + name: inverter0_current_max_ac_charging_current + current_max_charging_current: + id: inverter0_current_max_charging_current + name: inverter0_current_max_charging_current + input_voltage_range: + id: inverter0_input_voltage_range + name: inverter0_input_voltage_range + output_source_priority: + id: inverter0_output_source_priority + name: inverter0_output_source_priority + charger_source_priority: + id: inverter0_charger_source_priority + name: inverter0_charger_source_priority + parallel_max_num: + id: inverter0_parallel_max_num + name: inverter0_parallel_max_num + machine_type: + id: inverter0_machine_type + name: inverter0_machine_type + topology: + id: inverter0_topology + name: inverter0_topology + output_mode: + id: inverter0_output_mode + name: inverter0_output_mode + battery_redischarge_voltage: + id: inverter0_battery_redischarge_voltage + name: inverter0_battery_redischarge_voltage + pv_ok_condition_for_parallel: + id: inverter0_pv_ok_condition_for_parallel + name: inverter0_pv_ok_condition_for_parallel + pv_power_balance: + id: inverter0_pv_power_balance + name: inverter0_pv_power_balance + grid_voltage: + id: inverter0_grid_voltage + name: inverter0_grid_voltage + grid_frequency: + id: inverter0_grid_frequency + name: inverter0_grid_frequency + ac_output_voltage: + id: inverter0_ac_output_voltage + name: inverter0_ac_output_voltage + ac_output_frequency: + id: inverter0_ac_output_frequency + name: inverter0_ac_output_frequency + ac_output_apparent_power: + id: inverter0_ac_output_apparent_power + name: inverter0_ac_output_apparent_power + ac_output_active_power: + id: inverter0_ac_output_active_power + name: inverter0_ac_output_active_power + output_load_percent: + id: inverter0_output_load_percent + name: inverter0_output_load_percent + bus_voltage: + id: inverter0_bus_voltage + name: inverter0_bus_voltage + battery_voltage: + id: inverter0_battery_voltage + name: inverter0_battery_voltage + battery_charging_current: + id: inverter0_battery_charging_current + name: inverter0_battery_charging_current + battery_capacity_percent: + id: inverter0_battery_capacity_percent + name: inverter0_battery_capacity_percent + inverter_heat_sink_temperature: + id: inverter0_inverter_heat_sink_temperature + name: inverter0_inverter_heat_sink_temperature + pv_input_current_for_battery: + id: inverter0_pv_input_current_for_battery + name: inverter0_pv_input_current_for_battery + pv_input_voltage: + id: inverter0_pv_input_voltage + name: inverter0_pv_input_voltage + battery_voltage_scc: + id: inverter0_battery_voltage_scc + name: inverter0_battery_voltage_scc + battery_discharge_current: + id: inverter0_battery_discharge_current + name: inverter0_battery_discharge_current + battery_voltage_offset_for_fans_on: + id: inverter0_battery_voltage_offset_for_fans_on + name: inverter0_battery_voltage_offset_for_fans_on + eeprom_version: + id: inverter0_eeprom_version + name: inverter0_eeprom_version + pv_charging_power: + id: inverter0_pv_charging_power + name: inverter0_pv_charging_power + +switch: + - platform: pipsolar + pipsolar_id: inverter0 + output_source_priority_utility: + name: inverter0_output_source_priority_utility + output_source_priority_solar: + name: inverter0_output_source_priority_solar + output_source_priority_battery: + name: inverter0_output_source_priority_battery + output_source_priority_hybrid: + name: inverter0_output_source_priority_hybrid + input_voltage_range: + name: inverter0_input_voltage_range + pv_ok_condition_for_parallel: + name: inverter0_pv_ok_condition_for_parallel + pv_power_balance: + name: inverter0_pv_power_balance + +text_sensor: + - platform: pipsolar + pipsolar_id: inverter0 + device_mode: + id: inverter0_device_mode + name: inverter0_device_mode + last_qpigs: + id: inverter0_last_qpigs + name: inverter0_last_qpigs + last_qpiri: + id: inverter0_last_qpiri + name: inverter0_last_qpiri + last_qmod: + id: inverter0_last_qmod + name: inverter0_last_qmod + last_qflag: + id: inverter0_last_qflag + name: inverter0_last_qflag diff --git a/tests/components/pipsolar/test.esp32-ard.yaml b/tests/components/pipsolar/test.esp32-ard.yaml index b7a7e0cbd9..f486544afa 100644 --- a/tests/components/pipsolar/test.esp32-ard.yaml +++ b/tests/components/pipsolar/test.esp32-ard.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pipsolar - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp32-c3-ard.yaml b/tests/components/pipsolar/test.esp32-c3-ard.yaml index 83d7070669..b516342f3b 100644 --- a/tests/components/pipsolar/test.esp32-c3-ard.yaml +++ b/tests/components/pipsolar/test.esp32-c3-ard.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pipsolar - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp32-c3-idf.yaml b/tests/components/pipsolar/test.esp32-c3-idf.yaml index 83d7070669..b516342f3b 100644 --- a/tests/components/pipsolar/test.esp32-c3-idf.yaml +++ b/tests/components/pipsolar/test.esp32-c3-idf.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pipsolar - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp32-idf.yaml b/tests/components/pipsolar/test.esp32-idf.yaml index b7a7e0cbd9..f486544afa 100644 --- a/tests/components/pipsolar/test.esp32-idf.yaml +++ b/tests/components/pipsolar/test.esp32-idf.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pipsolar - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp8266-ard.yaml b/tests/components/pipsolar/test.esp8266-ard.yaml index 83d7070669..b516342f3b 100644 --- a/tests/components/pipsolar/test.esp8266-ard.yaml +++ b/tests/components/pipsolar/test.esp8266-ard.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pipsolar - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pipsolar/test.rp2040-ard.yaml b/tests/components/pipsolar/test.rp2040-ard.yaml index 83d7070669..b516342f3b 100644 --- a/tests/components/pipsolar/test.rp2040-ard.yaml +++ b/tests/components/pipsolar/test.rp2040-ard.yaml @@ -1,249 +1,5 @@ -esphome: - on_boot: - then: - - output.pipsolar.set_level: - id: inverter0_battery_recharge_voltage_out - value: 48.0 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pipsolar - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 - -pipsolar: - id: inverter0 - -binary_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - add_sbu_priority_version: - id: inverter0_add_sbu_priority_version - name: inverter0_add_sbu_priority_version - configuration_status: - id: inverter0_configuration_status - name: inverter0_configuration_status - scc_firmware_version: - id: inverter0_scc_firmware_version - name: inverter0_scc_firmware_version - load_status: - id: inverter0_load_status - name: inverter0_load_status - battery_voltage_to_steady_while_charging: - id: inverter0_battery_voltage_to_steady_while_charging - name: inverter0_battery_voltage_to_steady_while_charging - charging_status: - id: inverter0_charging_status - name: inverter0_charging_status - scc_charging_status: - id: inverter0_scc_charging_status - name: inverter0_scc_charging_status - ac_charging_status: - id: inverter0_ac_charging_status - name: inverter0_ac_charging_status - charging_to_floating_mode: - id: inverter0_charging_to_floating_mode - name: inverter0_charging_to_floating_mode - switch_on: - id: inverter0_switch_on - name: inverter0_switch_on - dustproof_installed: - id: inverter0_dustproof_installed - name: inverter0_dustproof_installed - silence_buzzer_open_buzzer: - id: inverter0_silence_buzzer_open_buzzer - name: inverter0_silence_buzzer_open_buzzer - overload_bypass_function: - id: inverter0_overload_bypass_function - name: inverter0_overload_bypass_function - lcd_escape_to_default: - id: inverter0_lcd_escape_to_default - name: inverter0_lcd_escape_to_default - overload_restart_function: - id: inverter0_overload_restart_function - name: inverter0_overload_restart_function - over_temperature_restart_function: - id: inverter0_over_temperature_restart_function - name: inverter0_over_temperature_restart_function - backlight_on: - id: inverter0_backlight_on - name: inverter0_backlight_on - -output: - - platform: pipsolar - pipsolar_id: inverter0 - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage_out - -sensor: - - platform: pipsolar - pipsolar_id: inverter0 - grid_rating_voltage: - id: inverter0_grid_rating_voltage - name: inverter0_grid_rating_voltage - grid_rating_current: - id: inverter0_grid_rating_current - name: inverter0_grid_rating_current - ac_output_rating_voltage: - id: inverter0_ac_output_rating_voltage - name: inverter0_ac_output_rating_voltage - ac_output_rating_frequency: - id: inverter0_ac_output_rating_frequency - name: inverter0_ac_output_rating_frequency - ac_output_rating_current: - id: inverter0_ac_output_rating_current - name: inverter0_ac_output_rating_current - ac_output_rating_apparent_power: - id: inverter0_ac_output_rating_apparent_power - name: inverter0_ac_output_rating_apparent_power - ac_output_rating_active_power: - id: inverter0_ac_output_rating_active_power - name: inverter0_ac_output_rating_active_power - battery_rating_voltage: - id: inverter0_battery_rating_voltage - name: inverter0_battery_rating_voltage - battery_recharge_voltage: - id: inverter0_battery_recharge_voltage - name: inverter0_battery_recharge_voltage - battery_under_voltage: - id: inverter0_battery_under_voltage - name: inverter0_battery_under_voltage - battery_bulk_voltage: - id: inverter0_battery_bulk_voltage - name: inverter0_battery_bulk_voltage - battery_float_voltage: - id: inverter0_battery_float_voltage - name: inverter0_battery_float_voltage - battery_type: - id: inverter0_battery_type - name: inverter0_battery_type - current_max_ac_charging_current: - id: inverter0_current_max_ac_charging_current - name: inverter0_current_max_ac_charging_current - current_max_charging_current: - id: inverter0_current_max_charging_current - name: inverter0_current_max_charging_current - input_voltage_range: - id: inverter0_input_voltage_range - name: inverter0_input_voltage_range - output_source_priority: - id: inverter0_output_source_priority - name: inverter0_output_source_priority - charger_source_priority: - id: inverter0_charger_source_priority - name: inverter0_charger_source_priority - parallel_max_num: - id: inverter0_parallel_max_num - name: inverter0_parallel_max_num - machine_type: - id: inverter0_machine_type - name: inverter0_machine_type - topology: - id: inverter0_topology - name: inverter0_topology - output_mode: - id: inverter0_output_mode - name: inverter0_output_mode - battery_redischarge_voltage: - id: inverter0_battery_redischarge_voltage - name: inverter0_battery_redischarge_voltage - pv_ok_condition_for_parallel: - id: inverter0_pv_ok_condition_for_parallel - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - id: inverter0_pv_power_balance - name: inverter0_pv_power_balance - grid_voltage: - id: inverter0_grid_voltage - name: inverter0_grid_voltage - grid_frequency: - id: inverter0_grid_frequency - name: inverter0_grid_frequency - ac_output_voltage: - id: inverter0_ac_output_voltage - name: inverter0_ac_output_voltage - ac_output_frequency: - id: inverter0_ac_output_frequency - name: inverter0_ac_output_frequency - ac_output_apparent_power: - id: inverter0_ac_output_apparent_power - name: inverter0_ac_output_apparent_power - ac_output_active_power: - id: inverter0_ac_output_active_power - name: inverter0_ac_output_active_power - output_load_percent: - id: inverter0_output_load_percent - name: inverter0_output_load_percent - bus_voltage: - id: inverter0_bus_voltage - name: inverter0_bus_voltage - battery_voltage: - id: inverter0_battery_voltage - name: inverter0_battery_voltage - battery_charging_current: - id: inverter0_battery_charging_current - name: inverter0_battery_charging_current - battery_capacity_percent: - id: inverter0_battery_capacity_percent - name: inverter0_battery_capacity_percent - inverter_heat_sink_temperature: - id: inverter0_inverter_heat_sink_temperature - name: inverter0_inverter_heat_sink_temperature - pv_input_current_for_battery: - id: inverter0_pv_input_current_for_battery - name: inverter0_pv_input_current_for_battery - pv_input_voltage: - id: inverter0_pv_input_voltage - name: inverter0_pv_input_voltage - battery_voltage_scc: - id: inverter0_battery_voltage_scc - name: inverter0_battery_voltage_scc - battery_discharge_current: - id: inverter0_battery_discharge_current - name: inverter0_battery_discharge_current - battery_voltage_offset_for_fans_on: - id: inverter0_battery_voltage_offset_for_fans_on - name: inverter0_battery_voltage_offset_for_fans_on - eeprom_version: - id: inverter0_eeprom_version - name: inverter0_eeprom_version - pv_charging_power: - id: inverter0_pv_charging_power - name: inverter0_pv_charging_power - -switch: - - platform: pipsolar - pipsolar_id: inverter0 - output_source_priority_utility: - name: inverter0_output_source_priority_utility - output_source_priority_solar: - name: inverter0_output_source_priority_solar - output_source_priority_battery: - name: inverter0_output_source_priority_battery - output_source_priority_hybrid: - name: inverter0_output_source_priority_hybrid - input_voltage_range: - name: inverter0_input_voltage_range - pv_ok_condition_for_parallel: - name: inverter0_pv_ok_condition_for_parallel - pv_power_balance: - name: inverter0_pv_power_balance - -text_sensor: - - platform: pipsolar - pipsolar_id: inverter0 - device_mode: - id: inverter0_device_mode - name: inverter0_device_mode - last_qpigs: - id: inverter0_last_qpigs - name: inverter0_last_qpigs - last_qpiri: - id: inverter0_last_qpiri - name: inverter0_last_qpiri - last_qmod: - id: inverter0_last_qmod - name: inverter0_last_qmod - last_qflag: - id: inverter0_last_qflag - name: inverter0_last_qflag +<<: !include common.yaml diff --git a/tests/components/pm1006/common.yaml b/tests/components/pm1006/common.yaml new file mode 100644 index 0000000000..4e3e880f4e --- /dev/null +++ b/tests/components/pm1006/common.yaml @@ -0,0 +1,10 @@ +uart: + - id: uart_pm1006 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: pm1006 + pm_2_5: + name: Particulate Matter 2.5µm Concentration diff --git a/tests/components/pm1006/test.esp32-ard.yaml b/tests/components/pm1006/test.esp32-ard.yaml index 635af37b25..f486544afa 100644 --- a/tests/components/pm1006/test.esp32-ard.yaml +++ b/tests/components/pm1006/test.esp32-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pm1006/test.esp32-c3-ard.yaml b/tests/components/pm1006/test.esp32-c3-ard.yaml index 15ee077f3e..b516342f3b 100644 --- a/tests/components/pm1006/test.esp32-c3-ard.yaml +++ b/tests/components/pm1006/test.esp32-c3-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pm1006/test.esp32-c3-idf.yaml b/tests/components/pm1006/test.esp32-c3-idf.yaml index 15ee077f3e..b516342f3b 100644 --- a/tests/components/pm1006/test.esp32-c3-idf.yaml +++ b/tests/components/pm1006/test.esp32-c3-idf.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pm1006/test.esp32-idf.yaml b/tests/components/pm1006/test.esp32-idf.yaml index 635af37b25..f486544afa 100644 --- a/tests/components/pm1006/test.esp32-idf.yaml +++ b/tests/components/pm1006/test.esp32-idf.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pm1006/test.esp8266-ard.yaml b/tests/components/pm1006/test.esp8266-ard.yaml index 15ee077f3e..b516342f3b 100644 --- a/tests/components/pm1006/test.esp8266-ard.yaml +++ b/tests/components/pm1006/test.esp8266-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pm1006/test.rp2040-ard.yaml b/tests/components/pm1006/test.rp2040-ard.yaml index 15ee077f3e..b516342f3b 100644 --- a/tests/components/pm1006/test.rp2040-ard.yaml +++ b/tests/components/pm1006/test.rp2040-ard.yaml @@ -1,10 +1,5 @@ -uart: - - id: uart_pm1006 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pm1006 - pm_2_5: - name: Particulate Matter 2.5µm Concentration +<<: !include common.yaml diff --git a/tests/components/pmsa003i/common.yaml b/tests/components/pmsa003i/common.yaml new file mode 100644 index 0000000000..95e62da694 --- /dev/null +++ b/tests/components/pmsa003i/common.yaml @@ -0,0 +1,27 @@ +i2c: + - id: i2c_pmsa003i + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: pmsa003i + pm_1_0: + name: PMSA003i PM1.0 + pm_2_5: + name: PMSA003i PM2.5 + pm_10_0: + name: PMSA003i PM10.0 + pmc_0_3: + name: PMSA003i PMC <0.3µm + pmc_0_5: + name: PMSA003i PMC <0.5µm + pmc_1_0: + name: PMSA003i PMC <1µm + pmc_2_5: + name: PMSA003i PMC <2.5µm + pmc_5_0: + name: PMSA003i PMC <5µm + pmc_10_0: + name: PMSA003i PMC <10µm + address: 0x12 + standard_units: true diff --git a/tests/components/pmsa003i/test.esp32-ard.yaml b/tests/components/pmsa003i/test.esp32-ard.yaml index d8d96400f6..63c3bd6afd 100644 --- a/tests/components/pmsa003i/test.esp32-ard.yaml +++ b/tests/components/pmsa003i/test.esp32-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp32-c3-ard.yaml b/tests/components/pmsa003i/test.esp32-c3-ard.yaml index 70e28303a2..ee2c29ca4e 100644 --- a/tests/components/pmsa003i/test.esp32-c3-ard.yaml +++ b/tests/components/pmsa003i/test.esp32-c3-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp32-c3-idf.yaml b/tests/components/pmsa003i/test.esp32-c3-idf.yaml index 70e28303a2..ee2c29ca4e 100644 --- a/tests/components/pmsa003i/test.esp32-c3-idf.yaml +++ b/tests/components/pmsa003i/test.esp32-c3-idf.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp32-idf.yaml b/tests/components/pmsa003i/test.esp32-idf.yaml index d8d96400f6..63c3bd6afd 100644 --- a/tests/components/pmsa003i/test.esp32-idf.yaml +++ b/tests/components/pmsa003i/test.esp32-idf.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp8266-ard.yaml b/tests/components/pmsa003i/test.esp8266-ard.yaml index 70e28303a2..ee2c29ca4e 100644 --- a/tests/components/pmsa003i/test.esp8266-ard.yaml +++ b/tests/components/pmsa003i/test.esp8266-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsa003i/test.rp2040-ard.yaml b/tests/components/pmsa003i/test.rp2040-ard.yaml index 70e28303a2..ee2c29ca4e 100644 --- a/tests/components/pmsa003i/test.rp2040-ard.yaml +++ b/tests/components/pmsa003i/test.rp2040-ard.yaml @@ -1,27 +1,5 @@ -i2c: - - id: i2c_pmsa003i - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmsa003i - pm_1_0: - name: PMSA003i PM1.0 - pm_2_5: - name: PMSA003i PM2.5 - pm_10_0: - name: PMSA003i PM10.0 - pmc_0_3: - name: PMSA003i PMC <0.3µm - pmc_0_5: - name: PMSA003i PMC <0.5µm - pmc_1_0: - name: PMSA003i PMC <1µm - pmc_2_5: - name: PMSA003i PMC <2.5µm - pmc_5_0: - name: PMSA003i PMC <5µm - pmc_10_0: - name: PMSA003i PMC <10µm - address: 0x12 - standard_units: true +<<: !include common.yaml diff --git a/tests/components/pmsx003/common.yaml b/tests/components/pmsx003/common.yaml new file mode 100644 index 0000000000..7b9ca5b091 --- /dev/null +++ b/tests/components/pmsx003/common.yaml @@ -0,0 +1,34 @@ +uart: + - id: uart_pmsx003 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: pmsx003 + type: PMSX003 + pm_1_0: + name: PM 1.0 Concentration + pm_2_5: + name: PM 2.5 Concentration + pm_10_0: + name: PM 10.0 Concentration + pm_1_0_std: + name: PM 1.0 Standard Atmospher Concentration + pm_2_5_std: + name: PM 2.5 Standard Atmospher Concentration + pm_10_0_std: + name: PM 10.0 Standard Atmospher Concentration + pm_0_3um: + name: Particulate Count >0.3um + pm_0_5um: + name: Particulate Count >0.5um + pm_1_0um: + name: Particulate Count >1.0um + pm_2_5um: + name: Particulate Count >2.5um + pm_5_0um: + name: Particulate Count >5.0um + pm_10_0um: + name: Particulate Count >10.0um + update_interval: 30s diff --git a/tests/components/pmsx003/test.esp32-ard.yaml b/tests/components/pmsx003/test.esp32-ard.yaml index 5e7ebbbb2e..f486544afa 100644 --- a/tests/components/pmsx003/test.esp32-ard.yaml +++ b/tests/components/pmsx003/test.esp32-ard.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp32-c3-ard.yaml b/tests/components/pmsx003/test.esp32-c3-ard.yaml index 58adc9390a..b516342f3b 100644 --- a/tests/components/pmsx003/test.esp32-c3-ard.yaml +++ b/tests/components/pmsx003/test.esp32-c3-ard.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp32-c3-idf.yaml b/tests/components/pmsx003/test.esp32-c3-idf.yaml index 58adc9390a..b516342f3b 100644 --- a/tests/components/pmsx003/test.esp32-c3-idf.yaml +++ b/tests/components/pmsx003/test.esp32-c3-idf.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp32-idf.yaml b/tests/components/pmsx003/test.esp32-idf.yaml index 5e7ebbbb2e..f486544afa 100644 --- a/tests/components/pmsx003/test.esp32-idf.yaml +++ b/tests/components/pmsx003/test.esp32-idf.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp8266-ard.yaml b/tests/components/pmsx003/test.esp8266-ard.yaml index 58adc9390a..b516342f3b 100644 --- a/tests/components/pmsx003/test.esp8266-ard.yaml +++ b/tests/components/pmsx003/test.esp8266-ard.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmsx003/test.rp2040-ard.yaml b/tests/components/pmsx003/test.rp2040-ard.yaml index 58adc9390a..b516342f3b 100644 --- a/tests/components/pmsx003/test.rp2040-ard.yaml +++ b/tests/components/pmsx003/test.rp2040-ard.yaml @@ -1,34 +1,5 @@ -uart: - - id: uart_pmsx003 - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pmsx003 - type: PMSX003 - pm_1_0: - name: PM 1.0 Concentration - pm_2_5: - name: PM 2.5 Concentration - pm_10_0: - name: PM 10.0 Concentration - pm_1_0_std: - name: PM 1.0 Standard Atmospher Concentration - pm_2_5_std: - name: PM 2.5 Standard Atmospher Concentration - pm_10_0_std: - name: PM 10.0 Standard Atmospher Concentration - pm_0_3um: - name: Particulate Count >0.3um - pm_0_5um: - name: Particulate Count >0.5um - pm_1_0um: - name: Particulate Count >1.0um - pm_2_5um: - name: Particulate Count >2.5um - pm_5_0um: - name: Particulate Count >5.0um - pm_10_0um: - name: Particulate Count >10.0um - update_interval: 30s +<<: !include common.yaml diff --git a/tests/components/pmwcs3/common.yaml b/tests/components/pmwcs3/common.yaml new file mode 100644 index 0000000000..dcf59d0b6e --- /dev/null +++ b/tests/components/pmwcs3/common.yaml @@ -0,0 +1,15 @@ +i2c: + - id: i2c_pmwcs3 + scl: ${scl_pin} + sda: ${sda_pin} + +sensor: + - platform: pmwcs3 + e25: + name: pmwcs3_e25 + ec: + name: pmwcs3_ec + temperature: + name: pmwcs3_temperature + vwc: + name: pmwcs3_vwc diff --git a/tests/components/pmwcs3/test.esp32-ard.yaml b/tests/components/pmwcs3/test.esp32-ard.yaml index 787eaca650..63c3bd6afd 100644 --- a/tests/components/pmwcs3/test.esp32-ard.yaml +++ b/tests/components/pmwcs3/test.esp32-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp32-c3-ard.yaml b/tests/components/pmwcs3/test.esp32-c3-ard.yaml index 7e7e72692d..ee2c29ca4e 100644 --- a/tests/components/pmwcs3/test.esp32-c3-ard.yaml +++ b/tests/components/pmwcs3/test.esp32-c3-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp32-c3-idf.yaml b/tests/components/pmwcs3/test.esp32-c3-idf.yaml index 7e7e72692d..ee2c29ca4e 100644 --- a/tests/components/pmwcs3/test.esp32-c3-idf.yaml +++ b/tests/components/pmwcs3/test.esp32-c3-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp32-idf.yaml b/tests/components/pmwcs3/test.esp32-idf.yaml index 787eaca650..63c3bd6afd 100644 --- a/tests/components/pmwcs3/test.esp32-idf.yaml +++ b/tests/components/pmwcs3/test.esp32-idf.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp8266-ard.yaml b/tests/components/pmwcs3/test.esp8266-ard.yaml index 7e7e72692d..ee2c29ca4e 100644 --- a/tests/components/pmwcs3/test.esp8266-ard.yaml +++ b/tests/components/pmwcs3/test.esp8266-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pmwcs3/test.rp2040-ard.yaml b/tests/components/pmwcs3/test.rp2040-ard.yaml index 7e7e72692d..ee2c29ca4e 100644 --- a/tests/components/pmwcs3/test.rp2040-ard.yaml +++ b/tests/components/pmwcs3/test.rp2040-ard.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_pmwcs3 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -sensor: - - platform: pmwcs3 - e25: - name: pmwcs3_e25 - ec: - name: pmwcs3_ec - temperature: - name: pmwcs3_temperature - vwc: - name: pmwcs3_vwc +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/common.yaml b/tests/components/pn532_i2c/common.yaml new file mode 100644 index 0000000000..db9abd4b13 --- /dev/null +++ b/tests/components/pn532_i2c/common.yaml @@ -0,0 +1,13 @@ +i2c: + - id: i2c_pn532 + scl: ${scl_pin} + sda: ${sda_pin} + +pn532_i2c: + id: pn532_nfcc + +binary_sensor: + - platform: pn532 + pn532_id: pn532_nfcc + name: PN532 NFC Tag + uid: 74-10-37-94 diff --git a/tests/components/pn532_i2c/test.esp32-ard.yaml b/tests/components/pn532_i2c/test.esp32-ard.yaml index a50533b1d0..63c3bd6afd 100644 --- a/tests/components/pn532_i2c/test.esp32-ard.yaml +++ b/tests/components/pn532_i2c/test.esp32-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp32-c3-ard.yaml b/tests/components/pn532_i2c/test.esp32-c3-ard.yaml index 62816d2ace..ee2c29ca4e 100644 --- a/tests/components/pn532_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/pn532_i2c/test.esp32-c3-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp32-c3-idf.yaml b/tests/components/pn532_i2c/test.esp32-c3-idf.yaml index 62816d2ace..ee2c29ca4e 100644 --- a/tests/components/pn532_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn532_i2c/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp32-idf.yaml b/tests/components/pn532_i2c/test.esp32-idf.yaml index a50533b1d0..63c3bd6afd 100644 --- a/tests/components/pn532_i2c/test.esp32-idf.yaml +++ b/tests/components/pn532_i2c/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 16 - sda: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp8266-ard.yaml b/tests/components/pn532_i2c/test.esp8266-ard.yaml index 62816d2ace..ee2c29ca4e 100644 --- a/tests/components/pn532_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn532_i2c/test.esp8266-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.rp2040-ard.yaml b/tests/components/pn532_i2c/test.rp2040-ard.yaml index 62816d2ace..ee2c29ca4e 100644 --- a/tests/components/pn532_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn532_i2c/test.rp2040-ard.yaml @@ -1,13 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: 5 - sda: 4 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 -pn532_i2c: - id: pn532_nfcc - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/common.yaml b/tests/components/pn532_spi/common.yaml new file mode 100644 index 0000000000..d5b8bc405e --- /dev/null +++ b/tests/components/pn532_spi/common.yaml @@ -0,0 +1,15 @@ +spi: + - id: spi_pn532 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +pn532_spi: + id: pn532_nfcc + cs_pin: ${cs_pin} + +binary_sensor: + - platform: pn532 + pn532_id: pn532_nfcc + name: PN532 NFC Tag + uid: 74-10-37-94 diff --git a/tests/components/pn532_spi/test.esp32-ard.yaml b/tests/components/pn532_spi/test.esp32-ard.yaml index 18a382a007..bce56f398a 100644 --- a/tests/components/pn532_spi/test.esp32-ard.yaml +++ b/tests/components/pn532_spi/test.esp32-ard.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 -pn532_spi: - id: pn532_nfcc - cs_pin: 12 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp32-c3-ard.yaml b/tests/components/pn532_spi/test.esp32-c3-ard.yaml index d21d50aa5c..2415ba5dc6 100644 --- a/tests/components/pn532_spi/test.esp32-c3-ard.yaml +++ b/tests/components/pn532_spi/test.esp32-c3-ard.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -pn532_spi: - id: pn532_nfcc - cs_pin: 4 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp32-c3-idf.yaml b/tests/components/pn532_spi/test.esp32-c3-idf.yaml index d21d50aa5c..2415ba5dc6 100644 --- a/tests/components/pn532_spi/test.esp32-c3-idf.yaml +++ b/tests/components/pn532_spi/test.esp32-c3-idf.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 -pn532_spi: - id: pn532_nfcc - cs_pin: 4 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp32-idf.yaml b/tests/components/pn532_spi/test.esp32-idf.yaml index 18a382a007..bce56f398a 100644 --- a/tests/components/pn532_spi/test.esp32-idf.yaml +++ b/tests/components/pn532_spi/test.esp32-idf.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 -pn532_spi: - id: pn532_nfcc - cs_pin: 12 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp8266-ard.yaml b/tests/components/pn532_spi/test.esp8266-ard.yaml index 1dba38e63e..bd5c203e35 100644 --- a/tests/components/pn532_spi/test.esp8266-ard.yaml +++ b/tests/components/pn532_spi/test.esp8266-ard.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 -pn532_spi: - id: pn532_nfcc - cs_pin: 15 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn532_spi/test.rp2040-ard.yaml b/tests/components/pn532_spi/test.rp2040-ard.yaml index ab02b2cc47..f6c3f1eeca 100644 --- a/tests/components/pn532_spi/test.rp2040-ard.yaml +++ b/tests/components/pn532_spi/test.rp2040-ard.yaml @@ -1,15 +1,7 @@ -spi: - - id: spi_pn532 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 -pn532_spi: - id: pn532_nfcc - cs_pin: 6 - -binary_sensor: - - platform: pn532 - pn532_id: pn532_nfcc - name: PN532 NFC Tag - uid: 74-10-37-94 +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/common.yaml b/tests/components/pn7150_i2c/common.yaml new file mode 100644 index 0000000000..ef852b7a78 --- /dev/null +++ b/tests/components/pn7150_i2c/common.yaml @@ -0,0 +1,35 @@ +esphome: + on_boot: + then: + - tag.set_clean_mode: nfcc_pn7150 + - tag.set_format_mode: nfcc_pn7150 + - tag.set_read_mode: nfcc_pn7150 + - tag.set_write_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.set_write_mode: nfcc_pn7150 + - tag.set_emulation_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.emulation_off: nfcc_pn7150 + - tag.emulation_on: nfcc_pn7150 + - tag.polling_off: nfcc_pn7150 + - tag.polling_on: nfcc_pn7150 + +i2c: + - id: i2c_pn7150 + scl: ${scl_pin} + sda: ${sda_pin} + +pn7150_i2c: + id: nfcc_pn7150 + irq_pin: ${irq_pin} + ven_pin: ${ven_pin} + emulation_message: https://www.home-assistant.io/tag/pulse_ce + tag_ttl: 1000ms + on_tag: + - logger.log: "Tag" + on_tag_removed: + - logger.log: "Tag removed" + on_emulated_tag_scan: + - logger.log: "Tag emulated" diff --git a/tests/components/pn7150_i2c/test.esp32-ard.yaml b/tests/components/pn7150_i2c/test.esp32-ard.yaml index 23d1061608..1643bec317 100644 --- a/tests/components/pn7150_i2c/test.esp32-ard.yaml +++ b/tests/components/pn7150_i2c/test.esp32-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO14 + ven_pin: GPIO15 -i2c: - - id: i2c_pn7150 - scl: 16 - sda: 17 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp32-c3-ard.yaml b/tests/components/pn7150_i2c/test.esp32-c3-ard.yaml index aee1886cd4..2067143411 100644 --- a/tests/components/pn7150_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/pn7150_i2c/test.esp32-c3-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7150 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml b/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml index aee1886cd4..2067143411 100644 --- a/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7150 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp32-idf.yaml b/tests/components/pn7150_i2c/test.esp32-idf.yaml index 23d1061608..1643bec317 100644 --- a/tests/components/pn7150_i2c/test.esp32-idf.yaml +++ b/tests/components/pn7150_i2c/test.esp32-idf.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO14 + ven_pin: GPIO15 -i2c: - - id: i2c_pn7150 - scl: 16 - sda: 17 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp8266-ard.yaml b/tests/components/pn7150_i2c/test.esp8266-ard.yaml index 6017d548ca..7111fc9e00 100644 --- a/tests/components/pn7150_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn7150_i2c/test.esp8266-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO12 + ven_pin: GPIO13 -i2c: - - id: i2c_pn7150 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.rp2040-ard.yaml b/tests/components/pn7150_i2c/test.rp2040-ard.yaml index aee1886cd4..2067143411 100644 --- a/tests/components/pn7150_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn7150_i2c/test.rp2040-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7150 - - tag.set_format_mode: nfcc_pn7150 - - tag.set_read_mode: nfcc_pn7150 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7150 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7150 - - tag.emulation_on: nfcc_pn7150 - - tag.polling_off: nfcc_pn7150 - - tag.polling_on: nfcc_pn7150 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7150 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7150 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/common.yaml b/tests/components/pn7160_i2c/common.yaml new file mode 100644 index 0000000000..0a7c9bd6bb --- /dev/null +++ b/tests/components/pn7160_i2c/common.yaml @@ -0,0 +1,35 @@ +esphome: + on_boot: + then: + - tag.set_clean_mode: nfcc_pn7160 + - tag.set_format_mode: nfcc_pn7160 + - tag.set_read_mode: nfcc_pn7160 + - tag.set_write_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.set_write_mode: nfcc_pn7160 + - tag.set_emulation_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.emulation_off: nfcc_pn7160 + - tag.emulation_on: nfcc_pn7160 + - tag.polling_off: nfcc_pn7160 + - tag.polling_on: nfcc_pn7160 + +i2c: + - id: i2c_pn7160 + scl: ${scl_pin} + sda: ${sda_pin} + +pn7150_i2c: + id: nfcc_pn7160 + irq_pin: ${irq_pin} + ven_pin: ${ven_pin} + emulation_message: https://www.home-assistant.io/tag/pulse_ce + tag_ttl: 1000ms + on_tag: + - logger.log: "Tag" + on_tag_removed: + - logger.log: "Tag removed" + on_emulated_tag_scan: + - logger.log: "Tag emulated" diff --git a/tests/components/pn7160_i2c/test.esp32-ard.yaml b/tests/components/pn7160_i2c/test.esp32-ard.yaml index d1a3cf5c77..1643bec317 100644 --- a/tests/components/pn7160_i2c/test.esp32-ard.yaml +++ b/tests/components/pn7160_i2c/test.esp32-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO14 + ven_pin: GPIO15 -i2c: - - id: i2c_pn7160 - scl: 16 - sda: 17 - -pn7150_i2c: - id: nfcc_pn7160 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp32-c3-ard.yaml b/tests/components/pn7160_i2c/test.esp32-c3-ard.yaml index d1d7947352..2067143411 100644 --- a/tests/components/pn7160_i2c/test.esp32-c3-ard.yaml +++ b/tests/components/pn7160_i2c/test.esp32-c3-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7160 - scl: 5 - sda: 4 - -pn7160_i2c: - id: nfcc_pn7160 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml b/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml index d1d7947352..2067143411 100644 --- a/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7160 - scl: 5 - sda: 4 - -pn7160_i2c: - id: nfcc_pn7160 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp32-idf.yaml b/tests/components/pn7160_i2c/test.esp32-idf.yaml index d1a3cf5c77..1643bec317 100644 --- a/tests/components/pn7160_i2c/test.esp32-idf.yaml +++ b/tests/components/pn7160_i2c/test.esp32-idf.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + irq_pin: GPIO14 + ven_pin: GPIO15 -i2c: - - id: i2c_pn7160 - scl: 16 - sda: 17 - -pn7150_i2c: - id: nfcc_pn7160 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp8266-ard.yaml b/tests/components/pn7160_i2c/test.esp8266-ard.yaml index 57bd965fc9..7111fc9e00 100644 --- a/tests/components/pn7160_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn7160_i2c/test.esp8266-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO12 + ven_pin: GPIO13 -i2c: - - id: i2c_pn7160 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7160 - irq_pin: 12 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.rp2040-ard.yaml b/tests/components/pn7160_i2c/test.rp2040-ard.yaml index 5224b465ed..2067143411 100644 --- a/tests/components/pn7160_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn7160_i2c/test.rp2040-ard.yaml @@ -1,35 +1,7 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + irq_pin: GPIO6 + ven_pin: GPIO7 -i2c: - - id: i2c_pn7160 - scl: 5 - sda: 4 - -pn7150_i2c: - id: nfcc_pn7160 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/common.yaml b/tests/components/pn7160_spi/common.yaml new file mode 100644 index 0000000000..9e8d22f835 --- /dev/null +++ b/tests/components/pn7160_spi/common.yaml @@ -0,0 +1,37 @@ +esphome: + on_boot: + then: + - tag.set_clean_mode: nfcc_pn7160 + - tag.set_format_mode: nfcc_pn7160 + - tag.set_read_mode: nfcc_pn7160 + - tag.set_write_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.set_write_mode: nfcc_pn7160 + - tag.set_emulation_message: + message: https://www.home-assistant.io/tag/pulse + include_android_app_record: false + - tag.emulation_off: nfcc_pn7160 + - tag.emulation_on: nfcc_pn7160 + - tag.polling_off: nfcc_pn7160 + - tag.polling_on: nfcc_pn7160 + +spi: + - id: spi_pn7160 + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} + +pn7160_spi: + id: nfcc_pn7160 + cs_pin: ${cs_pin} + irq_pin: ${irq_pin} + ven_pin: ${ven_pin} + emulation_message: https://www.home-assistant.io/tag/pulse_ce + tag_ttl: 1000ms + on_tag: + - logger.log: "Tag" + on_tag_removed: + - logger.log: "Tag removed" + on_emulated_tag_scan: + - logger.log: "Tag emulated" diff --git a/tests/components/pn7160_spi/test.esp32-ard.yaml b/tests/components/pn7160_spi/test.esp32-ard.yaml index 0319648f13..f6073d0416 100644 --- a/tests/components/pn7160_spi/test.esp32-ard.yaml +++ b/tests/components/pn7160_spi/test.esp32-ard.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 + irq_pin: GPIO13 + ven_pin: GPIO14 -spi: - - id: spi_pn7160 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 12 - irq_pin: 14 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp32-c3-ard.yaml b/tests/components/pn7160_spi/test.esp32-c3-ard.yaml index fd19a53b2b..f8a07fad2f 100644 --- a/tests/components/pn7160_spi/test.esp32-c3-ard.yaml +++ b/tests/components/pn7160_spi/test.esp32-c3-ard.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + irq_pin: GPIO9 + ven_pin: GPIO10 -spi: - - id: spi_pn7160 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 4 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp32-c3-idf.yaml b/tests/components/pn7160_spi/test.esp32-c3-idf.yaml index fd19a53b2b..f8a07fad2f 100644 --- a/tests/components/pn7160_spi/test.esp32-c3-idf.yaml +++ b/tests/components/pn7160_spi/test.esp32-c3-idf.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO6 + mosi_pin: GPIO7 + miso_pin: GPIO5 + cs_pin: GPIO8 + irq_pin: GPIO9 + ven_pin: GPIO10 -spi: - - id: spi_pn7160 - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 4 - irq_pin: 2 - ven_pin: 3 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp32-idf.yaml b/tests/components/pn7160_spi/test.esp32-idf.yaml index 0319648f13..f6073d0416 100644 --- a/tests/components/pn7160_spi/test.esp32-idf.yaml +++ b/tests/components/pn7160_spi/test.esp32-idf.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO16 + mosi_pin: GPIO17 + miso_pin: GPIO18 + cs_pin: GPIO12 + irq_pin: GPIO13 + ven_pin: GPIO14 -spi: - - id: spi_pn7160 - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 12 - irq_pin: 14 - ven_pin: 13 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp8266-ard.yaml b/tests/components/pn7160_spi/test.esp8266-ard.yaml index fa356d5610..cbe27533a7 100644 --- a/tests/components/pn7160_spi/test.esp8266-ard.yaml +++ b/tests/components/pn7160_spi/test.esp8266-ard.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + cs_pin: GPIO5 + irq_pin: GPIO15 + ven_pin: GPIO16 -spi: - - id: spi_pn7160 - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 15 - irq_pin: 4 - ven_pin: 5 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.rp2040-ard.yaml b/tests/components/pn7160_spi/test.rp2040-ard.yaml index b36650032f..70cd2425fa 100644 --- a/tests/components/pn7160_spi/test.rp2040-ard.yaml +++ b/tests/components/pn7160_spi/test.rp2040-ard.yaml @@ -1,37 +1,9 @@ -esphome: - on_boot: - then: - - tag.set_clean_mode: nfcc_pn7160 - - tag.set_format_mode: nfcc_pn7160 - - tag.set_read_mode: nfcc_pn7160 - - tag.set_write_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.set_write_mode: nfcc_pn7160 - - tag.set_emulation_message: - message: https://www.home-assistant.io/tag/pulse - include_android_app_record: false - - tag.emulation_off: nfcc_pn7160 - - tag.emulation_on: nfcc_pn7160 - - tag.polling_off: nfcc_pn7160 - - tag.polling_on: nfcc_pn7160 +substitutions: + clk_pin: GPIO2 + mosi_pin: GPIO3 + miso_pin: GPIO4 + cs_pin: GPIO5 + irq_pin: GPIO15 + ven_pin: GPIO16 -spi: - - id: spi_pn7160 - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 - -pn7160_spi: - id: nfcc_pn7160 - cs_pin: 6 - irq_pin: 7 - ven_pin: 5 - emulation_message: https://www.home-assistant.io/tag/pulse_ce - tag_ttl: 1000ms - on_tag: - - logger.log: "Tag" - on_tag_removed: - - logger.log: "Tag removed" - on_emulated_tag_scan: - - logger.log: "Tag emulated" +<<: !include common.yaml diff --git a/tests/components/pylontech/common.yaml b/tests/components/pylontech/common.yaml new file mode 100644 index 0000000000..6852685be7 --- /dev/null +++ b/tests/components/pylontech/common.yaml @@ -0,0 +1,48 @@ +uart: + - id: uart_pylontech0 + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 + +pylontech: + - id: pylontech0 + - id: pylontech1 + +sensor: + - platform: pylontech + pylontech_id: pylontech0 + battery: 1 + voltage: + id: pyl01_voltage + current: + id: pyl01_current + coulomb: + id: pyl01_soc + mos_temperature: + id: pyl01_mos_temperature + - platform: pylontech + pylontech_id: pylontech1 + battery: 1 + voltage: + id: pyl13_voltage + temperature_low: + id: pyl13_temperature_low + temperature_high: + id: pyl13_temperature_high + voltage_low: + id: pyl13_voltage_low + voltage_high: + id: pyl13_voltage_high + +text_sensor: + - platform: pylontech + pylontech_id: pylontech0 + battery: 1 + base_state: + id: pyl0_base_state + voltage_state: + id: pyl0_voltage_state + current_state: + id: pyl0_current_state + temperature_state: + id: pyl0_temperature_state diff --git a/tests/components/pylontech/test.esp32-ard.yaml b/tests/components/pylontech/test.esp32-ard.yaml index a4c168fb47..f486544afa 100644 --- a/tests/components/pylontech/test.esp32-ard.yaml +++ b/tests/components/pylontech/test.esp32-ard.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pylontech/test.esp32-c3-ard.yaml b/tests/components/pylontech/test.esp32-c3-ard.yaml index f7ec493422..b516342f3b 100644 --- a/tests/components/pylontech/test.esp32-c3-ard.yaml +++ b/tests/components/pylontech/test.esp32-c3-ard.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pylontech/test.esp32-c3-idf.yaml b/tests/components/pylontech/test.esp32-c3-idf.yaml index f7ec493422..b516342f3b 100644 --- a/tests/components/pylontech/test.esp32-c3-idf.yaml +++ b/tests/components/pylontech/test.esp32-c3-idf.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pylontech/test.esp32-idf.yaml b/tests/components/pylontech/test.esp32-idf.yaml index a4c168fb47..f486544afa 100644 --- a/tests/components/pylontech/test.esp32-idf.yaml +++ b/tests/components/pylontech/test.esp32-idf.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pylontech/test.esp8266-ard.yaml b/tests/components/pylontech/test.esp8266-ard.yaml index f7ec493422..b516342f3b 100644 --- a/tests/components/pylontech/test.esp8266-ard.yaml +++ b/tests/components/pylontech/test.esp8266-ard.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pylontech/test.rp2040-ard.yaml b/tests/components/pylontech/test.rp2040-ard.yaml index f7ec493422..b516342f3b 100644 --- a/tests/components/pylontech/test.rp2040-ard.yaml +++ b/tests/components/pylontech/test.rp2040-ard.yaml @@ -1,48 +1,5 @@ -uart: - - id: uart_pylontech0 - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -pylontech: - - id: pylontech0 - - id: pylontech1 - -sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - voltage: - id: pyl01_voltage - current: - id: pyl01_current - coulomb: - id: pyl01_soc - mos_temperature: - id: pyl01_mos_temperature - - platform: pylontech - pylontech_id: pylontech1 - battery: 1 - voltage: - id: pyl13_voltage - temperature_low: - id: pyl13_temperature_low - temperature_high: - id: pyl13_temperature_high - voltage_low: - id: pyl13_voltage_low - voltage_high: - id: pyl13_voltage_high - -text_sensor: - - platform: pylontech - pylontech_id: pylontech0 - battery: 1 - base_state: - id: pyl0_base_state - voltage_state: - id: pyl0_voltage_state - current_state: - id: pyl0_current_state - temperature_state: - id: pyl0_temperature_state +<<: !include common.yaml diff --git a/tests/components/pzem004t/common.yaml b/tests/components/pzem004t/common.yaml new file mode 100644 index 0000000000..75f7f30fc9 --- /dev/null +++ b/tests/components/pzem004t/common.yaml @@ -0,0 +1,14 @@ +uart: + - id: uart_pzem004t + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 + +sensor: + - platform: pzem004t + voltage: + name: PZEM004T Voltage + current: + name: PZEM004T Current + power: + name: PZEM004T Power diff --git a/tests/components/pzem004t/test.esp32-ard.yaml b/tests/components/pzem004t/test.esp32-ard.yaml index 23f2bd0eca..f486544afa 100644 --- a/tests/components/pzem004t/test.esp32-ard.yaml +++ b/tests/components/pzem004t/test.esp32-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp32-c3-ard.yaml b/tests/components/pzem004t/test.esp32-c3-ard.yaml index b9c93f8761..b516342f3b 100644 --- a/tests/components/pzem004t/test.esp32-c3-ard.yaml +++ b/tests/components/pzem004t/test.esp32-c3-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp32-c3-idf.yaml b/tests/components/pzem004t/test.esp32-c3-idf.yaml index b9c93f8761..b516342f3b 100644 --- a/tests/components/pzem004t/test.esp32-c3-idf.yaml +++ b/tests/components/pzem004t/test.esp32-c3-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp32-idf.yaml b/tests/components/pzem004t/test.esp32-idf.yaml index 23f2bd0eca..f486544afa 100644 --- a/tests/components/pzem004t/test.esp32-idf.yaml +++ b/tests/components/pzem004t/test.esp32-idf.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 17 - rx_pin: 16 - baud_rate: 115200 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp8266-ard.yaml b/tests/components/pzem004t/test.esp8266-ard.yaml index b9c93f8761..b516342f3b 100644 --- a/tests/components/pzem004t/test.esp8266-ard.yaml +++ b/tests/components/pzem004t/test.esp8266-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzem004t/test.rp2040-ard.yaml b/tests/components/pzem004t/test.rp2040-ard.yaml index b9c93f8761..b516342f3b 100644 --- a/tests/components/pzem004t/test.rp2040-ard.yaml +++ b/tests/components/pzem004t/test.rp2040-ard.yaml @@ -1,14 +1,5 @@ -uart: - - id: uart_pzem004t - tx_pin: 4 - rx_pin: 5 - baud_rate: 115200 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: pzem004t - voltage: - name: PZEM004T Voltage - current: - name: PZEM004T Current - power: - name: PZEM004T Power +<<: !include common.yaml diff --git a/tests/components/pzemac/common.yaml b/tests/components/pzemac/common.yaml new file mode 100644 index 0000000000..e50f4ad2f2 --- /dev/null +++ b/tests/components/pzemac/common.yaml @@ -0,0 +1,28 @@ +esphome: + on_boot: + then: + - pzemac.reset_energy: pzemac1 + +uart: + - id: uart_pzemac + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +modbus: + +sensor: + - platform: pzemac + id: pzemac1 + voltage: + name: PZEMAC Voltage + current: + name: PZEMAC Current + power: + name: PZEMAC Power + energy: + name: PZEMAC Energy + frequency: + name: PZEMAC Frequency + power_factor: + name: PZEMAC Power Factor diff --git a/tests/components/pzemac/test.esp32-ard.yaml b/tests/components/pzemac/test.esp32-ard.yaml index ce431a6100..f486544afa 100644 --- a/tests/components/pzemac/test.esp32-ard.yaml +++ b/tests/components/pzemac/test.esp32-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pzemac - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemac/test.esp32-c3-ard.yaml b/tests/components/pzemac/test.esp32-c3-ard.yaml index 6d9abbebe9..b516342f3b 100644 --- a/tests/components/pzemac/test.esp32-c3-ard.yaml +++ b/tests/components/pzemac/test.esp32-c3-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemac - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemac/test.esp32-c3-idf.yaml b/tests/components/pzemac/test.esp32-c3-idf.yaml index 6d9abbebe9..b516342f3b 100644 --- a/tests/components/pzemac/test.esp32-c3-idf.yaml +++ b/tests/components/pzemac/test.esp32-c3-idf.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemac - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemac/test.esp32-idf.yaml b/tests/components/pzemac/test.esp32-idf.yaml index ce431a6100..f486544afa 100644 --- a/tests/components/pzemac/test.esp32-idf.yaml +++ b/tests/components/pzemac/test.esp32-idf.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pzemac - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemac/test.esp8266-ard.yaml b/tests/components/pzemac/test.esp8266-ard.yaml index 6d9abbebe9..b516342f3b 100644 --- a/tests/components/pzemac/test.esp8266-ard.yaml +++ b/tests/components/pzemac/test.esp8266-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemac - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemac/test.rp2040-ard.yaml b/tests/components/pzemac/test.rp2040-ard.yaml index 6d9abbebe9..b516342f3b 100644 --- a/tests/components/pzemac/test.rp2040-ard.yaml +++ b/tests/components/pzemac/test.rp2040-ard.yaml @@ -1,28 +1,5 @@ -esphome: - on_boot: - then: - - pzemac.reset_energy: pzemac1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemac - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -modbus: - -sensor: - - platform: pzemac - id: pzemac1 - voltage: - name: PZEMAC Voltage - current: - name: PZEMAC Current - power: - name: PZEMAC Power - energy: - name: PZEMAC Energy - frequency: - name: PZEMAC Frequency - power_factor: - name: PZEMAC Power Factor +<<: !include common.yaml diff --git a/tests/components/pzemdc/common.yaml b/tests/components/pzemdc/common.yaml new file mode 100644 index 0000000000..db1868d682 --- /dev/null +++ b/tests/components/pzemdc/common.yaml @@ -0,0 +1,23 @@ +esphome: + on_boot: + then: + - pzemdc.reset_energy: pzemdc1 + +uart: + - id: uart_pzemdc + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + stop_bits: 2 + +sensor: + - platform: pzemdc + id: pzemdc1 + voltage: + name: PZEMDC Voltage + current: + name: PZEMDC Current + power: + name: PZEMDC Power + energy: + name: PZEMDC Energy diff --git a/tests/components/pzemdc/test.esp32-ard.yaml b/tests/components/pzemdc/test.esp32-ard.yaml index 9cc61137de..f486544afa 100644 --- a/tests/components/pzemdc/test.esp32-ard.yaml +++ b/tests/components/pzemdc/test.esp32-ard.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pzemdc - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp32-c3-ard.yaml b/tests/components/pzemdc/test.esp32-c3-ard.yaml index 02114b781d..b516342f3b 100644 --- a/tests/components/pzemdc/test.esp32-c3-ard.yaml +++ b/tests/components/pzemdc/test.esp32-c3-ard.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemdc - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp32-c3-idf.yaml b/tests/components/pzemdc/test.esp32-c3-idf.yaml index 02114b781d..b516342f3b 100644 --- a/tests/components/pzemdc/test.esp32-c3-idf.yaml +++ b/tests/components/pzemdc/test.esp32-c3-idf.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemdc - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp32-idf.yaml b/tests/components/pzemdc/test.esp32-idf.yaml index 9cc61137de..f486544afa 100644 --- a/tests/components/pzemdc/test.esp32-idf.yaml +++ b/tests/components/pzemdc/test.esp32-idf.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -uart: - - id: uart_pzemdc - tx_pin: 17 - rx_pin: 16 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp8266-ard.yaml b/tests/components/pzemdc/test.esp8266-ard.yaml index 02114b781d..b516342f3b 100644 --- a/tests/components/pzemdc/test.esp8266-ard.yaml +++ b/tests/components/pzemdc/test.esp8266-ard.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemdc - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml diff --git a/tests/components/pzemdc/test.rp2040-ard.yaml b/tests/components/pzemdc/test.rp2040-ard.yaml index 02114b781d..b516342f3b 100644 --- a/tests/components/pzemdc/test.rp2040-ard.yaml +++ b/tests/components/pzemdc/test.rp2040-ard.yaml @@ -1,23 +1,5 @@ -esphome: - on_boot: - then: - - pzemdc.reset_energy: pzemdc1 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -uart: - - id: uart_pzemdc - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - stop_bits: 2 - -sensor: - - platform: pzemdc - id: pzemdc1 - voltage: - name: PZEMDC Voltage - current: - name: PZEMDC Current - power: - name: PZEMDC Power - energy: - name: PZEMDC Energy +<<: !include common.yaml