Skip to content

Conversation

@travisp
Copy link
Contributor

@travisp travisp commented Jun 2, 2025

This updates "async_check_cover_state_change" to also ignore when the New state is unknown, not just when the Old state is unknown.

Motivation and Context

I recently wrapped my shades/covers in a template to adjust the functionality of how they respond to commands (some of my shades get unfortunately "stuck" if they havent moved in a while). This worked well, and didn't cause issues with adaptive cover most of the time. However, when Home Assistant restarts or the templates are reloaded, they shades are briefly put in an unavailable state.

Adaptive Cover would read this as a state change and, in addition, report this as a manual action because the "None" position didn't equal the previous position. All of my shades would end up under manual control as a result.

  • fixes:

In addition to looking at the old state, also look at the new state, when deciding whether or not to process the state change.

I do not know if there are any unintended consequences of this. Maybe some people would want the shades to enter manual control if the shade is considered unavailable?

How has this been tested?

Mostly just tested locally.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking which updates existing code)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@travisp travisp marked this pull request as ready for review June 2, 2025 14:29
@travisp travisp closed this Jun 26, 2025
@travisp travisp deleted the fixes-unavailable-states branch June 26, 2025 12:29
@travisp travisp restored the fixes-unavailable-states branch June 26, 2025 12:29
@travisp travisp deleted the fixes-unavailable-states branch June 26, 2025 12:29
@travisp travisp restored the fixes-unavailable-states branch June 28, 2025 13:53
@travisp travisp reopened this Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant