Update rokuecp to 0.13.1 (#65814)

This commit is contained in:
Chris Talkington 2022-02-05 22:17:31 -06:00 committed by GitHub
parent 2da4d280b2
commit 15e5f516d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 56 additions and 30 deletions

View file

@ -1,6 +1,8 @@
"""Support for the Roku remote."""
from __future__ import annotations
from typing import Any
from homeassistant.components.remote import ATTR_NUM_REPEATS, RemoteEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@ -42,19 +44,19 @@ class RokuRemote(RokuEntity, RemoteEntity):
return not self.coordinator.data.state.standby
@roku_exception_handler
async def async_turn_on(self, **kwargs) -> None:
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the device on."""
await self.coordinator.roku.remote("poweron")
await self.coordinator.async_request_refresh()
@roku_exception_handler
async def async_turn_off(self, **kwargs) -> None:
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the device off."""
await self.coordinator.roku.remote("poweroff")
await self.coordinator.async_request_refresh()
@roku_exception_handler
async def async_send_command(self, command: list, **kwargs) -> None:
async def async_send_command(self, command: list, **kwargs: Any) -> None:
"""Send a command to one device."""
num_repeats = kwargs[ATTR_NUM_REPEATS]