Power sensor template without negativ power

Share the whole template sensor config if you are using YAML.

You will likely need to add this: Why an availability template is important for energy template sensors

In your case you only want to perform the calculation if all sensors are reporting valid numbers. If any them is unknown it will be replaced with 0 by your float(0) default. This could lead to strange outputs.

But the availability format is different if you are using the legacy template sensor platform. Which is why we need to see the whole config, not just the template.

If you are using the UI then you will need to move it to yaml for this. You can not do this in the UI.