zachcheatham / ha-omada

Home Assistant TP-Link Omada Integration
191 stars 26 forks source link

Add configurable scan intervals #100

Closed h3llrais3r closed 5 months ago

h3llrais3r commented 5 months ago

Make the scan_interval and scan_interval_details configurable. It will look like this: image

@zachcheatham: Min scan interval is now set to 30s. Or could we even limit it to a lower value, like 10s?

EDIT: I found this issue, related to the poll interval. https://github.com/zachcheatham/ha-omada/issues/52

Maybe I can change the request timeout to the scan_interval - 1 value? By doing this, we can configure lower scan intervals and don't have overlaps with the request timeout. Please suggest.

h3llrais3r commented 5 months ago

I've added a commit to change the minimum configurable scan intervals to 10s. The request timeout is now also calculated, based on the defined interval (keep it 1s less than the scan interval, to make sure there are no overlaps)

h3llrais3r commented 5 months ago

Let me know if this is ok, or any changes are required.