diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 907033ae52c..e8af836422e 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -87,6 +87,8 @@ from urllib.parse import urlparse, parse_qs import homeassistant as ha import homeassistant.remote as rem import homeassistant.util as util +from homeassistant.components import (STATE_ON, STATE_OFF, + SERVICE_TURN_ON, SERVICE_TURN_OFF) HTTP_OK = 200 HTTP_CREATED = 201 @@ -122,7 +124,8 @@ def setup(hass, api_password, server_port=None, server_host=None): # If no local api set, set one with known information if isinstance(hass, rem.HomeAssistant) and hass.local_api is None: - hass.local_api = rem.API(util.get_local_ip(), api_password, server_port) + hass.local_api = \ + rem.API(util.get_local_ip(), api_password, server_port) class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): @@ -328,6 +331,10 @@ class RequestHandler(BaseHTTPRequestHandler): " href='/static/style.css'>" "" + "" + "" "" "
" "