mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
208 lines
5.3 KiB
YAML
208 lines
5.3 KiB
YAML
# CircuitSetup 6 Channel Energy Meter 1st Add-on board config
|
|
# Assumes jumpers are both in the 1st position
|
|
|
|
sensor:
|
|
#IC1 AddOn 1
|
|
############
|
|
- platform: atm90e32
|
|
release_device: true
|
|
cs_pin: ${addon1_ic1}
|
|
id: ${addon1_id1}
|
|
phase_a:
|
|
current:
|
|
name: ${ct7_name} ${amp_label}
|
|
id: ct7Amps
|
|
power:
|
|
name: ${ct7_name} ${watt_label}
|
|
id: ct7Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal1}
|
|
gain_ct: ${current_cal_ct7}
|
|
phase_b:
|
|
current:
|
|
name: ${ct8_name} ${amp_label}
|
|
id: ct8Amps
|
|
power:
|
|
name: ${ct8_name} ${watt_label}
|
|
id: ct8Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal1}
|
|
gain_ct: ${current_cal_ct8}
|
|
phase_c:
|
|
current:
|
|
name: ${ct9_name} ${amp_label}
|
|
id: ct9Amps
|
|
power:
|
|
name: ${ct9_name} ${watt_label}
|
|
id: ct9Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal1}
|
|
gain_ct: ${current_cal_ct9}
|
|
line_frequency: ${electric_freq}
|
|
gain_pga: 1X
|
|
update_interval: ${update_time}
|
|
enable_offset_calibration: ${offset_calibration}
|
|
enable_gain_calibration: ${gain_calibration}
|
|
#IC2 AddOn 1
|
|
############
|
|
- platform: atm90e32
|
|
release_device: true
|
|
cs_pin: ${addon1_ic2}
|
|
id: ${addon1_id2}
|
|
phase_a:
|
|
current:
|
|
name: ${ct10_name} ${amp_label}
|
|
id: ct10Amps
|
|
power:
|
|
name: ${ct10_name} ${watt_label}
|
|
id: ct10Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal2}
|
|
gain_ct: ${current_cal_ct10}
|
|
phase_b:
|
|
current:
|
|
name: ${ct11_name} ${amp_label}
|
|
id: ct11Amps
|
|
power:
|
|
name: ${ct11_name} ${watt_label}
|
|
id: ct11Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal2}
|
|
gain_ct: ${current_cal_ct11}
|
|
phase_c:
|
|
current:
|
|
name: ${ct12_name} ${amp_label}
|
|
id: ct12Amps
|
|
power:
|
|
name: ${ct12_name} ${watt_label}
|
|
id: ct12Watts
|
|
filters:
|
|
- lambda: |-
|
|
if (x < 0) return x * -1;
|
|
return x;
|
|
- or:
|
|
- throttle: 60s
|
|
- delta: 2.0
|
|
gain_voltage: ${voltage_cal2}
|
|
gain_ct: ${current_cal_ct12}
|
|
line_frequency: ${electric_freq}
|
|
gain_pga: 1X
|
|
update_interval: ${update_time}
|
|
enable_offset_calibration: ${offset_calibration}
|
|
enable_gain_calibration: ${gain_calibration}
|
|
|
|
#Total A AddOn1
|
|
- platform: template
|
|
name: Add-on 1 Total ${amp_label}
|
|
id: totalAmpsAddOn1
|
|
lambda: return id(ct7Amps).state + id(ct8Amps).state + id(ct9Amps).state + id(ct10Amps).state + id(ct11Amps).state + id(ct12Amps).state ;
|
|
accuracy_decimals: 2
|
|
unit_of_measurement: A
|
|
device_class: current
|
|
update_interval: ${update_time}
|
|
|
|
#Total W AddOn1
|
|
- platform: template
|
|
name: Add-on 1 Total ${watt_label}
|
|
id: totalWattsAddOn1
|
|
lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ;
|
|
accuracy_decimals: 2
|
|
unit_of_measurement: W
|
|
device_class: power
|
|
update_interval: ${update_time}
|
|
|
|
#kWh From CT 7
|
|
- platform: total_daily_energy
|
|
name: ${ct7_name} ${kwh_label}
|
|
id: ct7Kwh
|
|
power_id: ct7Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
# kWh from CT 8
|
|
- platform: total_daily_energy
|
|
name: ${ct8_name} ${kwh_label}
|
|
id: ct8Kwh
|
|
power_id: ct8Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 9
|
|
- platform: total_daily_energy
|
|
name: ${ct9_name} ${kwh_label}
|
|
id: ct9Kwh
|
|
power_id: ct9Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 10
|
|
- platform: total_daily_energy
|
|
name: ${ct10_name} ${kwh_label}
|
|
id: ct10Kwh
|
|
power_id: ct10Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 11
|
|
- platform: total_daily_energy
|
|
name: ${ct11_name} ${kwh_label}
|
|
id: ct11Kwh
|
|
power_id: ct11Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 12
|
|
- platform: total_daily_energy
|
|
name: ${ct12_name} ${kwh_label}
|
|
id: ct12Kwh
|
|
power_id: ct12Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing |