parent
0100f87ff2
commit
47e31dc9ee
143 changed files with 1584 additions and 1761 deletions
|
@ -3,8 +3,8 @@ import asyncio
|
|||
from functools import wraps
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
import async_timeout
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.http import (
|
||||
HomeAssistantView, RequestDataValidator)
|
||||
|
@ -17,7 +17,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
@asyncio.coroutine
|
||||
def async_setup(hass):
|
||||
"""Initialize the HTTP api."""
|
||||
"""Initialize the HTTP API."""
|
||||
hass.http.register_view(CloudLoginView)
|
||||
hass.http.register_view(CloudLogoutView)
|
||||
hass.http.register_view(CloudAccountView)
|
||||
|
@ -40,7 +40,7 @@ _CLOUD_ERRORS = {
|
|||
|
||||
|
||||
def _handle_cloud_errors(handler):
|
||||
"""Helper method to handle auth errors."""
|
||||
"""Handle auth errors."""
|
||||
@asyncio.coroutine
|
||||
@wraps(handler)
|
||||
def error_handler(view, request, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue