WTH are integrations discouraged to add helper entities

It would be useful if integrations were allowed to add helper entities per default.

Eg. if an API of a solar inverter don’t provide applicable values for use in the energy panel a “template entity” (can be solved by python calculation in the integration code, not templates per se) providing the needed state should be added by default - instead of having users reach for template entities manually (and thus learning the syntax).

I agree. It’s pretty common for devices to provide a sensor (say a power reading in W), and to need a Reimann Sum to turn it into Wh.

Exactly. This or a sensor that has positive values on import and negative on export etc.

Thinking about it, Riemann sum is probably a bad usecase. If there are downtimes (HA, the integrated device or anything inbetween) we would generate wrong values and it would not be obvious to a user :thinking:

Automatic input helper creation should be available as a service call too.

1 Like

Any kind of values are wrong when HA is down and your sensor doesn’t accumulate the usage (kWh) itself but gives only instantaneous values like W. You either don’t count that time at all or you interpolate. Of course this behavior should be well documented.