diff --git a/.gitmodules b/.gitmodules index ca0b1f024b8..174bba680f0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule "homeassistant/external/noop"] path = homeassistant/external/noop url = https://github.com/balloob/noop.git -[submodule "homeassistant/components/frontend/www_static/polymer/home-assistant-js"] - path = homeassistant/components/frontend/www_static/polymer/home-assistant-js - url = https://github.com/balloob/home-assistant-js.git [submodule "homeassistant/external/vera"] path = homeassistant/external/vera url = https://github.com/jamespcole/home-assistant-vera-api.git @@ -22,3 +19,6 @@ [submodule "homeassistant/external/pymysensors"] path = homeassistant/external/pymysensors url = https://github.com/theolind/pymysensors +[submodule "homeassistant/components/frontend/www_static/home-assistant-polymer"] + path = homeassistant/components/frontend/www_static/home-assistant-polymer + url = https://github.com/balloob/home-assistant-polymer.git diff --git a/homeassistant/__main__.py b/homeassistant/__main__.py index 6f937d6916e..2514b35587f 100644 --- a/homeassistant/__main__.py +++ b/homeassistant/__main__.py @@ -5,6 +5,7 @@ import sys import os import argparse import subprocess +import importlib DEPENDENCIES = ['requests>=2.0', 'pyyaml>=3.11', 'pytz>=2015.2'] IS_VIRTUAL = (getattr(sys, 'base_prefix', sys.prefix) != sys.prefix or @@ -20,6 +21,16 @@ def validate_python(): sys.exit() +def ensure_pip(): + """ Validate pip is installed so we can install packages on demand. """ + if importlib.find_loader('pip') is None: + print("Your Python installation did not bundle 'pip'") + print("Home Assistant requires 'pip' to be installed.") + print("Please install pip: " + "https://pip.pypa.io/en/latest/installing.html") + sys.exit() + + # Copy of homeassistant.util.package because we can't import yet def install_package(package): """Install a package on PyPi. Accepts pip compatible package strings. @@ -35,6 +46,8 @@ def install_package(package): def validate_dependencies(): """ Validate all dependencies that HA uses. """ + ensure_pip() + print("Validating dependencies...") import_fail = False @@ -123,6 +136,9 @@ def main(): validate_python() validate_dependencies() + # Windows needs this to pick up new modules + importlib.invalidate_caches() + bootstrap = ensure_path_and_load_bootstrap() validate_git_submodules() @@ -133,11 +149,10 @@ def main(): config_path = ensure_config_path(config_dir) if args.demo_mode: - from homeassistant.components import http, demo + from homeassistant.components import frontend, demo - # Demo mode only requires http and demo components. hass = bootstrap.from_config_dict({ - http.DOMAIN: {}, + frontend.DOMAIN: {}, demo.DOMAIN: {} }) else: diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 2892e278c5c..902b14e38b3 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -55,7 +55,7 @@ def _handle_get_root(handler, path_match, data): handler.end_headers() if handler.server.development: - app_url = "polymer/home-assistant.html" + app_url = "home-assistant-polymer/src/home-assistant.html" else: app_url = "frontend-{}.html".format(version.VERSION) diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 0c1938ae74d..4a67ed0fc0e 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "85f0078ea394a12dd95395799e345c83" +VERSION = "4f94fd4404583fbf27cc899c024d26ff" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 1c0506bd83c..023347483cb 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -1,5964 +1,6 @@ -
- - - - - - - - - - - - - - - - - - + @-webkit-keyframes ha-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } + } + @keyframes ha-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } + } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet. -
-- Please see the Getting Started section on how to setup your devices. -
-It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet.
Please see the Getting Started section on how to setup your devices.
- It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet. -
-- Please see the Getting Started section on how to setup your devices. -
-It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet.
Please see the Getting Started section on how to setup your devices.
- Call a service from a component. -
- -Call a service from a component.
- Fire an event on the event bus. -
- -Fire an event on the event bus.
[[stateObj.attributes.description]]
- -[[stateObj.attributes.errors]]
- -
-
-
-
[[stateObj.attributes.description]]
[[stateObj.attributes.errors]]