1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

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(
hass,
"Alarm",
"Security",
"1234",
None,
True,

View File

@ -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")

View File

@ -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,