Skip to content

Always return lockState == LOCKED when handling Alexa.LockController#12328

Merged
balloob merged 1 commit intohome-assistant:devfrom
lucasweb78:alexa-lock-response
Feb 12, 2018
Merged

Always return lockState == LOCKED when handling Alexa.LockController#12328
balloob merged 1 commit intohome-assistant:devfrom
lucasweb78:alexa-lock-response

Conversation

@lucasweb78
Copy link
Copy Markdown
Contributor

@lucasweb78 lucasweb78 commented Feb 12, 2018

Description:

Alexa expects a lockState in the response, we don't know the actual lockState at this point but assume it is locked. This is fairly safe as this only returned on a lock directive and unless the lock failed the device should be locked. Either way it doesn't matter if the lockStateis reported correctly at this point because ReportState will return the correct value if the state is queried via voice or the Alexa App.

The alternative to this approach is to implement DeferredResponse

Checklist:

  • The code change is tested and works locally.

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

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@balloob balloob added this to the 0.63.1 milestone Feb 12, 2018
@balloob balloob merged commit 7059b6c into home-assistant:dev Feb 12, 2018
@balloob balloob mentioned this pull request Feb 12, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants