parent
777eba3bab
commit
bc41028800
|
@ -33,7 +33,7 @@ async def async_setup_platform(
|
|||
[
|
||||
ManualAlarm(
|
||||
hass,
|
||||
"Alarm",
|
||||
"Security",
|
||||
"1234",
|
||||
None,
|
||||
True,
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
"""Demo implementation of the media player."""
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.media_player import MediaPlayerEntity
|
||||
from homeassistant.components.media_player import (
|
||||
MediaPlayerDeviceClass,
|
||||
MediaPlayerEntity,
|
||||
)
|
||||
from homeassistant.components.media_player.const import (
|
||||
MEDIA_TYPE_MOVIE,
|
||||
MEDIA_TYPE_MUSIC,
|
||||
|
@ -68,8 +71,8 @@ async def async_setup_entry(
|
|||
await async_setup_platform(hass, {}, async_add_entities)
|
||||
|
||||
|
||||
SOUND_MODE_LIST = ["Dummy Music", "Dummy Movie"]
|
||||
DEFAULT_SOUND_MODE = "Dummy Music"
|
||||
SOUND_MODE_LIST = ["Music", "Movie"]
|
||||
DEFAULT_SOUND_MODE = "Music"
|
||||
|
||||
YOUTUBE_PLAYER_SUPPORT = (
|
||||
SUPPORT_PAUSE
|
||||
|
@ -449,6 +452,8 @@ class DemoTVShowPlayer(AbstractDemoPlayer):
|
|||
|
||||
# We only implement the methods that we support
|
||||
|
||||
_attr_device_class = MediaPlayerDeviceClass.TV
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the demo device."""
|
||||
super().__init__("Lounge room")
|
||||
|
|
|
@ -383,8 +383,8 @@ DEMO_DEVICES = [
|
|||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
"id": "alarm_control_panel.alarm",
|
||||
"name": {"name": "Alarm"},
|
||||
"id": "alarm_control_panel.security",
|
||||
"name": {"name": "Security"},
|
||||
"traits": ["action.devices.traits.ArmDisarm"],
|
||||
"type": "action.devices.types.SECURITYSYSTEM",
|
||||
"willReportState": False,
|
||||
|
|
Loading…
Reference in New Issue