mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
New component: ADE7880 voltage/current/power/energy sensor (#5242)
This commit is contained in:
56
tests/components/ade7880/common.yaml
Normal file
56
tests/components/ade7880/common.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
i2c:
|
||||
- id: i2c_ade7880
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
sensor:
|
||||
- platform: ade7880
|
||||
i2c_id: i2c_ade7880
|
||||
irq0_pin: ${irq0_pin}
|
||||
irq1_pin: ${irq1_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
frequency: 60Hz
|
||||
phase_a:
|
||||
name: Channel A
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3116628
|
||||
voltage_gain: -757178
|
||||
power_gain: -1344457
|
||||
phase_angle: 188
|
||||
phase_b:
|
||||
name: Channel B
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3133655
|
||||
voltage_gain: -755235
|
||||
power_gain: -1345638
|
||||
phase_angle: 188
|
||||
phase_c:
|
||||
name: Channel C
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3111158
|
||||
voltage_gain: -743813
|
||||
power_gain: -1351437
|
||||
phase_angle: 180
|
||||
neutral:
|
||||
name: Neutral
|
||||
current: Current
|
||||
calibration:
|
||||
current_gain: 3189
|
8
tests/components/ade7880/test.esp32-c3-idf.yaml
Normal file
8
tests/components/ade7880/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO6
|
||||
irq1_pin: GPIO7
|
||||
reset_pin: GPIO10
|
||||
|
||||
<<: !include common.yaml
|
8
tests/components/ade7880/test.esp32-c3.yaml
Normal file
8
tests/components/ade7880/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO6
|
||||
irq1_pin: GPIO7
|
||||
reset_pin: GPIO10
|
||||
|
||||
<<: !include common.yaml
|
8
tests/components/ade7880/test.esp32-idf.yaml
Normal file
8
tests/components/ade7880/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
8
tests/components/ade7880/test.esp32.yaml
Normal file
8
tests/components/ade7880/test.esp32.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
8
tests/components/ade7880/test.esp8266.yaml
Normal file
8
tests/components/ade7880/test.esp8266.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
8
tests/components/ade7880/test.rp2040.yaml
Normal file
8
tests/components/ade7880/test.rp2040.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
@@ -1758,6 +1758,62 @@ sensor:
|
||||
memory_location: 0x20
|
||||
memory_address: 0x7d
|
||||
name: Adres sensor
|
||||
- platform: ade7880
|
||||
i2c_id: i2c_bus
|
||||
irq0_pin:
|
||||
number: GPIO13
|
||||
allow_other_uses: true
|
||||
irq1_pin:
|
||||
number: GPIO5
|
||||
allow_other_uses: true
|
||||
reset_pin:
|
||||
number: GPIO16
|
||||
allow_other_uses: true
|
||||
frequency: 60Hz
|
||||
phase_a:
|
||||
name: Channel A
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3116628
|
||||
voltage_gain: -757178
|
||||
power_gain: -1344457
|
||||
phase_angle: 188
|
||||
phase_b:
|
||||
name: Channel B
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3133655
|
||||
voltage_gain: -755235
|
||||
power_gain: -1345638
|
||||
phase_angle: 188
|
||||
phase_c:
|
||||
name: Channel C
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3111158
|
||||
voltage_gain: -743813
|
||||
power_gain: -1351437
|
||||
phase_angle: 180
|
||||
neutral:
|
||||
name: Neutral
|
||||
current: Current
|
||||
calibration:
|
||||
current_gain: 3189
|
||||
|
||||
psram:
|
||||
|
||||
|
@@ -290,6 +290,62 @@ sensor:
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
|
||||
- platform: ade7880
|
||||
irq0_pin:
|
||||
number: GPIO13
|
||||
allow_other_uses: true
|
||||
irq1_pin:
|
||||
number: GPIO5
|
||||
allow_other_uses: true
|
||||
reset_pin:
|
||||
number: GPIO16
|
||||
allow_other_uses: true
|
||||
frequency: 60Hz
|
||||
phase_a:
|
||||
name: Channel A
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3116628
|
||||
voltage_gain: -757178
|
||||
power_gain: -1344457
|
||||
phase_angle: 188
|
||||
phase_b:
|
||||
name: Channel B
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3133655
|
||||
voltage_gain: -755235
|
||||
power_gain: -1345638
|
||||
phase_angle: 188
|
||||
phase_c:
|
||||
name: Channel C
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3111158
|
||||
voltage_gain: -743813
|
||||
power_gain: -1351437
|
||||
phase_angle: 180
|
||||
neutral:
|
||||
name: Neutral
|
||||
current: Current
|
||||
calibration:
|
||||
current_gain: 3189
|
||||
|
||||
apds9960:
|
||||
address: 0x20
|
||||
update_interval: 60s
|
||||
|
Reference in New Issue
Block a user