-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Alexa: Support vacuums without turn_on/turn_off feature #32570
Conversation
Hey there @home-assistant/cloud, @ochlocracy, mind taking a look at this pull request as its been labeled with a integration ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the Alexa Smart Home API doesn't yet have the necessary configuration settings to fully support vacuums like they could be. Doesn't even have a category... But based on recent blog posts, and Alexa app updates I've seen over the past few months I suspect that will be coming in the future.
Everything looks good. We just need a clear decision on how to address the SUPPORT_RETURN_HOME
and deciding when it's appropriate to change the service to SERVICE_RETURN_TO_BASE
. 👍
You're right, somehow I missed
Based on this I'd change the behavior as follows:
What do you think? |
@ochlocracy I changed the code accordingly, please have another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thorough tests too. 👍
Looks like the build error is from a test unrelated to this.
ab4257e
to
ed0cde2
Compare
Proposed change
Fix Alexa integration with vacuums that do not have support for
TURN_ON
orTURN_OFF
.#23171 introduced a
StateVacuumDevice
for MQTT vacuums. It is meant to deprecate the existingVacuumDevice
at some point in time. As per the documentation, the latter supportsTURN_ON
andTURN_OFF
services, while the former does only supportSTART
andRETURN_TO_BASE
services.Up until now, the Alexa integration would only work with (legacy) vacuums. This PR adds support for the newer state vacuums, i.e. it calls the
START
service when powering on, and theRETURN_TO_BASE
service when powering off.Additionally, this PR fixes the power state reported to Alexa for both types.
Tested successfully with a Roborock S502 running Valetudo 0.4.0 (with MQTT auto-configuration).
Type of change
Additional information
Checklist
black --fast homeassistant tests
)