Hi, i have 4 clamp connected to a wemos D1 Mini
esphome:
name: energy-meter
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
password: ""
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Energy-Meter Fallback Hotspot"
password: "bDthQh5QfWbh"
captive_portal:
# Example configuration entry for ESP32
i2c:
sda: GPIO04
scl: GPIO05
scan: true
id: bus_a
ads1115:
- address: 0x48
continuous_mode: on
id: ads1115_48
- address: 0x49
continuous_mode: on
id: ads1115_49
# - address: 0x50
# continuous_mode: on
# id: ads1115_50
# - address: 0x51
# continuous_mode: on
# id: ads1115_51
time:
- platform: sntp
id: my_time
status_led:
pin:
number: D4
inverted: True
sensor:
# - platform: ct_clamp
# sensor: adc_ch1
# name: "CH1 Measured Power"
# id: ch1_power
# update_interval: 5s
# accuracy_decimals: 0
# filters:
# - calibrate_linear:
# - 0.0008 -> 0.0
# - 0.036 -> 10.87
# - lambda: return x * 230;
# unit_of_measurement: "W"
# # Example source sensor
# - platform: adc
# pin: A0
# id: adc_sensor
# Channel 1
- platform: ads1115
ads1115_id: ads1115_48
id: adc_ch1
multiplexer: 'A0_A1'
gain: 1.024
name: "CH1 Measured Voltage"
- platform: ct_clamp
sensor: adc_ch1
name: "CH1 Measured Current"
update_interval: 30s
id: ch1_current
filters:
- calibrate_linear:
- 0 -> 0
- 1 -> 30
- platform: template
id: ch1_power
name: "CH1 Measured Power"
lambda: |
if( id(ch1_current).state * 230.0 >= 1 ){
return id(ch1_current).state * 230.0 /1000;
}else{
return 0;
}
accuracy_decimals: 3
update_interval: 30s
unit_of_measurement: "kW"
- platform: total_daily_energy
name: "CH1 Dayly Power"
power_id: ch1_power
unit_of_measurement: "kWh"
# Channel 2
- platform: ads1115
ads1115_id: ads1115_48
id: adc_ch2
multiplexer: 'A2_A3'
gain: 1.024
name: "CH2 Measured Voltage"
- platform: ct_clamp
sensor: adc_ch2
name: "CH2 Measured Current"
update_interval: 30s
id: ch2_current
filters:
- calibrate_linear:
- 0 -> 0
- 1 -> 30
- platform: template
id: ch2_power
name: "CH2 Measured Power"
lambda: |
if( id(ch2_current).state * 230.0 >= 1 ){
return id(ch2_current).state * 230.0 /1000;
}else{
return 0;
}
accuracy_decimals: 3
update_interval: 30s
unit_of_measurement: "kW"
- platform: total_daily_energy
name: "CH2 Dayly Power"
power_id: ch2_power
unit_of_measurement: "kWh"
# Channel 3
- platform: ads1115
ads1115_id: ads1115_49
id: adc_ch3
multiplexer: 'A0_A1'
gain: 1.024
name: "CH3 Measured Voltage"
- platform: ct_clamp
sensor: adc_ch3
name: "CH3 Measured Current"
update_interval: 30s
id: ch3_current
filters:
- calibrate_linear:
- 0 -> 0
- 1 -> 30
- platform: template
id: ch3_power
name: "CH3 Measured Power"
lambda: |
if( id(ch3_current).state * 230.0 >= 1 ){
return id(ch3_current).state * 230.0 /1000;
}else{
return 0;
}
accuracy_decimals: 3
update_interval: 30s
unit_of_measurement: "kW"
- platform: total_daily_energy
name: "CH3 Dayly Power"
power_id: ch3_power
unit_of_measurement: "kWh"
# Channel 4
- platform: ads1115
ads1115_id: ads1115_49
id: adc_ch4
multiplexer: 'A2_A3'
gain: 1.024
name: "CH4 Measured Voltage"
- platform: ct_clamp
sensor: adc_ch4
name: "CH4 Measured Current"
update_interval: 30s
id: ch4_current
filters:
- calibrate_linear:
- 0 -> 0
- 1 -> 30
- platform: template
id: ch4_power
name: "CH4 Measured Power"
lambda: |
if( id(ch4_current).state * 230.0 >= 1 ){
return id(ch4_current).state * 230.0 /1000;
}else{
return 0;
}
accuracy_decimals: 3
update_interval: 30s
unit_of_measurement: "kW"
- platform: total_daily_energy
name: "CH4 Dayly Power"
power_id: ch4_power
unit_of_measurement: "kWh"
But from HA in energy settings i can set CH1 Dayly Power in mains but i cannot add ch2 , 3 , 4 on individual devices
Any ideas?
Thank You!