Files
fresh-home/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml
T

208 lines
5.3 KiB
YAML

# CircuitSetup 6 Channel Energy Meter 2nd Add-on board config
# Assumes jumpers are both in the 2nd position
sensor:
#IC1 AddOn 2
############
- platform: atm90e32
cs_pin: ${addon2_ic1}
release_device: true
id: ${addon2_id1}
phase_a:
current:
name: ${ct13_name} ${amp_label}
id: ct13Amps
power:
name: ${ct13_name} ${watt_label}
id: ct13Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct13}
phase_b:
current:
name: ${ct14_name} ${amp_label}
id: ct14Amps
power:
name: ${ct14_name} ${watt_label}
id: ct14Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct14}
phase_c:
current:
name: ${ct15_name} ${amp_label}
id: ct15Amps
power:
name: ${ct15_name} ${watt_label}
id: ct15Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct15}
line_frequency: ${electric_freq}
gain_pga: 1X
update_interval: ${update_time}
enable_offset_calibration: ${offset_calibration}
enable_gain_calibration: ${gain_calibration}
#IC2 AddOn 2
############
- platform: atm90e32
release_device: true
cs_pin: ${addon2_ic2}
id: ${addon2_id2}
phase_a:
current:
name: ${ct16_name} ${amp_label}
id: ct16Amps
power:
name: ${ct16_name} ${watt_label}
id: ct16Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct16}
phase_b:
current:
name: ${ct17_name} ${amp_label}
id: ct17Amps
power:
name: ${ct17_name} ${watt_label}
id: ct17Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct17}
phase_c:
current:
name: ${ct18_name} ${amp_label}
id: ct18Amps
power:
name: ${ct18_name} ${watt_label}
id: ct18Watts
filters:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct18}
line_frequency: ${electric_freq}
gain_pga: 1X
update_interval: ${update_time}
enable_offset_calibration: ${offset_calibration}
enable_gain_calibration: ${gain_calibration}
#Total A AddOn2
- platform: template
name: Add-on 2 Total ${amp_label}
id: totalAmpsAddOn2
lambda: return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ;
accuracy_decimals: 2
unit_of_measurement: A
device_class: current
update_interval: ${update_time}
#Total W AddOn2
- platform: template
name: Add-on 2 Total ${watt_label}
id: totalWattsAddOn2
lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ;
accuracy_decimals: 2
unit_of_measurement: W
device_class: power
update_interval: ${update_time}
#kWh From CT 13
- platform: total_daily_energy
name: ${ct13_name} ${kwh_label}
id: ct13Kwh
power_id: ct13Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
# kWh from CT 14
- platform: total_daily_energy
name: ${ct14_name} ${kwh_label}
id: ct14Kwh
power_id: ct14Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
#kWh From CT 15
- platform: total_daily_energy
name: ${ct15_name} ${kwh_label}
id: ct15Kwh
power_id: ct15Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
#kWh From CT 16
- platform: total_daily_energy
name: ${ct16_name} ${kwh_label}
id: ct16Kwh
power_id: ct16Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
#kWh From CT 17
- platform: total_daily_energy
name: ${ct17_name} ${kwh_label}
id: ct17Kwh
power_id: ct17Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
#kWh From CT 18
- platform: total_daily_energy
name: ${ct18_name} ${kwh_label}
id: ct18Kwh
power_id: ct18Watts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing