Skip to content

Commit

Permalink
Revert "Add remote learn command to BraviaTV" (#77306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Drafteed authored Aug 25, 2022
1 parent 5d9e462 commit 8ddee30
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
14 changes: 0 additions & 14 deletions homeassistant/components/braviatv/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from pybravia import BraviaTV, BraviaTVError
from typing_extensions import Concatenate, ParamSpec

from homeassistant.components import persistent_notification
from homeassistant.components.media_player.const import (
MEDIA_TYPE_APP,
MEDIA_TYPE_CHANNEL,
Expand Down Expand Up @@ -257,16 +256,3 @@ async def async_send_command(self, command: Iterable[str], repeats: int) -> None
for _ in range(repeats):
for cmd in command:
await self.client.send_command(cmd)

@catch_braviatv_errors
async def async_learn_command(self, entity_id: str) -> None:
"""Display a list of available commands in a persistent notification."""
commands = await self.client.get_command_list()
codes = ", ".join(commands.keys())
title = "Bravia TV"
message = f"**List of available commands for `{entity_id}`**:\n\n{codes}"
persistent_notification.async_create(
self.hass,
title=title,
message=message,
)
4 changes: 0 additions & 4 deletions homeassistant/components/braviatv/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,3 @@ async def async_send_command(self, command: Iterable[str], **kwargs: Any) -> Non
"""Send a command to device."""
repeats = kwargs[ATTR_NUM_REPEATS]
await self.coordinator.async_send_command(command, repeats)

async def async_learn_command(self, **kwargs: Any) -> None:
"""Learn commands from the device."""
await self.coordinator.async_learn_command(self.entity_id)

0 comments on commit 8ddee30

Please sign in to comment.