Hi,
I ran into repeated PoolLab API errors in Home Assistant and noticed that the integration currently polls every 30 seconds and writes sensor state updates even when the measurement did not actually change.
This patch changes:
- polling interval from 30 seconds to 15 minutes
- API timeout from 10 seconds to 30 seconds
- clearer UpdateFailed messages with the original exception type
- sensors only write state when measurement id, timestamp or value changed
- tests for coordinator interval/error reporting and unchanged sensor updates
This should reduce unnecessary recorder writes and avoid misleading last_updated changes for old PoolLab measurements.
Tested with:
uv run --python 3.13 --with-requirements requirements.test.txt pytest tests/test_coordinator.py tests/test_sensor.py --no-cov
Result: 4 passed.
Patch attached.
Please check and implement.
Thank you
poollab-fix-20260821.patch
Hi,
I ran into repeated PoolLab API errors in Home Assistant and noticed that the integration currently polls every 30 seconds and writes sensor state updates even when the measurement did not actually change.
This patch changes:
This should reduce unnecessary recorder writes and avoid misleading
last_updatedchanges for old PoolLab measurements.Tested with:
Result: 4 passed.
Patch attached.
Please check and implement.
Thank you
poollab-fix-20260821.patch