From 232309c6c7b4d6b48412c98173c2ca0db5f8db95 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 2 Dec 2026 14:19:19 +0100 Subject: [PATCH] Use the action field enums in lg_netcast (#195939) --- homeassistant/components/lg_netcast/remote.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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})