diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py
index ac2fe252b47..776580a7d39 100644
--- a/homeassistant/components/frontend/__init__.py
+++ b/homeassistant/components/frontend/__init__.py
@@ -1,30 +1,13 @@
"""Handle the frontend for Home Assistant."""
-import re
import os
-import logging
from . import version, mdi_version
-from homeassistant.const import URL_ROOT
from homeassistant.components import api
from homeassistant.components.http import HomeAssistantView
DOMAIN = 'frontend'
DEPENDENCIES = ['api']
-INDEX_PATH = os.path.join(os.path.dirname(__file__), 'index.html.template')
-
-_LOGGER = logging.getLogger(__name__)
-
-FRONTEND_URLS = [
- URL_ROOT, '/logbook', '/history', '/map', '/devService', '/devState',
- '/devEvent', '/devInfo', '/devTemplate',
- re.compile(r'/states(/([a-zA-Z\._\-0-9/]+)|)'),
-]
-
-URL_API_BOOTSTRAP = "/api/bootstrap"
-
-_FINGERPRINT = re.compile(r'^(\w+)-[a-z0-9]{32}\.(\w+)$', re.IGNORECASE)
-
def setup(hass, config):
"""Setup serving the frontend."""
@@ -39,7 +22,8 @@ def setup(hass, config):
hass.wsgi.register_static_path(
"/service_worker.js",
- os.path.join(www_static_path, sw_path)
+ os.path.join(www_static_path, sw_path),
+ 0
)
hass.wsgi.register_static_path("/static", www_static_path)
hass.wsgi.register_static_path("/local", hass.config.path('www'))
@@ -50,7 +34,7 @@ def setup(hass, config):
class BootstrapView(HomeAssistantView):
"""View to bootstrap frontend with all needed data."""
- url = URL_API_BOOTSTRAP
+ url = "/api/bootstrap"
name = "api:bootstrap"
def get(self, request):
@@ -66,7 +50,7 @@ class BootstrapView(HomeAssistantView):
class IndexView(HomeAssistantView):
"""Serve the frontend."""
- url = URL_ROOT
+ url = '/'
name = "frontend:index"
requires_auth = False
extra_urls = ['/logbook', '/history', '/map', '/devService', '/devState',
@@ -92,11 +76,11 @@ class IndexView(HomeAssistantView):
else:
app_url = "frontend-{}.html".format(version.VERSION)
- # auto login if no password was set, else check api_password param
+ # auto login if no password was set
if self.hass.config.api.api_password is None:
auth = 'no_password_set'
else:
- auth = request.values.get('api_password', '')
+ auth = ''
template = self.templates.get_template('index.html')
diff --git a/homeassistant/components/frontend/index.html.template b/homeassistant/components/frontend/index.html.template
deleted file mode 100644
index cedebe1bbb4..00000000000
--- a/homeassistant/components/frontend/index.html.template
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Home Assistant
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
- Home Assistant had trouble
connecting to the server.
TRY AGAIN
-
-
-
-
-
diff --git a/homeassistant/components/frontend/templates/index.html b/homeassistant/components/frontend/templates/index.html
index e21d00e86bc..cedebe1bbb4 100644
--- a/homeassistant/components/frontend/templates/index.html
+++ b/homeassistant/components/frontend/templates/index.html
@@ -28,20 +28,55 @@
left: 0;
right: 0;
bottom: 0;
- margin-bottom: 123px;
+ margin-bottom: 97px;
+ font-family: Roboto, sans-serif;
+ font-size: 0pt;
+ transition: font-size 2s;
+ }
+
+ #ha-init-skeleton paper-spinner {
+ height: 28px;
+ }
+
+ #ha-init-skeleton a {
+ color: #03A9F4;
+ text-decoration: none;
+ font-weight: bold;
+ }
+
+ #ha-init-skeleton.error {
+ font-size: 16px;
+ }
+
+ #ha-init-skeleton.error img,
+ #ha-init-skeleton.error paper-spinner {
+ display: none;
}
-
+
+
-
+
+

+
+ Home Assistant had trouble
connecting to the server.
TRY AGAIN
+
[[_text]]

[[stateObj.entityDisplay]](Error loading image)
[[relativeTime]][[stateObj.entityDisplay]]

[[stateObj.stateDisplay]]
[[_charCounterStr]][[errorMessage]]
[[computePrimaryText(stateObj, isPlaying)]]
[[secondaryText]]
[[computeTargetTemperature(stateObj)]]
Currently: [[stateObj.attributes.current_temperature]] [[stateObj.attributes.unit_of_measurement]]
[[stateObj.entityDisplay]][[computeTitle(states, groupEntity)]]
To install Home Assistant, run:
pip3 install homeassistant
hass --open-ui
Here are some resources to get started.
To remove this card, edit your config in configuration.yaml
and disable the introduction
component. [[stateObj.entityDisplay]]
[[playerObj.primaryText]]
[[playerObj.secondaryText]]
[[locationName]][[item.entityDisplay]]
[[computeTime(dateObj)]]No logbook entries found.
[[_text]]

[[stateObj.entityDisplay]](Error loading image)
[[relativeTime]][[stateObj.entityDisplay]]

[[stateObj.stateDisplay]]
[[_charCounterStr]][[errorMessage]]
[[computePrimaryText(stateObj, isPlaying)]]
[[secondaryText]]
[[computeTargetTemperature(stateObj)]]
Currently: [[stateObj.attributes.current_temperature]] [[stateObj.attributes.unit_of_measurement]]
[[stateObj.entityDisplay]][[computeTitle(states, groupEntity)]]
To install Home Assistant, run:
pip3 install homeassistant
hass --open-ui
Here are some resources to get started.
To remove this card, edit your config in configuration.yaml
and disable the introduction
component. [[stateObj.entityDisplay]]
[[playerObj.primaryText]]
[[playerObj.secondaryText]]
[[locationName]][[item.entityDisplay]]
[[computeTime(dateObj)]]No logbook entries found.LogbookUpdating history data
No state history found.
History-![]()
[[value]]
[[errorMessage]]ServicesCall a service from a component.
[[description]]
EventsFire an event on the event bus.
StatesSet the representation of a device within Home Assistant.
This will not communicate with the actual device.
-![]()
[[value]]
[[errorMessage]]ServicesCall a service from a component.
[[description]]
EventsFire an event on the event bus.
StatesSet the representation of a device within Home Assistant.
This will not communicate with the actual device.
Template EditorTemplates are rendered using the Jinja2 template engine with some Home Assistant specific extensions.
AboutThe following errors have been logged this session:
[[errorLog]]
{{text}}
[[attribute]]
[[getAttributeValue(stateObj, attribute)]]
[[itemCaption(item)]]
[[itemValue(item)]]
Elevation
[[stateObj.attributes.elevation]]
Last Action
[[stateObj.attributes.last_action]]
]])
{{finalTranscript}} [[interimTranscript]] …