Please share the template you are using.
Likely needs this: Why an availability template is important for energy template sensors
Please share the template you are using.
Likely needs this: Why an availability template is important for energy template sensors