mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Moved plexapi import into setup_platform().
Changed CONTRIBUTING.md to refer to requirements_all.txt instead of requirements.txt
This commit is contained in:
parent
16d75b2981
commit
03e7281406
@ -18,7 +18,7 @@ For help on building your component, please see the [developer documentation](ht
|
|||||||
After you finish adding support for your device:
|
After you finish adding support for your device:
|
||||||
|
|
||||||
- Update the supported devices in the `README.md` file.
|
- Update the supported devices in the `README.md` file.
|
||||||
- Add any new dependencies to `requirements.txt`.
|
- Add any new dependencies to `requirements_all.txt`. There is no ordering right now, so just add it to the end.
|
||||||
- Update the `.coveragerc` file.
|
- Update the `.coveragerc` file.
|
||||||
- Provide some documentation for [home-assistant.io](https://home-assistant.io/). The documentation is handled in a separate [git repository](https://github.com/balloob/home-assistant.io).
|
- Provide some documentation for [home-assistant.io](https://home-assistant.io/). The documentation is handled in a separate [git repository](https://github.com/balloob/home-assistant.io).
|
||||||
- Make sure all your code passes Pylint and flake8 (PEP8 and some more) validation. To generate reports, run `pylint homeassistant > pylint.txt` and `flake8 homeassistant --exclude bower_components,external > flake8.txt`.
|
- Make sure all your code passes Pylint and flake8 (PEP8 and some more) validation. To generate reports, run `pylint homeassistant > pylint.txt` and `flake8 homeassistant --exclude bower_components,external > flake8.txt`.
|
||||||
|
@ -36,7 +36,6 @@ from homeassistant.components.media_player import (
|
|||||||
SUPPORT_NEXT_TRACK, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO)
|
SUPPORT_NEXT_TRACK, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_IDLE, STATE_PLAYING, STATE_PAUSED, STATE_UNKNOWN)
|
STATE_IDLE, STATE_PLAYING, STATE_PAUSED, STATE_UNKNOWN)
|
||||||
from plexapi.myplex import MyPlexUser
|
|
||||||
|
|
||||||
REQUIREMENTS = ['https://github.com/miniconfig/python-plexapi/archive/'
|
REQUIREMENTS = ['https://github.com/miniconfig/python-plexapi/archive/'
|
||||||
'437e36dca3b7780dc0cb73941d662302c0cd2fa9.zip'
|
'437e36dca3b7780dc0cb73941d662302c0cd2fa9.zip'
|
||||||
@ -52,6 +51,7 @@ SUPPORT_PLEX = SUPPORT_PAUSE | SUPPORT_PREVIOUS_TRACK | SUPPORT_NEXT_TRACK
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Sets up the plex platform. """
|
""" Sets up the plex platform. """
|
||||||
|
from plexapi.myplex import MyPlexUser
|
||||||
name = config.get('name', '')
|
name = config.get('name', '')
|
||||||
user = config.get('user', '')
|
user = config.get('user', '')
|
||||||
password = config.get('password', '')
|
password = config.get('password', '')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user