diff --git a/tests/components/mcp4461/common.yaml b/tests/components/mcp4461/common.yaml new file mode 100644 index 0000000000..597df6c6c1 --- /dev/null +++ b/tests/components/mcp4461/common.yaml @@ -0,0 +1,28 @@ +i2c: + - id: i2c_mcp4461 + scl: ${scl_pin} + sda: ${sda_pin} + +mcp4461: + - id: mcp4461_digipot_01 + +output: + - platform: mcp4461 + id: digipot_wiper_1 + mcp4461_id: mcp4461_digipot_01 + channel: A + + - platform: mcp4461 + id: digipot_wiper_2 + mcp4461_id: mcp4461_digipot_01 + channel: B + + - platform: mcp4461 + id: digipot_wiper_3 + mcp4461_id: mcp4461_digipot_01 + channel: C + + - platform: mcp4461 + id: digipot_wiper_4 + mcp4461_id: mcp4461_digipot_01 + channel: D diff --git a/tests/components/mcp4461/test.esp32-ard.yaml b/tests/components/mcp4461/test.esp32-ard.yaml index 71944e45ae..63c3bd6afd 100644 --- a/tests/components/mcp4461/test.esp32-ard.yaml +++ b/tests/components/mcp4461/test.esp32-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_mcp4461 - sda: 16 - scl: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -mcp4461: - - id: mcp4461_digipot_01 - -output: - - platform: mcp4461 - id: digipot_wiper_1 - mcp4461_id: mcp4461_digipot_01 - channel: A - - - platform: mcp4461 - id: digipot_wiper_2 - mcp4461_id: mcp4461_digipot_01 - channel: B - - - platform: mcp4461 - id: digipot_wiper_3 - mcp4461_id: mcp4461_digipot_01 - channel: C - - - platform: mcp4461 - id: digipot_wiper_4 - mcp4461_id: mcp4461_digipot_01 - channel: D +<<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp32-c3-ard.yaml b/tests/components/mcp4461/test.esp32-c3-ard.yaml index 099cb50415..f29175228c 100644 --- a/tests/components/mcp4461/test.esp32-c3-ard.yaml +++ b/tests/components/mcp4461/test.esp32-c3-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_mcp4461 - sda: 4 - scl: 5 +substitutions: + scl_pin: GPIO4 + sda_pin: GPIO5 -mcp4461: - - id: mcp4461_digipot_01 - -output: - - platform: mcp4461 - id: digipot_wiper_1 - mcp4461_id: mcp4461_digipot_01 - channel: A - - - platform: mcp4461 - id: digipot_wiper_2 - mcp4461_id: mcp4461_digipot_01 - channel: B - - - platform: mcp4461 - id: digipot_wiper_3 - mcp4461_id: mcp4461_digipot_01 - channel: C - - - platform: mcp4461 - id: digipot_wiper_4 - mcp4461_id: mcp4461_digipot_01 - channel: D +<<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp32-c3-idf.yaml b/tests/components/mcp4461/test.esp32-c3-idf.yaml index 099cb50415..f29175228c 100644 --- a/tests/components/mcp4461/test.esp32-c3-idf.yaml +++ b/tests/components/mcp4461/test.esp32-c3-idf.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_mcp4461 - sda: 4 - scl: 5 +substitutions: + scl_pin: GPIO4 + sda_pin: GPIO5 -mcp4461: - - id: mcp4461_digipot_01 - -output: - - platform: mcp4461 - id: digipot_wiper_1 - mcp4461_id: mcp4461_digipot_01 - channel: A - - - platform: mcp4461 - id: digipot_wiper_2 - mcp4461_id: mcp4461_digipot_01 - channel: B - - - platform: mcp4461 - id: digipot_wiper_3 - mcp4461_id: mcp4461_digipot_01 - channel: C - - - platform: mcp4461 - id: digipot_wiper_4 - mcp4461_id: mcp4461_digipot_01 - channel: D +<<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp32-idf.yaml b/tests/components/mcp4461/test.esp32-idf.yaml index 71944e45ae..63c3bd6afd 100644 --- a/tests/components/mcp4461/test.esp32-idf.yaml +++ b/tests/components/mcp4461/test.esp32-idf.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_mcp4461 - sda: 16 - scl: 17 +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 -mcp4461: - - id: mcp4461_digipot_01 - -output: - - platform: mcp4461 - id: digipot_wiper_1 - mcp4461_id: mcp4461_digipot_01 - channel: A - - - platform: mcp4461 - id: digipot_wiper_2 - mcp4461_id: mcp4461_digipot_01 - channel: B - - - platform: mcp4461 - id: digipot_wiper_3 - mcp4461_id: mcp4461_digipot_01 - channel: C - - - platform: mcp4461 - id: digipot_wiper_4 - mcp4461_id: mcp4461_digipot_01 - channel: D +<<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp8266-ard.yaml b/tests/components/mcp4461/test.esp8266-ard.yaml index 099cb50415..f29175228c 100644 --- a/tests/components/mcp4461/test.esp8266-ard.yaml +++ b/tests/components/mcp4461/test.esp8266-ard.yaml @@ -1,28 +1,5 @@ -i2c: - - id: i2c_mcp4461 - sda: 4 - scl: 5 +substitutions: + scl_pin: GPIO4 + sda_pin: GPIO5 -mcp4461: - - id: mcp4461_digipot_01 - -output: - - platform: mcp4461 - id: digipot_wiper_1 - mcp4461_id: mcp4461_digipot_01 - channel: A - - - platform: mcp4461 - id: digipot_wiper_2 - mcp4461_id: mcp4461_digipot_01 - channel: B - - - platform: mcp4461 - id: digipot_wiper_3 - mcp4461_id: mcp4461_digipot_01 - channel: C - - - platform: mcp4461 - id: digipot_wiper_4 - mcp4461_id: mcp4461_digipot_01 - channel: D +<<: !include common.yaml