hass-core/homeassistant/components/ambiclimate/__init__.py
Daniel Høyer Iversen 19aee50bbc
Ambiclimate (#22827)
* Ambiclimate

* Ambiclimate

* style

* Add config flow to ambicliamte

* Add config flow to ambicliamte

* update requirements_all.txt

* ambiclimate

* tests

* typo

* ambiclimate

* coverage

* add manifest.json

* services

* codeowner

* req

* ambicliamte

* style

* ambicliamte

* add to requirements all tests

* add to requirements all tests

* .coveragerc

* Add tests

* add doc

* style

* fix test

* update tests

* update tests

* update tests

* update tests

* update tests

* tests

* tests

* fix comment
2019-05-01 22:05:40 +02:00

44 lines
1,014 B
Python

"""Support for Ambiclimate devices."""
import logging
import voluptuous as vol
from homeassistant.helpers import config_validation as cv
from . import config_flow
from .const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, DOMAIN
_LOGGER = logging.getLogger(__name__)
CONFIG_SCHEMA = vol.Schema(
{
DOMAIN:
vol.Schema({
vol.Required(CONF_CLIENT_ID): cv.string,
vol.Required(CONF_CLIENT_SECRET): cv.string,
})
},
extra=vol.ALLOW_EXTRA,
)
async def async_setup(hass, config):
"""Set up Ambiclimate components."""
if DOMAIN not in config:
return True
conf = config[DOMAIN]
config_flow.register_flow_implementation(
hass, conf[CONF_CLIENT_ID],
conf[CONF_CLIENT_SECRET])
return True
async def async_setup_entry(hass, entry):
"""Set up Ambiclimate from a config entry."""
hass.async_create_task(hass.config_entries.async_forward_entry_setup(
entry, 'climate'))
return True