diff --git a/custom_components/fusion_solar/fusion_solar/energy_sensor.py b/custom_components/fusion_solar/fusion_solar/energy_sensor.py index 5b748bf..920c11f 100644 --- a/custom_components/fusion_solar/fusion_solar/energy_sensor.py +++ b/custom_components/fusion_solar/fusion_solar/energy_sensor.py @@ -61,6 +61,10 @@ def state(self) -> float: current_value = entity.state new_value = self.coordinator.data[self._data_name][self._attribute] + if new_value == '0.00': + _LOGGER.debug(f'{self.entity_id}: new value ({new_value}) is 0, so not updating.') + return float(current_value) + if not isfloat(new_value): _LOGGER.warning(f'{self.entity_id}: new value ({new_value}) is not a float, so not updating.') return float(current_value)