From bc410288005729c48e4893a34078f68075992a17 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 4 Feb 2022 00:49:47 -0800 Subject: [PATCH] Some tweaks to the demo (#65623) Co-authored-by: Franck Nijhof --- homeassistant/components/demo/alarm_control_panel.py | 2 +- homeassistant/components/demo/media_player.py | 11 ++++++++--- tests/components/google_assistant/__init__.py | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/demo/alarm_control_panel.py b/homeassistant/components/demo/alarm_control_panel.py index 110753ac15f..b73e5444b22 100644 --- a/homeassistant/components/demo/alarm_control_panel.py +++ b/homeassistant/components/demo/alarm_control_panel.py @@ -33,7 +33,7 @@ async def async_setup_platform( [ ManualAlarm( hass, - "Alarm", + "Security", "1234", None, True, diff --git a/homeassistant/components/demo/media_player.py b/homeassistant/components/demo/media_player.py index 317babfe74c..661e218a1ad 100644 --- a/homeassistant/components/demo/media_player.py +++ b/homeassistant/components/demo/media_player.py @@ -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") diff --git a/tests/components/google_assistant/__init__.py b/tests/components/google_assistant/__init__.py index 2edd750a6e0..423bb1b55d7 100644 --- a/tests/components/google_assistant/__init__.py +++ b/tests/components/google_assistant/__init__.py @@ -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,