Return 0 instead of None (#23261)

pull/23262/head
Andrew Sayre 2019-04-19 18:56:34 -05:00 committed by Paulus Schoutsen
parent 1e0bc97f56
commit e2ed2ecdc0
1 changed files with 3 additions and 3 deletions

View File

@ -672,7 +672,7 @@ class PlexClient(MediaPlayerDevice):
def supported_features(self): def supported_features(self):
"""Flag media player features that are supported.""" """Flag media player features that are supported."""
if not self._is_player_active: if not self._is_player_active:
return None return 0
# force show all controls # force show all controls
if self.config.get(CONF_SHOW_ALL_CONTROLS): if self.config.get(CONF_SHOW_ALL_CONTROLS):
@ -683,7 +683,7 @@ class PlexClient(MediaPlayerDevice):
# only show controls when we know what device is connecting # only show controls when we know what device is connecting
if not self._make: if not self._make:
return None return 0
# no mute support # no mute support
if self.make.lower() == "shield android tv": if self.make.lower() == "shield android tv":
_LOGGER.debug( _LOGGER.debug(
@ -708,7 +708,7 @@ class PlexClient(MediaPlayerDevice):
SUPPORT_VOLUME_SET | SUPPORT_PLAY | SUPPORT_VOLUME_SET | SUPPORT_PLAY |
SUPPORT_TURN_OFF | SUPPORT_VOLUME_MUTE) SUPPORT_TURN_OFF | SUPPORT_VOLUME_MUTE)
return None return 0
def set_volume_level(self, volume): def set_volume_level(self, volume):
"""Set volume level, range 0..1.""" """Set volume level, range 0..1."""