I have a template sensor to monitor unmonitored power use:
- platform: template
sensors:
unmonitored_power:
friendly_name: Unmonitored Power
unique_id: Unmonitored_Power
device_class: power
unit_of_measurement: W
value_template: "{{ (
(states('sensor.legrand_din_power_consumption_module_electricalmeasurement') | float(0))
- (states('sensor.presa_home_network_active_power') | float(0))
- (states('sensor.presa_mobile_tv_active_power') | float(0))
- (states('sensor.presa_lavatrice_active_power') | float(0))
- (states('sensor.presa_pompa_piscina_active_power') | float(0))
- (states('sensor.presa_asciugatrice_active_power') | float(0))
- (states('sensor.presa_friggitrice_power') | float(0))
- (states('sensor.presa_frigorifero_active_power') | float(0))
- (states('sensor.presa_lavastoviglie_active_power') | float(0))
- (states('sensor.shelly_bagno_power') | float(0))
- (states('sensor.shelly_camera_cassettiera_power') | float(0))
- (states('sensor.shelly_camera_letto_power') | float(0))
- (states('sensor.shelly_cameretta_scrivania_power') | float(0))
- (states('sensor.shelly_taverna_mobile_power') | float(0))
- (states('sensor.shelly_taverna_scrivania_power') | float(0))
- (states('sensor.shelly_sala_divano_power') | float(0))
- (states('sensor.shelly_caldaia_power') | float(0))
) | float(0) | round(0)}}"
The issue with this is that every time I add a new power monitoring device, I have to manually edit the template sensor.
To make this easier to maintain I was looking in creating with helpers a group of those sensor with the sum of their power usage so to replace the above list with just one overall monitored power sensor.
The group is working fine till one of the power monitoring devices in the group became unavailable, one single unavailable device makes the group status unavailable as well and it stop summing all other sensors consumption.
Is there a way to have all sensors in an helper group that will still operate even if some sensors are unavailable ?
Thank you!