From 0aae41642590eaa04d2bf68efdf48f2886f8c77d Mon Sep 17 00:00:00 2001 From: Artem Draft Date: Wed, 31 Aug 2022 16:58:07 +0300 Subject: [PATCH] Log command list in Bravia TV Remote (#77329) --- homeassistant/components/braviatv/coordinator.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/braviatv/coordinator.py b/homeassistant/components/braviatv/coordinator.py index b5d91263b34..2744911007d 100644 --- a/homeassistant/components/braviatv/coordinator.py +++ b/homeassistant/components/braviatv/coordinator.py @@ -255,4 +255,14 @@ class BraviaTVCoordinator(DataUpdateCoordinator[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, + )