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

Cover issue when adjusting range via Alexa #74

Closed
polmum opened this issue Jul 10, 2024 · 5 comments
Closed

Cover issue when adjusting range via Alexa #74

polmum opened this issue Jul 10, 2024 · 5 comments

Comments

@polmum
Copy link

polmum commented Jul 10, 2024

Hey!
First of all, thanks for creating this awesome integration.

I added covers to Home Assistant without an issue. I can see the entities, open/close them, set them to a position, etc.
What happened is that I added the Alexa integration and exposed the covers to it. The absolute commands, like opening and setting to a position work fine. But the adjustRange command is failing. This is a link to the link that is failing in the home assistant integration code. The log error is:

Received Alexa Smart Home request: {'directive': {'header': {'messageId': 'a5cd0033-234b-482a-968a-45d67a32f0e7', 'namespace': 'Alexa.RangeController', 'name': 'AdjustRangeValue', 'payloadVersion': '3', 'correlationToken': '**REDACTED**', 'instance': 'cover.position'}, 'endpoint': {'scope': {'type': 'BearerToken', 'token': '**REDACTED**'}, 'endpointId': 'cover#blackout', 'cookie': {}}, 'payload': {'rangeValueDelta': -10.0, 'rangeValueDeltaDefault': False}}}
Request Alexa.RangeController/AdjustRangeValue error INVALID_VALUE: Unable to determine cover.blackout current position

It appeas to be failing because it cannot determine the current position to adjust it correctly. Is it possible that that value is not being exposed in your integration code? Or could this be a home assistant issue?

Thanks!

@rstrouse
Copy link
Owner

I’ll have a look at the code for Alexa but what I don’t understand is why it does that ridiculous dance with the delta position. Aren’t you just trying to set it to a specified percentage. Of course the current position is reported but it could be yet another property of the cover entity that is undocumented.

@x3mpablom
Copy link

I understand that the delta position is sent when the command used with Alexa is something like "raise the cover by 10%" or "lower it a little". It would be easier if Amazon did the calculations themselves and just sent the target position, but that would not be the case.

@rstrouse
Copy link
Owner

It looks like the Alexa component does not use the property decorator for the current lift or tilt position. I will have something for you to try shortly.

@rstrouse
Copy link
Owner

Try the release I just released. While I do not use Alexa I traced through the code to find where the position data is coming from and made changes to set that value.

@polmum
Copy link
Author

polmum commented Jul 11, 2024

Hey!
I just tried it out and I got the same error in the logs.
Just FYI, I tried reporting the issue to home assistant, in case it was something on their side Apparently it was, and they already have a PR fixing it.

@polmum polmum closed this as completed Jul 20, 2024
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

No branches or pull requests

3 participants