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.
availability: >
{{ has_value('sensor.sma_pv_gedo_pv_power') and
has_value('sensor.sma_pv_gedo_metering_power_absorbed') and
has_value('sensor.sma_pv_gedo_battery_power_discharge_total') and
has_value('sensor.sma_pv_gedo_battery_power_charge_total') and
has_value('sensor.sma_pv_gedo_metering_power_supplied') }}