Skip to content
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

MQTT cover: send state even if position is available #3473

Merged
merged 1 commit into from May 16, 2022

Conversation

pyos
Copy link
Contributor

@pyos pyos commented May 14, 2022

What does this implement/fix?

Position can only be used to infer "open" or "closed", but state can also be "opening" and "closing" which cannot be guessed by Home Assistant.

Types of changes

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

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

Position can only be used to infer "open" or "closed", but state
can also be "opening" and "closing".
@nagyrobi
Copy link
Member

This should not be exclusive to MQTT. All cover types should benefit.

@pyos
Copy link
Contributor Author

pyos commented May 15, 2022

I don't use the native HA integration so I don't know how covers behave when using that. CoverStateResponse contains a current_operation field, so presumably it can be handled on HA side.

Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from what I read on the HA mqtt cover docs.

@jesserockz jesserockz merged commit 6dabf24 into esphome:dev May 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants