Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added HDMI Source Selection #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gohlas
Copy link

@gohlas gohlas commented Oct 12, 2020

There are many changes here, mainly because some of the updates you made were not working for me, mainly the registration process, then I rolled back few versions (the one was working fine for me) then added the HDMI selection.

Mainly the last part is related to the HMDI source, as you know, just hardcoded the sources. Just take what you think is good.

Added HDMI Source Selection
elif source == "Hdmi 2":
self.sonydevice.input_hdmi2()
else:
return ""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is not a multiple of four

def volume_up(self):
"""Send stop command."""
self.sonydevice.volume_up()

def volume_down(self):
"""Send stop command."""
self.sonydevice.volume_down()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def mute_volume(self, mute):
"""Send stop command."""
self.sonydevice.mute()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

@@ -293,15 +297,30 @@ def media_previous_track(self):
def media_stop(self):
"""Send stop command."""
self.sonydevice.stop()


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

self.sonydevice = sony_device
self._state = STATE_OFF
self._muted = False
self._id = None
self._playing = False
_LOGGER.error(sony_device.pin)
_LOGGER.error(sony_device.client_id)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

SUPPORT_PLAY | SUPPORT_PLAY_MEDIA | SUPPORT_STOP | \
SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_STEP
SUPPORT_SONY = (SUPPORT_PAUSE
| SUPPORT_PREVIOUS_TRACK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line over-indented for visual indent

SUPPORT_TURN_ON | SUPPORT_TURN_OFF | \
SUPPORT_PLAY | SUPPORT_PLAY_MEDIA | SUPPORT_STOP | \
SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_STEP
SUPPORT_SONY = (SUPPORT_PAUSE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

SUPPORT_SELECT_SOURCE,
SUPPORT_VOLUME_MUTE,
SUPPORT_VOLUME_STEP)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
SUPPORT_PREVIOUS_TRACK,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

import voluptuous as vol

from homeassistant.components.media_player import (
MediaPlayerEntity, PLATFORM_SCHEMA)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

@alexmohr
Copy link
Owner

With your changes a direct merge won't be possible, but I'll take what I need to implement the feature set.
I'll keep this PR open until the features are implemented and merged to master.
Thank you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants