diff --git a/custom_components/ohme/binary_sensor.py b/custom_components/ohme/binary_sensor.py index 500e810..a7d123e 100644 --- a/custom_components/ohme/binary_sensor.py +++ b/custom_components/ohme/binary_sensor.py @@ -188,9 +188,9 @@ def _calculate_state(self) -> bool: @callback def _handle_coordinator_update(self) -> None: """Update data.""" - # Don't accept updates if 20s hasnt passed + # Don't accept updates if 5s hasnt passed # State calculations use deltas that may be unreliable to check if requests are too often - if self._last_updated and (utcnow().timestamp() - self._last_updated.timestamp() < 20): + if self._last_updated and (utcnow().timestamp() - self._last_updated.timestamp() < 5): _LOGGER.debug("ChargingBinarySensor: State update too soon - suppressing") return