mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in itach (#195808)
This commit is contained in:
@@ -9,9 +9,9 @@ import pyitachip2ir
|
||||
|
||||
from homeassistant.components import remote
|
||||
from homeassistant.components.remote import (
|
||||
ATTR_NUM_REPEATS,
|
||||
DEFAULT_NUM_REPEATS,
|
||||
PLATFORM_SCHEMA as REMOTE_PLATFORM_SCHEMA,
|
||||
RemoteServiceArgument,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICES,
|
||||
@@ -149,7 +149,7 @@ class ITachIP2IRRemote(remote.RemoteEntity):
|
||||
@override
|
||||
def send_command(self, command: Iterable[str], **kwargs: Any) -> None:
|
||||
"""Send a command to one device."""
|
||||
num_repeats = kwargs.get(ATTR_NUM_REPEATS, DEFAULT_NUM_REPEATS)
|
||||
num_repeats = kwargs.get(RemoteServiceArgument.NUM_REPEATS, DEFAULT_NUM_REPEATS)
|
||||
for single_command in command:
|
||||
self.itachip2ir.send(
|
||||
self.name, single_command, self._ir_count * num_repeats
|
||||
|
||||
Reference in New Issue
Block a user