FYI - this appears to have started working when I upgraded to core-2022.4.4
UPDATE as of today using version 2022.4.7 this is not working again.
Again I used the GUI in dev tools to learn the remote commands. here’s the extract from the broadlink codes file in \config.storage:
"bedroom_fan": {
"light_on_off": "JgByAiYPKQ4OKg0qDCsNKg4qDSooDw0qDSsMAAEIKQ4pDw0qDCsNKg4qDSoNKikODioMKwwAAQgoDygQDSoNKg0qDioNKg0qKBAMKwwrDQABBygQKQ4OKQ0qDioNKg4sCioOKgwrDSoOAAiAKA8qDg0qDCsNKg4qDSoMKxscDioNKg0AAQgnDykPDSoNKg4qDCsNKgwrDioNKg0qDQABBykPKA8MKw0qDioNKg0qDikOKgwrDSoNAAEHKBApDg0qDioNKg0qDikOKigPDSoNKg4ABZ0nDykODioNKg0qDikNKw0qKQ4OKQ0rDQABBykOKg4NKg0qDikOKg0qDSooDw4qDSoNAAEHKA8qDgwrDSoNKw0qDSoNKikPDCsNKgwAAQgpDykODCsNKg4qDCsNKg0qDhALDw0qDSoNAAUWKA8oDwwrDikOKg0qDSoNKikPDSoNKg0AAQcoECgPDikOKg0qDSoMKw4qKQ4NKg0rDQABBykOKA8OKQ4qDSoNKg4pDiooDw0qDikOAAEHKA8oDw4qDSoNKg0qDioNKikODSoOKg0AAQcoDygPDioNKg0qDikNKw0qKA8NKw0qDQABBygPKQ8MKw0qDikOKg0qDSooDw4qDSoNAAEHKBAoDwwrDSoOKg0qDSoNKikPDCsMKw0AAQcoECkODCsOKQ0rDSoNKg0qKQ8NKg0qDgABBygPKQ4OKQ0rDSoNKg0qDioNKg0qDygOAAEHKQ4oDw4pDioOKQ0qDSsNKikODikOKg0AAQcoDygPDioNKg0qDSoOKg0qDSoNKg4qDQABBygPKBAMKw0qDSoNKw0qDSopDg4qDSoNAA0F",
"fan_off": "JgAQBCcPKQ4NKw0qDSoNKg4qKA8OKQ0qDioNAAEHKA8qDg4pDSoMKw0rDikoDw8oDSsNKg0AAQcpDisNDikNKg0qDioNKigQDikNKg0qDAABCCgQKg0OKQ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oNKg4AAQcoDygPDygOKg4pDSoNKygPDSoNKg4qDQABBygPKA8NKw0qDSoNKg4qKA8PKA0qDioNAAEHKA8pDw4pDSoNKg4qDSooDw8oDioNKg0AAQcpDyoNDikNKg4qDSoOKQ0qDioNKg4pDAABCCgQKg0OKQ0qDioNKg0qDSoOKg0qDSoNAA0F",
"fan_low": "JgCwBA4qKA8OKQ4qDSoNKigPK+opDikODikOKg0qKQ4OKQ4qDSoPKScQKesoDykODioNKg0qKg0OKg0qDSoNKigQKesoDyoODSoNKg0qKBANKg0qDSoNKygPKesoDyoODSoNKg0qKQ8NKgwrDioNKigPKesoECkODikNKg4qKQ4PKA0qDioNKigPKusoDykODikOKg0qKA8PKA4qDCsNKigPKuspDikODikOKg0qKQ4OKgwrDSoNKikPKespDikODioNKg0qKA8OKg0qDSoOKSkPKesoDyoODSoNKg0qKBANKg0oDyoNKykOKespDykODSoMKw4qKA8NKg0qDioNKigPKesoECkODikNKg4qKA8OKQ0rDCsNKigPKusoDykODikOKg0qKA8OKQ4qDSoNKioOKespDikODioNKg0qKA8OKg0qDikNKikPKesoDyoODSoOKQ0qKBANKg0qDSoNKygPKespDioODSoNKg0qKQ8NKgwrDikOKigPKespDyoNDikNKg0rKA8PKA0qDSsNKikOKewoDykODygOKg0qKA8OKQ4qDCsNKikOKuspDikODikOKg0qKA8OKgwrDSoNKigQKesoDykODioNKgwrKQ4OKgwrDSoNKygPKesoDyoODSoNKg0qKBANKg0qDikOKigPKesqDikODSoOKQ4qKA8OKQwrDioNKigPKespDyoNDikNKg0rKA8OKQ4qDSoNKikOKusoDykODikOKg0qKQ4OKQ4qDSoNKikPKesoDykODioNKg0qKBANKgwrDSoOKCkQKewoDisNDSoNKg4pKBANKgwrDSoNKygPKesoDyoODSoNKg4qJxANKg0qDioNKigPKesoECkODikNKg4qKA8OKQ0qDioNKikOKuopDykODioNKg0qKA8OKQ4qDSoNKikOKusoDykODikOKg4pKQ4OKgwrDCsNKigQKespDikODioNKg0qKQ4OKg0qDSoNKygPKesoDyoODSoNKg0qKBANKg0qDSoOKikOKewnECkODSoMKw4qKQ4NKg4pDioNKigPKesoECkODikNKg4qKQ4OKQ4qDSoNKigPKuspDikODikOKgwrKA8OKQ4qDCsNKikPKesoDykODioMKw0qKQ4OKg0qDSoNKikPK+ooDikPDSoNKg0qKBANKgwrDSoOKigPKesoDyoODSoNKg4qKQ4NKg0qDikOKigPKespDykODikNKg4qKA8OKQ0qDioMKygPKuopDykODikOKg0qKQ4OKQ4qDSoNKigPKuspDikODioNKg0qKA8OKQ0pDisNKikPKesoDykODioNKg0qKQ8NKg0qDygNKykOKespDioODSoNKg0qKBANKg0qDSoOKikOKespDykODSoNKg4qKA8NKg0qDioNKycPKespDykODikNKwwrKA8OKQ0rDSoNKigPKusoDykODikOKg0qKA8PKA0rDSoNKikPKesoDyoNDykNKg0qDSoOKg0qDSoNKg4qDQABBykOKg4NKg0qDCwNKg0qDSoNKg4qDSoNAAEHKA8qDg0qDSoNKg4qDSoNKg4qDCsNKg0AAQcpDykODSoMKw4qDSoNKg0qDioNKg0qDQANBQ==",
"fan_med": "JgBAAyYQKg0PKA0qDioMKw0qDioNKigPDygOAAEHKA8qDQ4pDioMKw0qDSoOKg0qKQ4OKQ0AAQgpDikODykNKg0qDSoOKg0qDSopDg4qDQABBykOKQ8NKg0qDSoOKg0qDSoNKigQDSoNAAEHKA8qDg0qDSoOKQ4qDikNKg4pKBANKg0AAQcoECkODSoNKg4qDSoNKg4pDiooDw4pDQABByoOKQ4PKA4qDSoNKg0qDioNKikODikOAAEHKA8pDg4pDioNKg0qDikNKw0qKA8OKg0AAQcpDikODykOKQ0qDikOKg0qDSooDw4qDAABCCgPKg4NKg0qDSoOKg0qDikNKikPDSoNAAEIJxApDg4pDSoOKgwrDSoNKg4qKQ4NKgwAAQgoECkODikNKg4qDSoNKg0rDSopDg4pDgABBykOKQ4OKQ4qDSoNKg0qDSsNKigPDikOAAEHKA8pDg4qDSoNKg0qDioNKgwrKQ4OKg4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DSoNKg4AAQcoDykODikOKg0qDSooDw4qDCsNKg0qDgABBygPKQ4OKg0qDikNKikPDSoNKg0qDioNAAEHKA8pDw0qDSoNKg0rKA8NKgwrDioNKg0AAQcoECkODSoNKg0rDSooDw4pDSsNKg0qDQABBykPKQ4OKQ4qDSoNKigPDioNKg0qDSoOAAEHKQ4pDg4pDioNKg0qKBANKg0qDSoOKg0AAQcpDikODioNKg0qDikoEA0qDSoNKw0qDgABBigPKg4NKg0qDSoOKikODikOKQ4qDSoNAAEHKQ8pDg4pDSoOKg0qKA8OKQ4qDSoNKg0AAQgoDykODikNKw0qDSopDg4qDSoNKg4pDgABBygPKQ4OKg0qDSoNKikPDSoNKg0qDioNAAEHKA8qDg0qDSoNKg4qKQ4OKQ0qDioMKw0AAQcpDykODSoMKw4qDSoNKg0qDioNKg0qDQABBykPKQ4OKQ4qDSoNKg0qDioNKgwrDSoOAAEHKA8pDg0qDioNKg0qDioNKg0qDSoOKg0ADQU="
}
here’s the yaml from the GUI for the send:
service: remote.send_command
data:
device: bedroom_fan
command: fan_off
target:
device_id: 63bc669215d62d9429b04931ad018b08
and here’s the 3 errors that subsequently appear in the log:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/broadlink/remote.py:146
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 14:41:07 (1 occurrences)
Last logged: 14:41:07
[139882374931120] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 144, in _extract_codes
codes = self._codes[device][cmd]
KeyError: 'bedroom_fan'
The above exception was the direct cause of the following exception:
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 630, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1275, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 221, in async_send_command
code_list = self._extract_codes(commands, subdevice)
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 146, in _extract_codes
raise ValueError(f"Command not found: {repr(cmd)}") from err
ValueError: Command not found: 'fan_off'
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/broadlink/remote.py:146
First occurred: 14:41:07 (1 occurrences)
Last logged: 14:41:07
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Command not found: 'fan_off'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 144, in _extract_codes
codes = self._codes[device][cmd]
KeyError: 'bedroom_fan'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 221, in async_send_command
code_list = self._extract_codes(commands, subdevice)
File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 146, in _extract_codes
raise ValueError(f"Command not found: {repr(cmd)}") from err
ValueError: Command not found: 'fan_off'
Logger: homeassistant.components.broadlink.remote
Source: components/broadlink/remote.py:223
Integration: Broadlink (documentation, issues)
First occurred: 14:41:07 (1 occurrences)
Last logged: 14:41:07
Failed to call remote.send_command: Command not found: 'fan_off'
Any help appreciated