home-assistant/script/scaffold/templates/integration/__init__.py
Paulus Schoutsen 8502f7c7d4
Add integration scaffolding script (#26777)
* Add integration scaffolding script

* Make easier to develop

* Update py.test -> pytest
2019-09-20 17:02:18 -07:00

19 lines
500 B
Python

"""The NEW_NAME integration."""
from .const import DOMAIN
async def async_setup(hass, config):
"""Set up the NEW_NAME integration."""
hass.data[DOMAIN] = config.get(DOMAIN, {})
return True
async def async_setup_entry(hass, entry):
"""Set up a config entry for NEW_NAME."""
# TODO forward the entry for each platform that you want to set up.
# hass.async_create_task(
# hass.config_entries.async_forward_entry_setup(entry, "media_player")
# )
return True