I feel like I’ve looked at every tutorial out there for how to set this up so my SCT-013 sensors will show as “Grid consumption” sources in the Energy Dashboard, but I’m obviously still missing something because they won’t show up in the list despite an evening of troubleshooting and being fairly positive I’ve set everything up as per another tutorial that does this
Does anything jump out at anyone with the below config? It’s turned into a hodgepodge of a few different tutorials at this point unfortunately so I’m not opposed to major changes if needed anywhere.
time:
- platform: sntp
id: homeassistant_time
# Power Monitor
# Example configuration entry
sensor:
- platform: ct_clamp
sensor: adc_sensorM1
id: sensorM1
internal: true
name: "Current - Mains 1"
update_interval: 10s
filters:
- calibrate_linear:
- 0.00161 -> 0
- 0.12040 -> 11.61
- 0.050 -> 6.23
- 0.074 -> 7.07
- 0.039 -> 3.88
- 0.01803 -> 1.60
- 0.00953 -> 0.9
# This sensor is the one that gets seen by HA, if the reading is below 0.1A then it reports 0, keeps your 0 at 0
- platform: template
name: "Mains 1 - Current" #
id: templated_sensor_mains_1
lambda: |-
if (id(sensorM1).state > 0.1){
return (id(sensorM1).state);
} else {
return 0.0;
}
device_class: current
update_interval: 10s
accuracy_decimals: 2
unit_of_measurement: A
# This sensor converts the Amps to Watts (this is assuming that your voltage is 230, if not change the 230 accordingly)
- platform: template
name: "Mains 1 - Watts"
id: watts_mains_1
lambda: |-
return id(templated_sensor_mains_1).state * 120;
accuracy_decimals: 2
update_interval: 10s
device_class: power
unit_of_measurement: W
# This sensor will give you a Daily kW reading
- platform: total_daily_energy
name: "Mains 1 - Daily Energy"
unit_of_measurement: kWh
power_id: watts_mains_1
state_class: total_increasing
filters:
- multiply: 0.001
device_class: energy
# Sensor Sources
- platform: adc
pin: GPIO36
attenuation: auto
id: adc_sensorM1
# Sensors with general information.
# Uptime sensor.
- platform: uptime
name: power-monitor Uptime
# WiFi Signal sensor.
- platform: wifi_signal
name: power-monitor WiFi Signal
update_interval: 60s
binary_sensor:
- platform: status
name: "power-monitor Status"