diff --git a/homeassistant/components/lg_netcast/remote.py b/homeassistant/components/lg_netcast/remote.py index 1f22d7a09515..5ff51051ba9d 100644 --- a/homeassistant/components/lg_netcast/remote.py +++ b/homeassistant/components/lg_netcast/remote.py @@ -8,10 +8,9 @@ from pylgnetcast import LG_COMMAND, LgNetCastClient, LgNetCastError from requests import RequestException from homeassistant.components.remote import ( - ATTR_DELAY_SECS, - ATTR_NUM_REPEATS, DEFAULT_DELAY_SECS, RemoteEntity, + RemoteServiceArgument, ) from homeassistant.core import HomeAssistant from homeassistant.exceptions import ServiceValidationError @@ -60,8 +59,8 @@ class LgNetCastRemote(RemoteEntity): @override def send_command(self, command: Iterable[str], **kwargs: Any) -> None: """Send commands to the TV.""" - num_repeats = kwargs[ATTR_NUM_REPEATS] - delay_secs = kwargs.get(ATTR_DELAY_SECS, DEFAULT_DELAY_SECS) + num_repeats = kwargs[RemoteServiceArgument.NUM_REPEATS] + delay_secs = kwargs.get(RemoteServiceArgument.DELAY_SECS, DEFAULT_DELAY_SECS) commands: list[int] = [] for cmd in command: @@ -92,4 +91,4 @@ class LgNetCastRemote(RemoteEntity): @override def turn_off(self, **kwargs: Any) -> None: """Turn off the TV.""" - self.send_command(["POWER"], **{ATTR_NUM_REPEATS: 1}) + self.send_command(["POWER"], **{RemoteServiceArgument.NUM_REPEATS: 1})