Revert "Support learning different command types with remote" (#40486)
This reverts commit c6a48d3b61
.
This commit is contained in:
parent
c2d20c548f
commit
7c61caf68e
4 changed files with 0 additions and 11 deletions
|
@ -30,7 +30,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
ATTR_ACTIVITY = "activity"
|
ATTR_ACTIVITY = "activity"
|
||||||
ATTR_COMMAND = "command"
|
ATTR_COMMAND = "command"
|
||||||
ATTR_COMMAND_TYPE = "command_type"
|
|
||||||
ATTR_DEVICE = "device"
|
ATTR_DEVICE = "device"
|
||||||
ATTR_NUM_REPEATS = "num_repeats"
|
ATTR_NUM_REPEATS = "num_repeats"
|
||||||
ATTR_DELAY_SECS = "delay_secs"
|
ATTR_DELAY_SECS = "delay_secs"
|
||||||
|
@ -104,7 +103,6 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
|
||||||
{
|
{
|
||||||
vol.Optional(ATTR_DEVICE): cv.string,
|
vol.Optional(ATTR_DEVICE): cv.string,
|
||||||
vol.Optional(ATTR_COMMAND): vol.All(cv.ensure_list, [cv.string]),
|
vol.Optional(ATTR_COMMAND): vol.All(cv.ensure_list, [cv.string]),
|
||||||
vol.Optional(ATTR_COMMAND_TYPE): cv.string,
|
|
||||||
vol.Optional(ATTR_ALTERNATIVE): cv.boolean,
|
vol.Optional(ATTR_ALTERNATIVE): cv.boolean,
|
||||||
vol.Optional(ATTR_TIMEOUT): cv.positive_int,
|
vol.Optional(ATTR_TIMEOUT): cv.positive_int,
|
||||||
},
|
},
|
||||||
|
|
|
@ -58,9 +58,6 @@ learn_command:
|
||||||
command:
|
command:
|
||||||
description: A single command or a list of commands to learn.
|
description: A single command or a list of commands to learn.
|
||||||
example: "Turn on"
|
example: "Turn on"
|
||||||
command_type:
|
|
||||||
description: The type of command to be learned.
|
|
||||||
example: "rf"
|
|
||||||
alternative:
|
alternative:
|
||||||
description: If code must be stored as alternative (useful for discrete remotes).
|
description: If code must be stored as alternative (useful for discrete remotes).
|
||||||
example: "True"
|
example: "True"
|
||||||
|
|
|
@ -7,7 +7,6 @@ from homeassistant.components.remote import (
|
||||||
ATTR_ACTIVITY,
|
ATTR_ACTIVITY,
|
||||||
ATTR_ALTERNATIVE,
|
ATTR_ALTERNATIVE,
|
||||||
ATTR_COMMAND,
|
ATTR_COMMAND,
|
||||||
ATTR_COMMAND_TYPE,
|
|
||||||
ATTR_DELAY_SECS,
|
ATTR_DELAY_SECS,
|
||||||
ATTR_DEVICE,
|
ATTR_DEVICE,
|
||||||
ATTR_NUM_REPEATS,
|
ATTR_NUM_REPEATS,
|
||||||
|
@ -82,7 +81,6 @@ def learn_command(
|
||||||
device=None,
|
device=None,
|
||||||
command=None,
|
command=None,
|
||||||
alternative=None,
|
alternative=None,
|
||||||
command_type=None,
|
|
||||||
timeout=None,
|
timeout=None,
|
||||||
):
|
):
|
||||||
"""Learn a command from a device."""
|
"""Learn a command from a device."""
|
||||||
|
@ -96,9 +94,6 @@ def learn_command(
|
||||||
if command:
|
if command:
|
||||||
data[ATTR_COMMAND] = command
|
data[ATTR_COMMAND] = command
|
||||||
|
|
||||||
if command_type:
|
|
||||||
data[ATTR_COMMAND_TYPE] = command_type
|
|
||||||
|
|
||||||
if alternative:
|
if alternative:
|
||||||
data[ATTR_ALTERNATIVE] = alternative
|
data[ATTR_ALTERNATIVE] = alternative
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,6 @@ class TestRemote(unittest.TestCase):
|
||||||
entity_id="entity_id_val",
|
entity_id="entity_id_val",
|
||||||
device="test_device",
|
device="test_device",
|
||||||
command=["test_command"],
|
command=["test_command"],
|
||||||
command_type="rf",
|
|
||||||
alternative=True,
|
alternative=True,
|
||||||
timeout=20,
|
timeout=20,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue