-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor AlarmCoordinator
so that it's not a polling coordinator
#76
Comments
Check this strange thing: I restarted the integration and everything started working correctly again This is the log that repeats since it disconnected/reconnected |
Is your feature request related to a problem? Please describe.
AlarmCoordinator
introduced in #74 is a polling integration built on top of a long-polling API. The combination of both means that you poll every 5 seconds, then you are stuck for at most 15 seconds, to then poll again. This introduces unneeded latency as you don't need to wait for the next poll, but you can:Describe the solution you'd like
The long-polling triggers a signal to notify the integration that an update is needed, so we can simply poll and when there is a change, retrieve the data and publish it through
async_set_updated_data()
.We can still keep
AlarmDevice
in place, with no need of changing how entities get updated. That could be a further step.Describe alternatives you've considered
Keep everything as it is, even though it introduces 5 seconds latency if you wait for the next poll to happen.
Additional context
The polling mechanism must be configurable, as it's needed by some customers that don't want to keep the connection always opened with the cloud.
The text was updated successfully, but these errors were encountered: