I have a Sonoff S31 smart plug running Tasmota which is integrated into HA via the MQTT integration. It was auto-discovered, I did not configure it in YAML. (Note: it’s using the MQTT integration, not the Tasmota integration. I’d prefer not to change that if possible.)
Two of the sensors on the entity return power in kWh - Total energy and Daily energy. However, they do not show up in the drop-down list on the energy configuration screen, so I can’t add them to the energy dashboard.
I think this is because their device_class
isn’t set to ‘energy’, but I can’t find a way to set it. Is there a solution for this?
Note: I’ve also tried to use the Riemann sum integral sensor to integrate the plug’s Power senor, which is in W, but that doesn’t seem to work either. It seems to correctly report kWh, but I can’t add it to the dashboard either.