This change handles updates when a connection reset happens. In that case, the last_id is equal 1, meaning the Cloud API returns an empty state. With this change such updates are discarded and a full update is forced to reconcile the actual (cached) state, with the real one.
Testing:
Activate at least one sector
Disconnect the main unit
Wait the Integration to use a cached state (you should see errors in logs)
Reconnect the main unit
The integration must not change the alarm state (if the bug is present, it will go in "Disarmed" and then back to the actual state).
Extra Notes (optional):
n/a
Checklist
[x] Related issues and proposed changes are filled
[x] Tests are defining the correct and expected behavior
Related Issues
Proposed Changes:
This change handles updates when a connection reset happens. In that case, the
last_id
is equal 1, meaning the Cloud API returns an empty state. With this change such updates are discarded and a full update is forced to reconcile the actual (cached) state, with the real one.Testing:
Extra Notes (optional):
n/a
Checklist