Skip to content

Issue with Automations - dual actions results in failure #151039

@cruzzoe

Description

@cruzzoe

The problem

What I am trying to do:

  • Create an automation using UI
  • When Trigger happens, using Broadlink integration, I want to send turn on triggers via broadlink to my aircons

What I expect to happen:

  • Broadlink turns on the 2 aircons
  • I had this setup for 6months+ working fine

What actually happens:

  • Home Assistant errors
  • Error is: see bottom of issue
  • One aircon turned off but not the other

My workaround:

  • Create two automations. One for each aircon. This works.
  • This is not convenient as I used to have a UI button to action both with one press.
  • I dont know why it suddenly stopped working.
  • I've tried to delete all the commands and re-add but that doesnt help
  • I don't think this is a broadlink issue given that outside of automations this works fine
  • More detail on above bullet point: i.e if I take the exact same yaml and run it - But with just one action - it works! (obviously 2 automations are needed to replace the combined automation)

Extra info:

homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
homeassistant  |     raise exception
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
homeassistant  |     await getattr(self, handler)()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
homeassistant  |     response_data = await self._async_run_long_action(
homeassistant  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |     ...<9 lines>...
homeassistant  |     )
homeassistant  |     ^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
homeassistant  |     return await long_task
homeassistant  |            ^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
homeassistant  |     response_data = await coro
homeassistant  |                     ^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
homeassistant  |     return await target(service_call)
homeassistant  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 875, in entity_service_call
homeassistant  |     raise result from None
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1624, in async_request_call
homeassistant  |     return await coro
homeassistant  |            ^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 922, in _handle_entity_call
homeassistant  |     result = await task
homeassistant  |              ^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/androidtv_remote/remote.py", line 106, in async_send_command
homeassistant  |     self._send_key_command(single_command, "START_LONG")
homeassistant  |     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/androidtv_remote/entity.py", line 75, in _send_key_command
homeassistant  |     self._api.send_key_command(key_code, direction)
homeassistant  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.13/site-packages/androidtvremote2/androidtv_remote.py", line 409, in send_key_command
homeassistant  |     self._remote_message_protocol.send_key_command(key_code, direction)
homeassistant  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.13/site-packages/androidtvremote2/remote.py", line 121, in send_key_command
homeassistant  |     key_code = RemoteKeyCode.Value(key_code)
homeassistant  |   File "/usr/local/lib/python3.13/site-packages/google/protobuf/internal/enum_type_wrapper.py", line 61, in Value
homeassistant  |     raise ValueError('Enum {} has no value defined for name {!r}'.format(
homeassistant  |         self._enum_type.name, name))
homeassistant  | ValueError: Enum RemoteKeyCode has no value defined for name 'KEYCODE_off_right'

What version of Home Assistant Core has the issue?

core-2025.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

broadlink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/broadlink/

Diagnostics information

No response

Example YAML snippet

alias: AC lr off
description: ""
triggers:
  - trigger: time
    at: "23:00:00"
    weekday:
      - sun
      - sat
      - fri
      - thu
      - wed
      - tue
      - mon
    enabled: false
conditions: []
actions:
  - action: remote.send_command
    metadata: {}
    data:
      num_repeats: 1
      delay_secs: 0.4
      hold_secs: 58.6
      device: livingroom_aircon_mitsu_right
      command: off_right
    target:
      area_id: living_room
      device_id: b19e8666d62a37744296807ffcc7e280
  - action: remote.send_command
    metadata: {}
    data:
      num_repeats: 1
      delay_secs: 0.4
      hold_secs: 0
      device: livingroom_aircon_mitsu_left
      command: off_left
    target:
      area_id: living_room
      device_id: b19e8666d62a37744296807ffcc7e280
mode: single

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions