diff --git a/custom_components/ohme/binary_sensor.py b/custom_components/ohme/binary_sensor.py index 92af83d..a17ccd8 100644 --- a/custom_components/ohme/binary_sensor.py +++ b/custom_components/ohme/binary_sensor.py @@ -139,7 +139,7 @@ def _calculate_state(self) -> bool: power = self.coordinator.data["power"]["watt"] # No last reading to go off, use power draw based state only - this lags - if not self._last_reading: + if not self._last_reading or not self._last_reading['power']: _LOGGER.debug("Last reading not found, default to power > 0") return power > 0