mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fixed metadata issue (#7932)
This commit is contained in:
parent
c52b18d7c8
commit
e4d100d54d
@ -14,7 +14,7 @@ from homeassistant.components.media_player import (
|
|||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF)
|
STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF)
|
||||||
|
|
||||||
REQUIREMENTS = ['openhomedevice==0.4.0']
|
REQUIREMENTS = ['openhomedevice==0.4.2']
|
||||||
|
|
||||||
SUPPORT_OPENHOME = SUPPORT_SELECT_SOURCE | \
|
SUPPORT_OPENHOME = SUPPORT_SELECT_SOURCE | \
|
||||||
SUPPORT_VOLUME_STEP | SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_SET | \
|
SUPPORT_VOLUME_STEP | SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_SET | \
|
||||||
@ -60,7 +60,6 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||||||
self._track_information = {}
|
self._track_information = {}
|
||||||
self._in_standby = None
|
self._in_standby = None
|
||||||
self._transport_state = None
|
self._transport_state = None
|
||||||
self._track_information = None
|
|
||||||
self._volume_level = None
|
self._volume_level = None
|
||||||
self._volume_muted = None
|
self._volume_muted = None
|
||||||
self._supported_features = SUPPORT_OPENHOME
|
self._supported_features = SUPPORT_OPENHOME
|
||||||
@ -173,27 +172,29 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||||||
@property
|
@property
|
||||||
def media_image_url(self):
|
def media_image_url(self):
|
||||||
"""Image url of current playing media."""
|
"""Image url of current playing media."""
|
||||||
return self._track_information["albumArtwork"]
|
return self._track_information.get('albumArtwork')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_artist(self):
|
def media_artist(self):
|
||||||
"""Artist of current playing media, music track only."""
|
"""Artist of current playing media, music track only."""
|
||||||
return self._track_information["artist"][0]
|
artists = self._track_information.get('artist')
|
||||||
|
if artists:
|
||||||
|
return artists[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_album_name(self):
|
def media_album_name(self):
|
||||||
"""Album name of current playing media, music track only."""
|
"""Album name of current playing media, music track only."""
|
||||||
return self._track_information["albumTitle"]
|
return self._track_information.get('albumTitle')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_title(self):
|
def media_title(self):
|
||||||
"""Title of current playing media."""
|
"""Title of current playing media."""
|
||||||
return self._track_information["title"]
|
return self._track_information.get('title')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def source(self):
|
def source(self):
|
||||||
"""Name of the current input source."""
|
"""Name of the current input source."""
|
||||||
return self._source["name"]
|
return self._source.get('name')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def volume_level(self):
|
def volume_level(self):
|
||||||
|
@ -403,7 +403,7 @@ onkyo-eiscp==1.1
|
|||||||
openevsewifi==0.4
|
openevsewifi==0.4
|
||||||
|
|
||||||
# homeassistant.components.media_player.openhome
|
# homeassistant.components.media_player.openhome
|
||||||
openhomedevice==0.4.0
|
openhomedevice==0.4.2
|
||||||
|
|
||||||
# homeassistant.components.switch.orvibo
|
# homeassistant.components.switch.orvibo
|
||||||
orvibo==1.1.1
|
orvibo==1.1.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user