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.
pull/145896/head^2
Joris Pelgröm 2025-06-14 16:24:48 +02:00 committed by GitHub
parent ce52ef64db
commit 6204fd5363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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