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
This commit is contained in:
1 parent
bb6300efe3
commit
19aee50bbc
16 files changed
+669
No files matched your search
@@ -0,0 +1,44 @@
|
||||
"""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
|
||||
Reference in new issue
Block a user