I am pulling my hair out. I het a raft of ESP devices doing things around the house and i got a CircuitSetup 6 channel power monitoring board. I have got it all up and running with ESPhome and the sensors are built, I can see the Voltage, Watts, Amps and total daily consumption in kWh but it is not showing up as an option in the Energy tab, I have watched the youtube video on what to do and i have followed it even using the same YAML but changing the device names. I did have an issue at the start were i put in a duplicate name and that cause some funny behavior but has since been resolved.
This is a snippet of the YAML for the Solar channel on the board
#CT4
phase_a:
current:
name: ${disp_name} Solar L1 Amps
id: SolarL1Amps
power:
name: ${disp_name} Solar L1 Watts
id: SolarL1Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
#Total Solar Amps
- platform: template
name: ${disp_name} Total Solar Amps
id: totalSolarAmps
lambda: return id(SolarL1Amps).state ;
accuracy_decimals: 2
unit_of_measurement: A
icon: "mdi:flash"
update_interval: ${update_time}
#Total Solar Watts
- platform: template
name: ${disp_name} Total Solar Watts
id: totalSolarWatts
lambda: return id(SolarL1Watts).state ;
accuracy_decimals: 1
unit_of_measurement: W
icon: "mdi:flash-circle"
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
Ok sorry i am not following, I have had a look and there does not seem to be any way to change the state_class of the platform sensor in the ESPhome config
Failed config
sensor.total_daily_energy: [source /config/power-meter.yaml:184]
platform: total_daily_energy
name: energy-monitor Solar New kWh
power_id: totalSolarWatts
filters:
- multiply: 0.001
unit_of_measurement: kWh
Unknown value 'total_increasing', valid options are '', 'measurement'.
state_class: total_increasing [source /config/power-meter.yaml:190]
If you are still having an issue you will need to ensure that you have state_class: total_increasing for it to qualify in the energy dashboard as a device that can be added, As you can see my issue was from haveing a (now very) old version of ESP Home that had not been updated to include the new state class