Files

274 lines
8.4 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
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: ${ct7_name} ${watt_label}
id: ct7Watts
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_ct7}
phase_b:
current:
name: ${ct8_name} ${amp_label}
id: ct8Amps
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: ${ct8_name} ${watt_label}
id: ct8Watts
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_ct8}
phase_c:
current:
name: ${ct9_name} ${amp_label}
id: ct9Amps
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: ${ct9_name} ${watt_label}
id: ct9Watts
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_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
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: ${ct10_name} ${watt_label}
id: ct10Watts
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_ct10}
phase_b:
current:
name: ${ct11_name} ${amp_label}
id: ct11Amps
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: ${ct11_name} ${watt_label}
id: ct11Watts
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_ct11}
phase_c:
current:
name: ${ct12_name} ${amp_label}
id: ct12Amps
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: ${ct12_name} ${watt_label}
id: ct12Watts
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_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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
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
- throttle: ${kwh_throttle}
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing