Some tweaks to the demo (#65623)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Paulus Schoutsen 2022-02-04 00:49:47 -08:00 committed by GitHub
parent 777eba3bab
commit bc41028800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -33,7 +33,7 @@ async def async_setup_platform(
[ [
ManualAlarm( ManualAlarm(
hass, hass,
"Alarm", "Security",
"1234", "1234",
None, None,
True, True,

View File

@ -1,7 +1,10 @@
"""Demo implementation of the media player.""" """Demo implementation of the media player."""
from __future__ import annotations 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 ( from homeassistant.components.media_player.const import (
MEDIA_TYPE_MOVIE, MEDIA_TYPE_MOVIE,
MEDIA_TYPE_MUSIC, MEDIA_TYPE_MUSIC,
@ -68,8 +71,8 @@ async def async_setup_entry(
await async_setup_platform(hass, {}, async_add_entities) await async_setup_platform(hass, {}, async_add_entities)
SOUND_MODE_LIST = ["Dummy Music", "Dummy Movie"] SOUND_MODE_LIST = ["Music", "Movie"]
DEFAULT_SOUND_MODE = "Dummy Music" DEFAULT_SOUND_MODE = "Music"
YOUTUBE_PLAYER_SUPPORT = ( YOUTUBE_PLAYER_SUPPORT = (
SUPPORT_PAUSE SUPPORT_PAUSE
@ -449,6 +452,8 @@ class DemoTVShowPlayer(AbstractDemoPlayer):
# We only implement the methods that we support # We only implement the methods that we support
_attr_device_class = MediaPlayerDeviceClass.TV
def __init__(self): def __init__(self):
"""Initialize the demo device.""" """Initialize the demo device."""
super().__init__("Lounge room") super().__init__("Lounge room")

View File

@ -383,8 +383,8 @@ DEMO_DEVICES = [
"willReportState": False, "willReportState": False,
}, },
{ {
"id": "alarm_control_panel.alarm", "id": "alarm_control_panel.security",
"name": {"name": "Alarm"}, "name": {"name": "Security"},
"traits": ["action.devices.traits.ArmDisarm"], "traits": ["action.devices.traits.ArmDisarm"],
"type": "action.devices.types.SECURITYSYSTEM", "type": "action.devices.types.SECURITYSYSTEM",
"willReportState": False, "willReportState": False,