I am trying to sum the power consumptions from all entities of a group. My template works well as long as all sensors are available. However when one becomes unavailable the template sensor will also be unavailable. Does anyone have a hint how to replace an unavailable state value with a ‘0’? I could not find out how to include a default filter.
My template:
{{ expand('group.power_sensors') | map(attribute='state') | map('float') | sum }}