Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate roku to new entity naming #74819

Merged
merged 14 commits into from
Jul 14, 2022
Prev Previous commit
Next Next commit
Update remote.py
  • Loading branch information
ctalkington committed Jul 14, 2022
commit 5de8e5715fc6c7bc62eaf49c211fd328d41f0740
17 changes: 10 additions & 7 deletions homeassistant/components/roku/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Load Roku remote based on a config entry."""
coordinator = hass.data[DOMAIN][entry.entry_id]
coordinator: RokuDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
unique_id = coordinator.data.info.serial_number
async_add_entities([
RokuRemote(
device_id=unique_id,
coordinator=coordinator,
)
], True)
async_add_entities(
[
RokuRemote(
device_id=unique_id,
coordinator=coordinator,
)
],
True,
)


class RokuRemote(RokuEntity, RemoteEntity):
Expand Down