From 6204fd5363099c8c546b7cc0fa5e4c2f213c1cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Sat, 14 Jun 2025 16:24:48 +0200 Subject: [PATCH] Add polling to LetPot coordinator (#146823) - Adds polling (update_interval) to the coordinator for the LetPot integration. Push remains the primary update mechanism for all entities, but: - Polling makes entities go unavailable when the device can't be reached, which otherwise won't happen. - Pump changes do not always trigger a status push by the device (not sure why), polling makes the integration catch up to reality. --- homeassistant/components/letpot/coordinator.py | 2 ++ homeassistant/components/letpot/quality_scale.yaml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/letpot/coordinator.py b/homeassistant/components/letpot/coordinator.py index bd787157482..39e49348663 100644 --- a/homeassistant/components/letpot/coordinator.py +++ b/homeassistant/components/letpot/coordinator.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +from datetime import timedelta import logging from letpot.deviceclient import LetPotDeviceClient @@ -42,6 +43,7 @@ class LetPotDeviceCoordinator(DataUpdateCoordinator[LetPotDeviceStatus]): _LOGGER, config_entry=config_entry, name=f"LetPot {device.serial_number}", + update_interval=timedelta(minutes=10), ) self._info = info self.device = device diff --git a/homeassistant/components/letpot/quality_scale.yaml b/homeassistant/components/letpot/quality_scale.yaml index 9804a5ec3a4..f5e88bfc369 100644 --- a/homeassistant/components/letpot/quality_scale.yaml +++ b/homeassistant/components/letpot/quality_scale.yaml @@ -5,9 +5,9 @@ rules: comment: | This integration does not provide additional actions. appropriate-polling: - status: exempt + status: done comment: | - This integration only receives push-based updates. + Primarily uses push, but polls with a long interval for availability and missed updates. brands: done common-modules: done config-flow-test-coverage: done @@ -39,7 +39,7 @@ rules: comment: | The integration does not have configuration options. docs-installation-parameters: done - entity-unavailable: todo + entity-unavailable: done integration-owner: done log-when-unavailable: todo parallel-updates: done