Files

274 lines
8.4 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
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct13_name} ${watt_label}
id: ct13Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct13}
phase_b:
current:
name: ${ct14_name} ${amp_label}
id: ct14Amps
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct14_name} ${watt_label}
id: ct14Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct14}
phase_c:
current:
name: ${ct15_name} ${amp_label}
id: ct15Amps
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct15_name} ${watt_label}
id: ct15Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
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
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct16_name} ${watt_label}
id: ct16Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct16}
phase_b:
current:
name: ${ct17_name} ${amp_label}
id: ct17Amps
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct17_name} ${watt_label}
id: ct17Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct17}
phase_c:
current:
name: ${ct18_name} ${amp_label}
id: ct18Amps
entity_category: diagnostic
accuracy_decimals: ${amp_accuracy_decimals}
filters:
# Drop noise below 0.02A, then log 0.05A changes or every 60s
- lambda: "return x < 0.02 ? 0 : x;"
- or:
- delta: ${amp_delta}
- throttle: ${amp_throttle}
power:
name: ${ct18_name} ${watt_label}
id: ct18Watts
accuracy_decimals: 1
filters:
# Convert negative to positive (absolute value)
- lambda: "return abs(x);"
# Clip "ghost" watts when the device is off
- lambda: "return x < 5.0 ? 0 : x;"
- or:
- delta: ${watt_delta_lights}
- throttle: ${watt_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing