ktnrg45 72ef9670e6 Add component media player.ps4 (#21074)
* Added PS4/ __init__.py

* Create en.json

* Create config_flow.py

* Create const.py

* Create media_player.py

* Create services.yaml

* Create strings.json

* Create __init__.py

* Add test_config_flow.py/ Finished adding PS4 files

* Rewrote for loop into short-hand

* bumped pyps4 to 0.2.8

* Pass in helper()

* Rewrite func

* Fixed test

* Added import in init

* bump to 0.2.9

* bump to 0.3.0

* Removed line

* lint

* Add ps4 to flows list

* Added pyps4-homeassistant with script

* Added pyps4

* Added pypys4 to test

* removed list def

* reformatted service call dicts

* removed config from device class

* typo

* removed line

* reformatted .. format

* redefined property

* reformat load games func

* Add __init__ and media_player.py to coveragerc

* Fix for test

* remove init

* remove blank line

* remove mock_coro

* Revert "remove init"

This reverts commit b68996aa34699bf38781e153acdd597579e8131f.

* Correct permissions

* fixes

* fixes
2019-02-17 15:41:55 -05:00

34 lines
974 B
Python

"""
Support for PlayStation 4 consoles.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/ps4/
"""
import logging
from homeassistant.components.ps4.config_flow import PlayStation4FlowHandler # noqa: pylint: disable=unused-import
from homeassistant.components.ps4.const import DOMAIN # noqa: pylint: disable=unused-import
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pyps4-homeassistant==0.3.0']
async def async_setup(hass, config):
"""Set up the PS4 Component."""
return True
async def async_setup_entry(hass, config_entry):
"""Set up PS4 from a config entry."""
hass.async_create_task(hass.config_entries.async_forward_entry_setup(
config_entry, 'media_player'))
return True
async def async_unload_entry(hass, entry):
"""Unload a PS4 config entry."""
await hass.config_entries.async_forward_entry_unload(
entry, 'media_player')
return True