You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve cover state restoration from the HA entity cache (#412)
* Refresh cover state after the default timeout after restoring from the HA cache
This adds a timeout for movement states restored from the entity cache.
Uses #410 as a base.
* Implement checks to ensure a movement state is not restored if the device has already reached the movement extrema
- Updates tests to use a common mock cover device creation function to reduce code repetition
* Remove `_is_completely_open` property and init `_state` with None
- We init `_state` with None and let the `_determine_cover_state` function populate the value from current positions
- Ensures all lines are coverable by tests
* Ensure cover state restore and transition timer handles are cancelled upon entity removal
* Add tests for on_remove timer cancellations
* Make use of clear_transition methods to cancel timers on removal
* Test cleanup
* Add annotations for async_update test
* Consolidate cover calls to `maybe_emit_state_changed_event` into `_determine_cover_position` function
* Ensure position attributes are still updated when the state doesn't change
0 commit comments