Remove update throttle in LG Netcast ()

This commit is contained in:
Artem Draft 2022-04-01 01:39:47 +03:00 committed by GitHub
parent 46a457a638
commit 2c49323b5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,12 @@
"""Support for LG TV running on NetCast 3 or 4.""" """Support for LG TV running on NetCast 3 or 4."""
from __future__ import annotations from __future__ import annotations
from datetime import datetime, timedelta from datetime import datetime
from pylgnetcast import LgNetCastClient, LgNetCastError from pylgnetcast import LgNetCastClient, LgNetCastError
from requests import RequestException from requests import RequestException
import voluptuous as vol import voluptuous as vol
from homeassistant import util
from homeassistant.components.media_player import ( from homeassistant.components.media_player import (
PLATFORM_SCHEMA, PLATFORM_SCHEMA,
MediaPlayerDeviceClass, MediaPlayerDeviceClass,
@ -47,9 +46,6 @@ DEFAULT_NAME = "LG TV Remote"
CONF_ON_ACTION = "turn_on_action" CONF_ON_ACTION = "turn_on_action"
MIN_TIME_BETWEEN_FORCED_SCANS = timedelta(seconds=1)
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
SUPPORT_LGTV = ( SUPPORT_LGTV = (
SUPPORT_PAUSE SUPPORT_PAUSE
| SUPPORT_VOLUME_STEP | SUPPORT_VOLUME_STEP
@ -122,7 +118,6 @@ class LgTVDevice(MediaPlayerEntity):
except (LgNetCastError, RequestException): except (LgNetCastError, RequestException):
self._state = STATE_OFF self._state = STATE_OFF
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
def update(self): def update(self):
"""Retrieve the latest data from the LG TV.""" """Retrieve the latest data from the LG TV."""