diff --git a/homeassistant/components/media_player/monoprice.py b/homeassistant/components/media_player/monoprice.py index b9a25367660..10b4b8414d8 100644 --- a/homeassistant/components/media_player/monoprice.py +++ b/homeassistant/components/media_player/monoprice.py @@ -137,6 +137,11 @@ class MonopriceZone(MediaPlayerDevice): """Return flag of media commands that are supported.""" return SUPPORT_MONOPRICE + @property + def media_title(self): + """Return the current source as medial title.""" + return self._source + @property def source(self): """"Return the current input source of the device.""" diff --git a/tests/components/media_player/test_monoprice.py b/tests/components/media_player/test_monoprice.py index 451b6b51feb..439b272fd4a 100644 --- a/tests/components/media_player/test_monoprice.py +++ b/tests/components/media_player/test_monoprice.py @@ -219,6 +219,12 @@ class TestMonopriceMediaPlayer(unittest.TestCase): self.media_player.update() self.assertEqual('one', self.media_player.source) + def test_media_title(self): + """Test media title property.""" + self.assertIsNone(self.media_player.media_title) + self.media_player.update() + self.assertEqual('one', self.media_player.media_title) + def test_source_list(self): """Test source list property.""" # Note, the list is sorted!