mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Use MediaPlayerDeviceClass for UniFi Protect media_player (#63708)
This commit is contained in:
parent
0232021f5c
commit
dec22aa510
@ -8,7 +8,7 @@ from pyunifiprotect.data import Camera
|
|||||||
from pyunifiprotect.exceptions import StreamError
|
from pyunifiprotect.exceptions import StreamError
|
||||||
|
|
||||||
from homeassistant.components.media_player import (
|
from homeassistant.components.media_player import (
|
||||||
DEVICE_CLASS_SPEAKER,
|
MediaPlayerDeviceClass,
|
||||||
MediaPlayerEntity,
|
MediaPlayerEntity,
|
||||||
MediaPlayerEntityDescription,
|
MediaPlayerEntityDescription,
|
||||||
)
|
)
|
||||||
@ -64,7 +64,7 @@ class ProtectMediaPlayer(ProtectDeviceEntity, MediaPlayerEntity):
|
|||||||
|
|
||||||
self.device: Camera = camera
|
self.device: Camera = camera
|
||||||
self.entity_description = MediaPlayerEntityDescription(
|
self.entity_description = MediaPlayerEntityDescription(
|
||||||
key="speaker", device_class=DEVICE_CLASS_SPEAKER
|
key="speaker", device_class=MediaPlayerDeviceClass.SPEAKER
|
||||||
)
|
)
|
||||||
super().__init__(data)
|
super().__init__(data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user