Skip to content

Commit

Permalink
Log command list in Bravia TV Remote (#77329)
Browse files Browse the repository at this point in the history
  • Loading branch information
Drafteed authored Aug 31, 2022
1 parent d037595 commit 0aae416
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion homeassistant/components/braviatv/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,14 @@ async def async_send_command(self, command: Iterable[str], repeats: int) -> None
"""Send command to device."""
for _ in range(repeats):
for cmd in command:
await self.client.send_command(cmd)
response = await self.client.send_command(cmd)
if not response:
commands = await self.client.get_command_list()
commands_keys = ", ".join(commands.keys())
# Logging an error instead of raising a ValueError
# https://github.com/home-assistant/core/pull/77329#discussion_r955768245
_LOGGER.error(
"Unsupported command: %s, list of available commands: %s",
cmd,
commands_keys,
)

0 comments on commit 0aae416

Please sign in to comment.