Show both entities in the developer tools. One has the wrong device class, confusing energy and power. You cannot express energy in W.
W is power and not energy. So that needs to be fixed. Basically the integration providing it must be fixed. If the entity is defined in yaml you can probably fix it there. Otherwise you can either use customize or use a template entity to create a new sensor with the right device class.
I can’t see a way to override it from the UI.You can create a template sensor, take the value and set the device class yourself.
The unit of measure for our energy sensor is suspicious because I would expect a watt hour rather than watt unit. I would question if those are the sensors you want to sum because power is the watts used at the time of measurement where as energy is watts over time so it doesn’t make sense to add them together.
Example:
A fridge will turn on and off to maintain a certain the temperature. When it’s off, it uses 1w. When it’s on, it uses 100w. That’s power
If it turns on twice for 5 minutes in 1 hour, the total power used would be 5+5+(1*50 minutes) = 60wh.
So adding say the energy for the last hour and the current power reading doesn’t make sense.
well the values are written by OpenDTU (a Open-Source platform, for micro inverter like Hoymiles) to the MQTT server.
I think I have to open an issue with them to really solve the issue.