mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
[CI] Consolidate some tests (C) (#8186)
This commit is contained in:
27
tests/components/cs5460a/common.yaml
Normal file
27
tests/components/cs5460a/common.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
miso_pin: ${miso_pin}
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: ${cs_pin}
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 12
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 8
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 8
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 12
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
substitutions:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
miso_pin: GPIO12
|
||||
cs_pin: GPIO15
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 15
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 2
|
||||
mosi_pin: 3
|
||||
miso_pin: 4
|
||||
substitutions:
|
||||
clk_pin: GPIO2
|
||||
mosi_pin: GPIO3
|
||||
miso_pin: GPIO4
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 6
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
Reference in New Issue
Block a user