1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00

Revert "Add remote learn command to BraviaTV" (#77306)

This commit is contained in:
Artem Draft 2022-08-25 15:23:11 +03:00 committed by GitHub
parent 5d9e462118
commit 8ddee30787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 18 deletions

View File

@ -10,7 +10,6 @@ from typing import Any, Final, TypeVar
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,
@ -257,16 +256,3 @@ class BraviaTVCoordinator(DataUpdateCoordinator[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,
)

View File

@ -47,7 +47,3 @@ class BraviaTVRemote(BraviaTVEntity, RemoteEntity):
"""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)