mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use enum in roku (#62043)
This commit is contained in:
parent
7506b12277
commit
093202f138
@ -7,9 +7,8 @@ import logging
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.media_player import (
|
||||
DEVICE_CLASS_RECEIVER,
|
||||
DEVICE_CLASS_TV,
|
||||
BrowseMedia,
|
||||
MediaPlayerDeviceClass,
|
||||
MediaPlayerEntity,
|
||||
)
|
||||
from homeassistant.components.media_player.const import (
|
||||
@ -104,9 +103,9 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity):
|
||||
def device_class(self) -> str | None:
|
||||
"""Return the class of this device."""
|
||||
if self.coordinator.data.info.device_type == "tv":
|
||||
return DEVICE_CLASS_TV
|
||||
return MediaPlayerDeviceClass.TV
|
||||
|
||||
return DEVICE_CLASS_RECEIVER
|
||||
return MediaPlayerDeviceClass.RECEIVER
|
||||
|
||||
@property
|
||||
def state(self) -> str | None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user