Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Migrate webostv to new library and make integration async with callback state updates #29296

Merged
merged 17 commits into from Dec 31, 2019

Conversation

bendavid
Copy link
Contributor

@bendavid bendavid commented Dec 1, 2019

Description:

migrate webostv to new aiopylgtv version of the library and make the integration asynchronous with callback state updates

Breaking Change:

Since the connection handling has become non-trivial, it is now moved to init.py to be shared between the media_player and notify platforms, so the component setup now has to be done from the webostv domain instead of in media_player. The host configuration option is now required (as auto-discovery was anyways not functional) and the timeout and filename options have been removed as there is no real need to change the defaults.

Example entry for configuration.yaml (if applicable):

webostv:
    name: LG TV
    host: 192.168.1.53
    #other settings
    turn_on_action:
        service: wake_on_lan.send_magic_packet
        data:
          mac: "00:00:00:00:00:00"
    standby_connection: true

Corresponding documentation update in home-assistant/home-assistant.io#11584

for generic commands, input/button commands, and callback state updates
"""Request configuration steps from the user."""
host = conf.get(CONF_HOST)
name = conf.get(CONF_NAME)
configurator = hass.components.configurator
Copy link
Member

Choose a reason for hiding this comment

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

The configurator is deprecated. To keep this PR at a minimum it's ok to keep the configurator for now. Preferably a follow up PR would be done where it's replaced with a config flow.

homeassistant/components/webostv/notify.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/manifest.json Outdated Show resolved Hide resolved
homeassistant/components/webostv/manifest.json Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Dec 1, 2019
homeassistant/components/webostv/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
homeassistant/components/webostv/media_player.py Outdated Show resolved Hide resolved
tests/components/webostv/test_media_player.py Outdated Show resolved Hide resolved
@rcarmo
Copy link

rcarmo commented Dec 29, 2019

Hi there. Will this support audio output selection? I’ve been trying to find a solution for that.

@bendavid bendavid changed the title Migrate webostv to new library and add support for new features Migrate webostv to new library and make integration async with callback state updates Dec 31, 2019
bendavid added a commit to bendavid/home-assistant.io that referenced this pull request Dec 31, 2019
Update webostv documentation follwing changes in home-assistant/core#29296
bendavid added a commit to bendavid/home-assistant.io that referenced this pull request Dec 31, 2019
Update webostv documentation following changes in home-assistant/core#29296
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

This looks great!

Are we ready to merge?

Dev automation moved this from Review in progress to Reviewer approved Dec 31, 2019
@MartinHjelmare
Copy link
Member

Please update the breaking change paragraph to mention the removal of some of the config options and that host is required.

@bendavid
Copy link
Contributor Author

Indeed this should be ready to merge now.

@MartinHjelmare MartinHjelmare merged commit fc23b4f into home-assistant:dev Dec 31, 2019
Dev automation moved this from Reviewer approved to Done Dec 31, 2019
@lock lock bot locked and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants