diff --git a/custom_components/dashboard_delbrueck/sensor.py b/custom_components/dashboard_delbrueck/sensor.py index ee70933..2bfc882 100644 --- a/custom_components/dashboard_delbrueck/sensor.py +++ b/custom_components/dashboard_delbrueck/sensor.py @@ -73,7 +73,9 @@ def update(self): else: self._attr_native_value = data["value"] self._attr_native_unit_of_measurement = UNIT_CONVERTER[data["unit"]] - except (ValueError, ConnectionError): + except ConnectionError: + self._attr_native_value = None + except ValueError: self._attr_native_value = None if "unit" in data and data["unit"] in UNIT_CONVERTER: self._attr_native_unit_of_measurement = UNIT_CONVERTER[data["unit"]]