# 6 Channel Example Config for Split Single Phase whole house, solar, and 2 other circuits # See all options at https://esphome.io/components/sensor/atm90e32.html substitutions: # Change the disp_name to something you want disp_name: Energy Meter friendly_name: CircuitSetup Energy Meter # Interval of how often the power data is updated update_time: 10s # Change current_cal to the corresponding CT's that you're using # If different CTs per current channel, remove or change "${current_cal}" from # "gain_ct" below and replace with the CT calibration number respectively # Current Transformers: # 20A/25mA SCT-006: 11143 # 30A/1V SCT-013-030: 8650 # 50A/1V SCT-013-050: 15420 # 50A/16.6mA SCT-010: 41334 # 80A/26.6mA SCT-010: 41660 # 100A/50ma SCT-013-000: 27518 # 120A/40mA: SCT-016: 41787 # 200A/100mA SCT-024: 27518 # 200A/50mA SCT-024: 55036 house_current_cal: '27518' solar_current_cal: '27518' current_cal: '27518' # This only needs to be changed if you're using something other than the # Jameco 9VAC Transformer: voltage_cal: '7305' esphome: name: ${disp_name} friendly_name: "${friendly_name}" name_add_mac_suffix: true min_version: '2025.5.0' project: name: circuitsetup.6c-energy-meter version: "1.6" packages: common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common.yaml # Enable Home Assistant API # An encryption key is recommended and can be generated here: # https://esphome.io/components/api.html#configuration-variables api: # encryption: # key: "YOUR_ENCRYPTION_KEY_HERE" # Enable OTA updating ota: - platform: esphome # Set up a wifi access point wifi: ap: # In combination with the `ap` this allows # provisioning wifi credentials to the device. captive_portal: # Sets up Bluetooth LE to provision wifi credentials # to the device. esp32_improv: authorizer: none # Sets up the improv via serial client for wifi provisioning improv_serial: web_server: port: 80 sensor: #IC1 - platform: atm90e32 cs_pin: 5 #CT1 phase_a: voltage: name: ${disp_name} Volts id: HouseL1Volts accuracy_decimals: 1 current: name: ${disp_name} House L1 Amps id: HouseL1Amps power: name: ${disp_name} House L1 Watts id: HouseL1Watts gain_voltage: ${voltage_cal} gain_ct: ${house_current_cal} #CT2 phase_b: current: name: ${disp_name} Solar L1 Amps id: SolarL1Amps power: name: ${disp_name} Solar L1 Watts id: SolarL1Watts gain_voltage: ${voltage_cal} gain_ct: ${solar_current_cal} #CT3 phase_c: current: name: ${disp_name} Hot Water Amps id: HotWaterAmps power: name: ${disp_name} Hot Water Watts id: HotWaterWatts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} frequency: name: ${disp_name} Freq line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 - platform: atm90e32 cs_pin: 4 #CT4 phase_a: current: name: ${disp_name} Dryer Amps id: DryerAmps power: name: ${disp_name} Dryer Watts id: DryerWatts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} #CT5 phase_b: current: name: ${disp_name} Solar L2 Amps id: SolarL2Amps power: name: ${disp_name} CT5 Watts id: SolarL2Watts gain_voltage: ${voltage_cal} gain_ct: ${solar_current_cal} #CT6 phase_c: current: name: ${disp_name} House L2 Amps id: HouseL2Amps power: name: ${disp_name} House L2 Watts id: HouseL2Watts gain_voltage: ${voltage_cal} gain_ct: ${house_current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #Total House Amps - platform: template name: ${disp_name} Total House Amps id: totalHouseAmps lambda: return id(HouseL1Amps).state + id(HouseL2Amps).state ; accuracy_decimals: 2 unit_of_measurement: A device_class: current update_interval: ${update_time} #Total House Watts - platform: template name: ${disp_name} Total House Watts id: totalHouseWatts lambda: return id(HouseL1Watts).state + id(HouseL2Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total House Watts Negative - platform: template name: ${disp_name} Total House Return To Grid Watts id: returnToGridWatts lambda: |- if (id(totalHouseWatts).state > 0) { return 0; } else { return abs(id(totalHouseWatts).state) ; } accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #House Negative kWh (HA Return to Grid) - platform: total_daily_energy name: ${disp_name} House Return To Grid kWh power_id: returnToGridWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing #Total House Watts Positive - platform: template name: ${disp_name} Total House Positive Watts id: totalHousePositiveWatts lambda: |- if (id(totalHouseWatts).state < 0) { return 0; } else { return id(totalHouseWatts).state ; } accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #House positive kWh - platform: total_daily_energy name: ${disp_name} House kWh power_id: totalHousePositiveWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing #Total Solar Amps - platform: template name: ${disp_name} Total Solar Amps id: totalSolarAmps lambda: return id(SolarL1Amps).state + id(SolarL2Amps).state ; accuracy_decimals: 2 unit_of_measurement: A device_class: current update_interval: ${update_time} #Total Solar Watts - platform: template name: ${disp_name} Total Solar Watts id: totalSolarWatts lambda: return id(SolarL1Watts).state + id(SolarL2Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Solar kWh - platform: total_daily_energy name: ${disp_name} Solar kWh power_id: totalSolarWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing #Individual Hot Water kWh - platform: total_daily_energy name: ${disp_name} Hot Water kWh power_id: HotWaterWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing #Individual Dryer kWh - platform: total_daily_energy name: ${disp_name} Dryer kWh power_id: DryerWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing