diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py
index a730edd8c01c9adb7f7c68e526e6f65d22e28a8f..29471853c5bd690a66aa3d7c7eb24e9cd794277e 100644
--- a/homeassistant/components/http/__init__.py
+++ b/homeassistant/components/http/__init__.py
@@ -415,10 +415,10 @@ class RequestHandler(SimpleHTTPRequestHandler):
 
             status_code = HTTP_CREATED if is_new_state else HTTP_OK
 
-            self._write_json(state.as_dict(),
-                             status_code=status_code,
-                             location=
-                             rem.URL_API_STATES_ENTITY.format(entity_id))
+            self._write_json(
+                state.as_dict(),
+                status_code=status_code,
+                location=rem.URL_API_STATES_ENTITY.format(entity_id))
         else:
             self._message(
                 "State of {} changed to {}".format(entity_id, new_state))