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

Unexpected error with lock intent #1347

Closed
froman753 opened this issue May 4, 2023 · 5 comments · Fixed by home-assistant/core#93231
Closed

Unexpected error with lock intent #1347

froman753 opened this issue May 4, 2023 · 5 comments · Fixed by home-assistant/core#93231

Comments

@froman753
Copy link

I have a Schlage Z-wave lock that is exposed to the Cloud Assistant with the alias "front door", but attempting to lock or unlock the door ("unlock the front door") with the Assist gives me "An unexpected error occurred while handling the intent".

This is what the debugger gives me:

Engine homeassistant
Language en
Input unlock the front door
Response type error
Error code failed_to_handle
Raw

intent_output:  
  response:  
    speech:  
      plain:  
        speech: An unexpected error occurred while handling the intent  
        extra_data: null  
    card: {}  
    language: en  
    response_type: error  
    data:  
      code: failed_to_handle  
  conversation_id: null

Appreciate any help with anything I could be doing wrong.

@steffenrapp
Copy link
Contributor

steffenrapp commented May 17, 2023

Same here with a different lock in German. If an area is added then the response is correct (that the lock would have been opened or closed) but the lock won't open in that case, it doesn't do anything ... don't understand it.

@jparchem
Copy link

Also seeing this as well. This was part of the stack trace:

  File "/usr/src/homeassistant/homeassistant/components/conversation/default_agent.py", line 193, in async_process
    intent_response = await intent.async_handle(
  File "/usr/src/homeassistant/homeassistant/helpers/intent.py", line 96, in async_handle
    result = await handler.async_handle(intent)
  File "/usr/src/homeassistant/homeassistant/helpers/intent.py", line 417, in async_handle
    response = await self.async_handle_states(intent_obj, states, area)
  File "/usr/src/homeassistant/homeassistant/helpers/intent.py", line 466, in async_handle_states
    raise IntentHandleError(
homeassistant.helpers.intent.IntentHandleError: Failed to call turn_on for: ['lock.mydoor']

@tetele
Copy link
Contributor

tetele commented May 18, 2023

This is a bug in HA, but I don't have the rights to move it there. I've created a PR to fix it here home-assistant/core#93231

Thanks @jparchem for the error log!

@clearwave1
Copy link

I have the same issue with a Yale Z-wave lock. Looking forward to the fix as I was surprised this wasn't caught in the initial launch of Assist.

In English, we should support unlock/open and lock/close terminology.

@GNeras
Copy link

GNeras commented Aug 3, 2023

I have this problem too. I also want to point out the fact that locks have 3 services: lock.lock, lock.unlock and lock.open (this will unlock the lock if needed and unlatch), so we should be careful about which words should trigger each service.

synesthesiam pushed a commit to home-assistant/core that referenced this issue Nov 1, 2023
* Support HassTurnOn/Off intents for lock domain

Fix home-assistant/intents#1347

* Added tests

* Linting changes

* Linting
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 a pull request may close this issue.

6 participants