diff --git a/homeassistant/components/onkyo/media_player.py b/homeassistant/components/onkyo/media_player.py index 5f81d47e38f9..5d4e542c1dc5 100644 --- a/homeassistant/components/onkyo/media_player.py +++ b/homeassistant/components/onkyo/media_player.py @@ -7,6 +7,7 @@ from typing import TYPE_CHECKING, Any, override from aioonkyo import Code, Kind, Status, Zone, command, query, status from homeassistant.components.media_player import ( + MediaPlayerDeviceClass, MediaPlayerEntity, MediaPlayerEntityFeature, MediaPlayerState, @@ -169,6 +170,7 @@ async def async_setup_entry( class OnkyoMediaPlayer(MediaPlayerEntity): """Onkyo Receiver Media Player (one per each zone).""" + _attr_device_class = MediaPlayerDeviceClass.RECEIVER _attr_should_poll = False _attr_has_entity_name = True diff --git a/tests/components/onkyo/snapshots/test_media_player.ambr b/tests/components/onkyo/snapshots/test_media_player.ambr index eddd93f66d42..6f989e8dd3f5 100644 --- a/tests/components/onkyo/snapshots/test_media_player.ambr +++ b/tests/components/onkyo/snapshots/test_media_player.ambr @@ -33,7 +33,7 @@ 'object_id_base': 'TX-NR7100', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, 'original_name': 'TX-NR7100', 'platform': 'onkyo', @@ -51,6 +51,7 @@ 'audio_information': dict({ 'auto_phase_control_phase': 'Normal', }), + : 'receiver', : 'TX-NR7100', : False, 'preset': 1, @@ -111,7 +112,7 @@ 'object_id_base': 'TX-NR7100 Zone 2', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, 'original_name': 'TX-NR7100 Zone 2', 'platform': 'onkyo', @@ -126,6 +127,7 @@ # name: test_entities[media_player.tx_nr7100_zone_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ + : 'receiver', : 'TX-NR7100 Zone 2', : 'Stereo', : list([ @@ -177,7 +179,7 @@ 'object_id_base': 'TX-NR7100 Zone 3', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, 'original_name': 'TX-NR7100 Zone 3', 'platform': 'onkyo', @@ -192,6 +194,7 @@ # name: test_entities[media_player.tx_nr7100_zone_3-state] StateSnapshot({ 'attributes': ReadOnlyDict({ + : 'receiver', : 'TX-NR7100 Zone 3', : list([ 'TV',