From 7fcdb9b97586158e76ec408b0a31e3d1ea8dbfab Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Sun, 12 Jul 2015 18:44:38 -0400 Subject: [PATCH 01/12] Updating Debian daemon script for Python Virtual Environments Fix to init.d script that forces the correct virtual environment to be loaded. --- scripts/homeassistant.daemon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/homeassistant.daemon b/scripts/homeassistant.daemon index 4c504557dec..bef4cd90f4a 100755 --- a/scripts/homeassistant.daemon +++ b/scripts/homeassistant.daemon @@ -12,7 +12,7 @@ # Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh # # Installation: -# 1) Populate RUNAS and RUNDIR folders +# 1) Populate RUNAS and RUNDIR variables # 2) Create Log -- sudo touch /var/log/homeassistant.log # 3) Set Log Ownership -- sudo chown USER:GROUP /var/log/homeassistant.log # 4) Create PID File -- sudo touch /var/run/homeassistant.pid @@ -29,7 +29,7 @@ # If you are not, the SCRIPT variable must be modified to point to the correct # Python environment. -SCRIPT="./bin/python -m homeassistant" +SCRIPT="source bin/activate; ./bin/python -m homeassistant" RUNAS= RUNDIR= PIDFILE=/var/run/homeassistant.pid From c861622748b1a42ffa8b0bb40433d3bcc4e40a1d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Jul 2015 20:43:07 -0700 Subject: [PATCH 02/12] Extract frontend code into own repository --- .gitmodules | 6 +- homeassistant/components/frontend/__init__.py | 2 +- homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 21348 +--------------- .../www_static/home-assistant-polymer | 1 + .../frontend/www_static/polymer/bower.json | 46 - .../cards/state-card-configurator.html | 29 - .../polymer/cards/state-card-content.html | 50 - .../polymer/cards/state-card-display.html | 36 - .../cards/state-card-media_player.html | 91 - .../polymer/cards/state-card-scene.html | 39 - .../polymer/cards/state-card-thermostat.html | 57 - .../polymer/cards/state-card-toggle.html | 95 - .../www_static/polymer/cards/state-card.html | 55 - .../polymer/components/display-time.html | 25 - .../polymer/components/domain-icon.html | 37 - .../polymer/components/entity-list.html | 58 - .../polymer/components/events-list.html | 61 - .../polymer/components/ha-color-picker.html | 169 - .../polymer/components/ha-logbook.html | 39 - .../polymer/components/ha-sidebar.html | 247 - .../components/ha-voice-command-progress.html | 61 - .../polymer/components/loading-box.html | 27 - .../polymer/components/logbook-entry.html | 69 - .../components/relative-ha-datetime.html | 74 - .../polymer/components/services-list.html | 71 - .../polymer/components/state-badge.html | 105 - .../polymer/components/state-cards.html | 80 - .../components/state-history-chart-line.html | 198 - .../state-history-chart-timeline.html | 120 - .../components/state-history-charts.html | 158 - .../polymer/components/state-info.html | 75 - .../polymer/components/stream-status.html | 54 - .../polymer/dialogs/more-info-dialog.html | 151 - .../www_static/polymer/home-assistant-js | 1 - .../www_static/polymer/home-assistant.html | 78 - .../www_static/polymer/html-minifier.conf | 11 - .../polymer/layouts/home-assistant-main.html | 131 - .../polymer/layouts/login-form.html | 160 - .../polymer/layouts/partial-base.html | 48 - .../layouts/partial-dev-call-service.html | 101 - .../layouts/partial-dev-fire-event.html | 91 - .../layouts/partial-dev-set-state.html | 115 - .../polymer/layouts/partial-history.html | 116 - .../polymer/layouts/partial-logbook.html | 119 - .../polymer/layouts/partial-states.html | 185 - .../managers/notification-manager.html | 40 - .../polymer/managers/preferences-manager.html | 40 - .../polymer/more-infos/more-info-camera.html | 52 - .../more-infos/more-info-configurator.html | 125 - .../polymer/more-infos/more-info-content.html | 81 - .../polymer/more-infos/more-info-default.html | 49 - .../polymer/more-infos/more-info-group.html | 63 - .../polymer/more-infos/more-info-light.html | 111 - .../more-infos/more-info-media_player.html | 210 - .../polymer/more-infos/more-info-script.html | 26 - .../polymer/more-infos/more-info-sun.html | 71 - .../more-infos/more-info-thermostat.html | 129 - .../resources/home-assistant-icons.html | 91 - .../polymer/resources/home-assistant-js.html | 54 - .../resources/home-assistant-style.html | 46 - .../www_static/polymer/resources/lodash.html | 5 - .../polymer/resources/moment-js.html | 20 - .../polymer/resources/pikaday-js.html | 2 - .../resources/store-listener-behavior.html | 42 - .../components/frontend/www_static/version.py | 2 + scripts/build_frontend | 21 +- 67 files changed, 146 insertions(+), 26026 deletions(-) create mode 160000 homeassistant/components/frontend/www_static/home-assistant-polymer delete mode 100644 homeassistant/components/frontend/www_static/polymer/bower.json delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card-configurator.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card-content.html delete mode 100755 homeassistant/components/frontend/www_static/polymer/cards/state-card-display.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card-media_player.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card-scene.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card-thermostat.html delete mode 100755 homeassistant/components/frontend/www_static/polymer/cards/state-card-toggle.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/cards/state-card.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/display-time.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/domain-icon.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/entity-list.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/events-list.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/ha-color-picker.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/ha-voice-command-progress.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/loading-box.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/services-list.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/state-badge.html delete mode 100755 homeassistant/components/frontend/www_static/polymer/components/state-cards.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/state-history-chart-line.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/state-history-chart-timeline.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/state-history-charts.html delete mode 100755 homeassistant/components/frontend/www_static/polymer/components/state-info.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/components/stream-status.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html delete mode 160000 homeassistant/components/frontend/www_static/polymer/home-assistant-js delete mode 100644 homeassistant/components/frontend/www_static/polymer/home-assistant.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/html-minifier.conf delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/login-form.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-call-service.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-fire-event.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-set-state.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-history.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/managers/notification-manager.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/managers/preferences-manager.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-camera.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-configurator.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-default.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-group.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-light.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-media_player.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-script.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-sun.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-thermostat.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/lodash.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/moment-js.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/pikaday-js.html delete mode 100644 homeassistant/components/frontend/www_static/polymer/resources/store-listener-behavior.html create mode 100644 homeassistant/components/frontend/www_static/version.py 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/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..ca1befe0d97 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 = "2089a352a5f72b7d656e8d04f63f0342" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 1c0506bd83c..affea62d171 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); + } + } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer new file mode 160000 index 00000000000..8e143c2e446 --- /dev/null +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -0,0 +1 @@ +Subproject commit 8e143c2e4461771a51cdead553b7fa9e5bbdf772 diff --git a/homeassistant/components/frontend/www_static/polymer/bower.json b/homeassistant/components/frontend/www_static/polymer/bower.json deleted file mode 100644 index 093fed11a46..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/bower.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "Home Assistant", - "version": "0.1.0", - "authors": [ - "Paulus Schoutsen " - ], - "main": "splash-login.html", - "license": "MIT", - "private": true, - "ignore": [ - "bower_components" - ], - "devDependencies": { - "polymer": "Polymer/polymer#^1.0.0", - "webcomponentsjs": "Polymer/webcomponentsjs#^0.7", - "paper-header-panel": "PolymerElements/paper-header-panel#^1.0.0", - "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", - "paper-menu": "PolymerElements/paper-menu#^1.0.0", - "iron-input": "PolymerElements/iron-input#^1.0.0", - "iron-icons": "PolymerElements/iron-icons#^1.0.0", - "iron-image": "PolymerElements/iron-image#^1.0.0", - "paper-toast": "PolymerElements/paper-toast#^1.0.0", - "paper-dialog": "PolymerElements/paper-dialog#^1.0.0", - "paper-dialog-scrollable": "polymerelements/paper-dialog-scrollable#^1.0.0", - "paper-spinner": "PolymerElements/paper-spinner#^1.0.0", - "paper-button": "PolymerElements/paper-button#^1.0.0", - "paper-input": "PolymerElements/paper-input#^1.0.0", - "paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0", - "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", - "paper-item": "PolymerElements/paper-item#^1.0.0", - "paper-slider": "PolymerElements/paper-slider#^1.0.0", - "paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0", - "paper-drawer-panel": "PolymerElements/paper-drawer-panel#^1.0.0", - "paper-scroll-header-panel": "polymerelements/paper-scroll-header-panel#^1.0.0", - "google-apis": "GoogleWebComponents/google-apis#0.8-preview", - "moment": "^2.10.3", - "layout": "Polymer/layout", - "paper-styles": "polymerelements/paper-styles#^1.0.0", - "lodash": "~3.9.3", - "pikaday": "~1.3.2" - }, - "resolutions": { - "polymer": "^1.0.0", - "webcomponentsjs": "^0.7.0" - } -} diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-configurator.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-configurator.html deleted file mode 100644 index 6a25d41f945..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-configurator.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-content.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-content.html deleted file mode 100644 index e5b929b0804..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-content.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-display.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-display.html deleted file mode 100755 index a40979dcb66..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-display.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-media_player.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-media_player.html deleted file mode 100644 index ab26365c298..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-media_player.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-scene.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-scene.html deleted file mode 100644 index cf7cc9a0c08..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-scene.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-thermostat.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-thermostat.html deleted file mode 100644 index a86ad51f446..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-thermostat.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card-toggle.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card-toggle.html deleted file mode 100755 index 51bbcc6fb6e..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card-toggle.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card.html deleted file mode 100644 index 6a21706da74..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/display-time.html b/homeassistant/components/frontend/www_static/polymer/components/display-time.html deleted file mode 100644 index f6908c8a7ff..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/display-time.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html b/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html deleted file mode 100644 index d9fe55538d4..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/entity-list.html b/homeassistant/components/frontend/www_static/polymer/components/entity-list.html deleted file mode 100644 index 8312e0bff09..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/entity-list.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/events-list.html b/homeassistant/components/frontend/www_static/polymer/components/events-list.html deleted file mode 100644 index 5c37d32ecc9..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/events-list.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-color-picker.html b/homeassistant/components/frontend/www_static/polymer/components/ha-color-picker.html deleted file mode 100644 index 46ced3ddf64..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-color-picker.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html b/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html deleted file mode 100644 index a2f2fb00d9b..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html b/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html deleted file mode 100644 index 8746ee126c8..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-voice-command-progress.html b/homeassistant/components/frontend/www_static/polymer/components/ha-voice-command-progress.html deleted file mode 100644 index 44d29a0151c..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-voice-command-progress.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/loading-box.html b/homeassistant/components/frontend/www_static/polymer/components/loading-box.html deleted file mode 100644 index c78fd91122c..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/loading-box.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html b/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html deleted file mode 100644 index 3575d6b5d94..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html b/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html deleted file mode 100644 index 2017dd874f6..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/services-list.html b/homeassistant/components/frontend/www_static/polymer/components/services-list.html deleted file mode 100644 index 146703f1042..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/services-list.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-badge.html b/homeassistant/components/frontend/www_static/polymer/components/state-badge.html deleted file mode 100644 index 7b015b20786..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-badge.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-cards.html b/homeassistant/components/frontend/www_static/polymer/components/state-cards.html deleted file mode 100755 index 5eabf370e01..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-cards.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-line.html b/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-line.html deleted file mode 100644 index a45d6b3c3ec..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-line.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-timeline.html b/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-timeline.html deleted file mode 100644 index 6e45cd264ed..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-history-chart-timeline.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-history-charts.html b/homeassistant/components/frontend/www_static/polymer/components/state-history-charts.html deleted file mode 100644 index 17a93fcabc1..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-history-charts.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-info.html b/homeassistant/components/frontend/www_static/polymer/components/state-info.html deleted file mode 100755 index 50b10fa91a9..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/state-info.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/components/stream-status.html b/homeassistant/components/frontend/www_static/polymer/components/stream-status.html deleted file mode 100644 index 47118ed9f9a..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/components/stream-status.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html b/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html deleted file mode 100644 index 6a1ac77133d..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/home-assistant-js b/homeassistant/components/frontend/www_static/polymer/home-assistant-js deleted file mode 160000 index 94d8682c1e7..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/home-assistant-js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 94d8682c1e7679ae744e8419896d5d7b0bdd16cc diff --git a/homeassistant/components/frontend/www_static/polymer/home-assistant.html b/homeassistant/components/frontend/www_static/polymer/home-assistant.html deleted file mode 100644 index 8c4ed824cdd..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/home-assistant.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/html-minifier.conf b/homeassistant/components/frontend/www_static/polymer/html-minifier.conf deleted file mode 100644 index 2e6dbb9538b..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/html-minifier.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "removeComments": true, - "removeCommentsFromCDATA": true, - "removeCDATASectionsFromCDATA": true, - "collapseWhitespace": true, - "collapseBooleanAttributes": true, - "removeScriptTypeAttributes": true, - "removeStyleLinkTypeAttributes": true, - "minifyJS": true, - "minifyCSS": true -} diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html b/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html deleted file mode 100644 index a1e6fe9b2f5..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/login-form.html b/homeassistant/components/frontend/www_static/polymer/layouts/login-form.html deleted file mode 100644 index 43b1e97590c..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/login-form.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html deleted file mode 100644 index 3e1e5cc57fc..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-call-service.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-call-service.html deleted file mode 100644 index f3ae78d3953..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-call-service.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-fire-event.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-fire-event.html deleted file mode 100644 index 57cc3ef5da4..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-fire-event.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-set-state.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-set-state.html deleted file mode 100644 index 6771bbdb1ba..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-dev-set-state.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-history.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-history.html deleted file mode 100644 index 9abc0ad096c..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-history.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html deleted file mode 100644 index a6fc0f615d8..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html deleted file mode 100644 index ed40a218a89..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/managers/notification-manager.html b/homeassistant/components/frontend/www_static/polymer/managers/notification-manager.html deleted file mode 100644 index 0d38e087ebd..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/managers/notification-manager.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/managers/preferences-manager.html b/homeassistant/components/frontend/www_static/polymer/managers/preferences-manager.html deleted file mode 100644 index a70f8070d69..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/managers/preferences-manager.html +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-camera.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-camera.html deleted file mode 100644 index 92d5f1b509d..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-camera.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-configurator.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-configurator.html deleted file mode 100644 index 3309ff91cd9..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-configurator.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html deleted file mode 100644 index 1c5919e281c..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-default.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-default.html deleted file mode 100644 index a1b2cde666d..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-default.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-group.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-group.html deleted file mode 100644 index 29b0445de2b..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-group.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-light.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-light.html deleted file mode 100644 index 702eb5fd354..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-light.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-media_player.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-media_player.html deleted file mode 100644 index 1553ee5f1b1..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-media_player.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-script.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-script.html deleted file mode 100644 index bebe8753290..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-script.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-sun.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-sun.html deleted file mode 100644 index bc1f7211469..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-sun.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-thermostat.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-thermostat.html deleted file mode 100644 index 444935e2c83..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-thermostat.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html deleted file mode 100644 index 3ab36597214..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html deleted file mode 100644 index d63ab0333cf..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html deleted file mode 100644 index 473e3445d64..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/lodash.html b/homeassistant/components/frontend/www_static/polymer/resources/lodash.html deleted file mode 100644 index 54a43c19590..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/lodash.html +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/moment-js.html b/homeassistant/components/frontend/www_static/polymer/resources/moment-js.html deleted file mode 100644 index 30b71031163..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/moment-js.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/pikaday-js.html b/homeassistant/components/frontend/www_static/polymer/resources/pikaday-js.html deleted file mode 100644 index b8ca382dba0..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/pikaday-js.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/homeassistant/components/frontend/www_static/polymer/resources/store-listener-behavior.html b/homeassistant/components/frontend/www_static/polymer/resources/store-listener-behavior.html deleted file mode 100644 index 7ad23230a4e..00000000000 --- a/homeassistant/components/frontend/www_static/polymer/resources/store-listener-behavior.html +++ /dev/null @@ -1,42 +0,0 @@ - diff --git a/homeassistant/components/frontend/www_static/version.py b/homeassistant/components/frontend/www_static/version.py new file mode 100644 index 00000000000..0f9641f054b --- /dev/null +++ b/homeassistant/components/frontend/www_static/version.py @@ -0,0 +1,2 @@ +""" DO NOT MODIFY. Auto-generated by build_frontend script """ +VERSION = "" diff --git a/scripts/build_frontend b/scripts/build_frontend index 2bf80d28541..3b8349a295a 100755 --- a/scripts/build_frontend +++ b/scripts/build_frontend @@ -6,24 +6,15 @@ if [ ${PWD##*/} == "scripts" ]; then cd .. fi -scripts/build_js $1 +cd homeassistant/components/frontend/www_static/home-assistant-polymer +npm install +npm run frontend_prod -# To build the frontend, you need node, bower, vulcanize and html-minifier -# npm install -g bower vulcanize html-minifier - -# Install dependencies -cd homeassistant/components/frontend/www_static/polymer -bower install -cd .. -cp polymer/bower_components/webcomponentsjs/webcomponents-lite.min.js . - -vulcanize --inline-css --inline-scripts --strip-comments polymer/home-assistant.html > frontend.html - -# html-minifier crashes on frontend, minimize kills the CSS -# html-minifier --config-file polymer/html-minifier.conf -o frontend.html frontend.html +cp bower_components/webcomponentsjs/webcomponents-lite.min.js .. +cp build/frontend.html .. # Generate the MD5 hash of the new frontend -cd .. +cd ../.. echo '""" DO NOT MODIFY. Auto-generated by build_frontend script """' > version.py if [ $(command -v md5) ]; then echo 'VERSION = "'`md5 -q www_static/frontend.html`'"' >> version.py From 87961c1c53c72741e5a75784752bdc27177da93d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Jul 2015 21:08:25 -0700 Subject: [PATCH 03/12] Remove old dev scripts --- scripts/build_js | 17 ----------------- scripts/dev_js | 11 ----------- 2 files changed, 28 deletions(-) delete mode 100755 scripts/build_js delete mode 100755 scripts/dev_js diff --git a/scripts/build_js b/scripts/build_js deleted file mode 100755 index a75b48f9bf9..00000000000 --- a/scripts/build_js +++ /dev/null @@ -1,17 +0,0 @@ -# Builds the JS for production - -# If current pwd is scripts, go 1 up. -if [ ${PWD##*/} == "scripts" ]; then - cd .. -fi - -cd homeassistant/components/frontend/www_static/polymer/home-assistant-js - -npm install - -if [ "$1" = "demo" ]; then - echo "Building a demo mode build!" - npm run demo -else - npm run prod -fi diff --git a/scripts/dev_js b/scripts/dev_js deleted file mode 100755 index a62f0d85ef3..00000000000 --- a/scripts/dev_js +++ /dev/null @@ -1,11 +0,0 @@ -# Builds the JS for developing, rebuilds when files change - -# If current pwd is scripts, go 1 up. -if [ ${PWD##*/} == "scripts" ]; then - cd .. -fi - -cd homeassistant/components/frontend/www_static/polymer/home-assistant-js - -npm install -npm run dev From 0bf45653e3213757d8407a42b6baec90804956e9 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Jul 2015 21:08:39 -0700 Subject: [PATCH 04/12] Upgrade to new version frontend --- homeassistant/components/frontend/version.py | 2 +- .../components/frontend/www_static/frontend.html | 16 ++++++++-------- .../frontend/www_static/home-assistant-polymer | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index ca1befe0d97..e8c139330ce 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 = "2089a352a5f72b7d656e8d04f63f0342" +VERSION = "8716796b65ea358f91338b572d33f07f" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index affea62d171..22d52ebe532 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -4835,11 +4835,11 @@ paper-ripple { font-weight: 300; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; - } \ No newline at end of file + } \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index 8e143c2e446..813268fcf81 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 8e143c2e4461771a51cdead553b7fa9e5bbdf772 +Subproject commit 813268fcf8111685d908f23ee81dae3699450385 From d3a6190044a5f6a7276ef85ea8b9e2637d6fd50d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Jul 2015 22:58:35 -0700 Subject: [PATCH 05/12] Update frontend to latest version --- homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 44 +++++++++---------- .../www_static/home-assistant-polymer | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index e8c139330ce..b0b2af4a48a 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 = "8716796b65ea358f91338b572d33f07f" +VERSION = "85ce191d6484327ae20265d457c6c4e7" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 22d52ebe532..7436a5909fb 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -2321,7 +2321,7 @@ http://nicolasgallagher.com/micro-clearfix-hack/ border-bottom: none; cursor: help; } \ No newline at end of file + } \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index b97996be23d..df15796f189 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit b97996be23de374f0e47b42c0518c05f6250cf41 +Subproject commit df15796f189f8f4c495a6d86a083b396597a421e From 7dba1b5303f69a6857c00f86e029174b0e389a2d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 17 Jul 2015 23:42:10 -0700 Subject: [PATCH 10/12] Remove comment from build_frontend --- scripts/build_frontend | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build_frontend b/scripts/build_frontend index 3b8349a295a..9554e82256d 100755 --- a/scripts/build_frontend +++ b/scripts/build_frontend @@ -1,5 +1,4 @@ # Builds the frontend for production -# Call 'build_frontend demo' to build a demo frontend. # If current pwd is scripts, go 1 up. if [ ${PWD##*/} == "scripts" ]; then From a3906242e912b7116e836523b1edd3d5096085fc Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 19 Jul 2015 18:32:35 -0700 Subject: [PATCH 11/12] Make life of Windows users a bit better --- homeassistant/__main__.py | 9 ++++++--- homeassistant/components/frontend/version.py | 2 +- .../components/frontend/www_static/frontend.html | 16 ++++++++-------- .../frontend/www_static/home-assistant-polymer | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/homeassistant/__main__.py b/homeassistant/__main__.py index 6f937d6916e..658e64ad145 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 @@ -123,6 +124,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 +137,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/version.py b/homeassistant/components/frontend/version.py index c91c3ef9726..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 = "fcdb0ebfe95f973b1354ede21966454f" +VERSION = "4f94fd4404583fbf27cc899c024d26ff" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index b101972ce68..023347483cb 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -4857,11 +4857,11 @@ paper-ripple { font-weight: 300; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; - } \ No newline at end of file + } \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index df15796f189..576c04efb49 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit df15796f189f8f4c495a6d86a083b396597a421e +Subproject commit 576c04efb49a8a5f7f35734458ffc93f874dd68d From e277decd4c1c7589f079fb10db8d0851cbaed461 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 19 Jul 2015 19:00:48 -0700 Subject: [PATCH 12/12] Add a check to ensure pip is installed --- homeassistant/__main__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/homeassistant/__main__.py b/homeassistant/__main__.py index 658e64ad145..2514b35587f 100644 --- a/homeassistant/__main__.py +++ b/homeassistant/__main__.py @@ -21,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. @@ -36,6 +46,8 @@ def install_package(package): def validate_dependencies(): """ Validate all dependencies that HA uses. """ + ensure_pip() + print("Validating dependencies...") import_fail = False