Bump pdunehd library to version 1.3.1 (#36198)

This commit is contained in:
Maciej Bieniek 2020-05-28 12:27:15 +02:00 committed by GitHub
parent c18ba6aec0
commit 3d02b3afc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -2,6 +2,6 @@
"domain": "dunehd",
"name": "DuneHD",
"documentation": "https://www.home-assistant.io/integrations/dunehd",
"requirements": ["pdunehd==1.3"],
"requirements": ["pdunehd==1.3.1"],
"codeowners": []
}

View File

@ -78,11 +78,11 @@ class DuneHDPlayerEntity(MediaPlayerEntity):
state = STATE_OFF
if "playback_position" in self._state:
state = STATE_PLAYING
if self._state["player_state"] in ("playing", "buffering"):
if self._state.get("player_state") in ("playing", "buffering"):
state = STATE_PLAYING
if int(self._state.get("playback_speed", 1234)) == 0:
state = STATE_PAUSED
if self._state["player_state"] == "navigator":
if self._state.get("player_state") == "navigator":
state = STATE_ON
return state
@ -91,6 +91,11 @@ class DuneHDPlayerEntity(MediaPlayerEntity):
"""Return the name of the device."""
return self._name
@property
def available(self):
"""Return True if entity is available."""
return bool(self._state)
@property
def volume_level(self):
"""Return the volume level of the media player (0..1)."""
@ -153,7 +158,7 @@ class DuneHDPlayerEntity(MediaPlayerEntity):
return self._state.get("playback_url", "Not playing")
def __update_title(self):
if self._state["player_state"] == "bluray_playback":
if self._state.get("player_state") == "bluray_playback":
self._media_title = "Blu-Ray"
elif "playback_url" in self._state:
sources = self._sources

View File

@ -1043,7 +1043,7 @@ panasonic_viera==0.3.5
pcal9535a==0.7
# homeassistant.components.dunehd
pdunehd==1.3
pdunehd==1.3.1
# homeassistant.components.pencom
pencompy==0.0.3