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

Failed to call service remote.learn_command. Unknown error #116581

Closed
lvoaks opened this issue May 2, 2024 · 8 comments · Fixed by #116692
Closed

Failed to call service remote.learn_command. Unknown error #116581

lvoaks opened this issue May 2, 2024 · 8 comments · Fixed by #116692

Comments

@lvoaks
Copy link

lvoaks commented May 2, 2024

The problem

I have just integrated Broadlink RM4 Pro, Now I am trying to configure to use it and when I create a service to learn the rf codes I am getting an error: Failed to call service remote.learn_command. Unknown error

Seems as though there are many others having the same issue.

What version of Home Assistant Core has the issue?

2024.5.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Broadlink RM4 Pro

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@hxdx9527
Copy link

hxdx9527 commented May 2, 2024

Having the same issue

@home-assistant
Copy link

home-assistant bot commented May 2, 2024

Hey there @Danielhiversen, @felipediel, @L-I-Am, @eifinger, mind taking a look at this issue as it has been labeled with an integration (broadlink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of broadlink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign broadlink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


broadlink documentation
broadlink source
(message by IssueLinks)

@felipediel
Copy link
Contributor

I need something to work with. Go to "Configuration" -> "Logs" and see what you can find.

@hxdx9527
Copy link

hxdx9527 commented May 3, 2024

@felipediel hi felipediel, I got this debug log.

2024-05-03 15:15:40.077 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471894040128] Error handling message: Unknown error (unknown_error) dude from 192.168.3.205 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 793, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1731, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 503, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 533, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 298, in async_learn_command
code = await learn_command(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 376, in _async_learn_rf_command
found = await device.async_request(device.api.check_frequency)[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'coroutine' object is not subscriptable

@Xivi08
Copy link

Xivi08 commented May 3, 2024

Same is happening to me. Logs:

Registrador: homeassistant.helpers.script.websocket_api_script
Fuente: helpers/script.py:501
Ocurrió por primera vez: 12:14:37 (7 ocurrencias)
Último inicio de sesión: 12:41:15

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'coroutine' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 298, in async_learn_command
code = await learn_command(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 376, in _async_learn_rf_command
found = await device.async_request(device.api.check_frequency)[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'coroutine' object is not subscriptable

@felipediel
Copy link
Contributor

Oops, my bad. I've just submitted a fix. Thanks for reporting 👍

@Xivi08
Copy link

Xivi08 commented May 3, 2024

thanks @felipediel :) when will it be available?

@felipediel
Copy link
Contributor

Soon

@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants