Set parallel updates for roku (#132892)

* Set parallel updates for roku

* Update sensor.py

* Update media_player.py

* Update remote.py

* Update select.py

* Update media_player.py

* Update remote.py

* Update select.py

* Update remote.py

* Update media_player.py
This commit is contained in:
Chris Talkington 2024-12-12 01:00:24 -06:00 committed by GitHub
parent 2d0c4e4a59
commit 0d4780e91b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 1 deletions

View File

@ -18,6 +18,9 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import RokuConfigEntry
from .entity import RokuEntity
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class RokuBinarySensorEntityDescription(BinarySensorEntityDescription):

View File

@ -46,7 +46,6 @@ from .helpers import format_channel_name, roku_exception_handler
_LOGGER = logging.getLogger(__name__)
STREAM_FORMAT_TO_MEDIA_TYPE = {
"dash": MediaType.VIDEO,
"hls": MediaType.VIDEO,
@ -80,6 +79,8 @@ ATTRS_TO_PLAY_ON_ROKU_AUDIO_PARAMS = {
SEARCH_SCHEMA: VolDictType = {vol.Required(ATTR_KEYWORD): str}
PARALLEL_UPDATES = 1
async def async_setup_entry(
hass: HomeAssistant, entry: RokuConfigEntry, async_add_entities: AddEntitiesCallback

View File

@ -13,6 +13,8 @@ from . import RokuConfigEntry
from .entity import RokuEntity
from .helpers import roku_exception_handler
PARALLEL_UPDATES = 1
async def async_setup_entry(
hass: HomeAssistant,

View File

@ -16,6 +16,8 @@ from . import RokuConfigEntry
from .entity import RokuEntity
from .helpers import format_channel_name, roku_exception_handler
PARALLEL_UPDATES = 1
def _get_application_name(device: RokuDevice) -> str | None:
if device.app is None or device.app.name is None:

View File

@ -15,6 +15,9 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import RokuConfigEntry
from .entity import RokuEntity
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class RokuSensorEntityDescription(SensorEntityDescription):