mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
275 lines
8.5 KiB
YAML
275 lines
8.5 KiB
YAML
# CircuitSetup 6 Channel Energy Meter 3rd Add-on board config
|
|
# Assumes jumpers are both in the 3rd position
|
|
|
|
sensor:
|
|
#IC1 AddOn 3
|
|
############
|
|
- platform: atm90e32
|
|
release_device: true
|
|
#if ESP32 has an LED for GPIO2, remove jumper or ESP32 from meter stack before programming via serial
|
|
cs_pin: ${addon3_ic1}
|
|
id: ${addon3_id1}
|
|
phase_a:
|
|
current:
|
|
name: ${ct19_name} ${amp_label}
|
|
id: ct19Amps
|
|
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: ${ct19_name} ${watt_label}
|
|
id: ct19Watts
|
|
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_ct19}
|
|
phase_b:
|
|
current:
|
|
name: ${ct20_name} ${amp_label}
|
|
id: ct20Amps
|
|
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: ${ct20_name} ${watt_label}
|
|
id: ct20Watts
|
|
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_ct20}
|
|
phase_c:
|
|
current:
|
|
name: ${ct21_name} ${amp_label}
|
|
id: ct21Amps
|
|
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: ${ct21_name} ${watt_label}
|
|
id: ct21Watts
|
|
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_ct21}
|
|
line_frequency: ${electric_freq}
|
|
gain_pga: 1X
|
|
update_interval: ${update_time}
|
|
enable_offset_calibration: ${offset_calibration}
|
|
enable_gain_calibration: ${gain_calibration}
|
|
#IC2 AddOn 3
|
|
############
|
|
- platform: atm90e32
|
|
release_device: true
|
|
cs_pin: ${addon3_ic2}
|
|
id: ${addon3_id2}
|
|
phase_a:
|
|
current:
|
|
name: ${ct22_name} ${amp_label}
|
|
id: ct22Amps
|
|
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: ${ct22_name} ${watt_label}
|
|
id: ct22Watts
|
|
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_ct22}
|
|
phase_b:
|
|
current:
|
|
name: ${ct23_name} ${amp_label}
|
|
id: ct23Amps
|
|
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: ${ct23_name} ${watt_label}
|
|
id: ct23Watts
|
|
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_ct23}
|
|
phase_c:
|
|
current:
|
|
name: ${ct24_name} ${amp_label}
|
|
id: ct24Amps
|
|
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: ${ct24_name} ${watt_label}
|
|
id: ct24Watts
|
|
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_appliances}
|
|
- throttle: ${watt_throttle}
|
|
gain_voltage: ${voltage_cal2}
|
|
gain_ct: ${current_cal_ct24}
|
|
line_frequency: ${electric_freq}
|
|
gain_pga: 1X
|
|
update_interval: ${update_time}
|
|
enable_offset_calibration: ${offset_calibration}
|
|
enable_gain_calibration: ${gain_calibration}
|
|
|
|
# #Total A AddOn3
|
|
# - platform: template
|
|
# name: Add-on 3 Total ${amp_label}
|
|
# id: totalAmpsAddOn3
|
|
# lambda: return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ;
|
|
# accuracy_decimals: 2
|
|
# unit_of_measurement: A
|
|
# device_class: current
|
|
# update_interval: ${update_time}
|
|
|
|
# #Total W AddOn3
|
|
# - platform: template
|
|
# name: Add-on 3 Total ${watt_label}
|
|
# id: totalWattsAddOn3
|
|
# lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ;
|
|
# accuracy_decimals: 2
|
|
# unit_of_measurement: W
|
|
# device_class: power
|
|
# update_interval: ${update_time}
|
|
|
|
#kWh From CT 19
|
|
- platform: total_daily_energy
|
|
name: ${ct19_name} ${kwh_label}
|
|
id: ct19Kwh
|
|
power_id: ct19Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
# kWh from CT 20
|
|
- platform: total_daily_energy
|
|
name: ${ct20_name} ${kwh_label}
|
|
id: ct20Kwh
|
|
power_id: ct20Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 21
|
|
- platform: total_daily_energy
|
|
name: ${ct21_name} ${kwh_label}
|
|
id: ct21Kwh
|
|
power_id: ct21Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 22
|
|
- platform: total_daily_energy
|
|
name: ${ct22_name} ${kwh_label}
|
|
id: ct22Kwh
|
|
power_id: ct22Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 23
|
|
- platform: total_daily_energy
|
|
name: ${ct23_name} ${kwh_label}
|
|
id: ct23Kwh
|
|
power_id: ct23Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
|
|
#kWh From CT 24
|
|
- platform: total_daily_energy
|
|
name: ${ct24_name} ${kwh_label}
|
|
id: ct24Kwh
|
|
power_id: ct24Watts
|
|
filters:
|
|
- multiply: 0.001
|
|
- throttle: ${kwh_throttle}
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing |