mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Some tweaks to the demo (#65623)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
777eba3bab
commit
bc41028800
@ -33,7 +33,7 @@ async def async_setup_platform(
|
|||||||
[
|
[
|
||||||
ManualAlarm(
|
ManualAlarm(
|
||||||
hass,
|
hass,
|
||||||
"Alarm",
|
"Security",
|
||||||
"1234",
|
"1234",
|
||||||
None,
|
None,
|
||||||
True,
|
True,
|
||||||
|
@ -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")
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user