From 66b80a047aec6c88d06c6525ac78f7c5390eb19f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 17 Apr 2018 23:42:03 -0400 Subject: [PATCH 01/14] Allow generating iconset for HASS icons --- gulp/tasks/hass-icons.js | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gulp/tasks/hass-icons.js diff --git a/gulp/tasks/hass-icons.js b/gulp/tasks/hass-icons.js new file mode 100644 index 000000000000..2204dc05fa27 --- /dev/null +++ b/gulp/tasks/hass-icons.js @@ -0,0 +1,58 @@ +const gulp = require('gulp'); +const path = require('path'); +const fs = require('fs'); +const parse5 = require('parse5'); + +const iconRegEx = /mdi:[\w-]+/g; + +function mapFiles(startPath, filter, mapFunc) { + const files = fs.readdirSync(startPath); + for (let i = 0; i < files.length; i++) { + const filename = path.join(startPath, files[i]); + const stat = fs.lstatSync(filename); + if (stat.isDirectory()) { + mapFiles(filename, filter, mapFunc); + } else if (filename.indexOf(filter) >= 0) { + mapFunc(filename); + } + } +} + + +function findIcons() { + const icons = new Set(); + function processFile(filename) { + const content = fs.readFileSync(filename); + let match; + while (match = iconRegEx.exec(content)) { + icons.add(match[0].substr(4)); + }; + } + mapFiles('src', '.html', processFile); + mapFiles('panels', '.html', processFile); + mapFiles('hassio', '.html', processFile); + mapFiles('js', '.js', processFile); + return icons; +} + +async function generateHassIcons() { + const icons = findIcons(); + + const iconDoc = parse5.parseFragment( + fs.readFileSync('hass_frontend/mdi.html', { encoding: 'utf-8' })); + + const ironIconset = iconDoc.childNodes[0]; + ironIconset.attrs.forEach(attr => { + if (attr.name == 'name') { + attr.value = 'hass'; + } + }); + + const defs = ironIconset.childNodes[0].childNodes[0]; + defs.childNodes = defs.childNodes.filter(icon => icons.has(icon.attrs[0].value)); + + fs.writeFileSync('hass_frontend/hass_icons.html', parse5.serialize(iconDoc)); + console.log(`Home Assistant has ${icons.size} icons.`); +} + +gulp.task('gen-hass-icons', generateHassIcons); From 343cca8c4cdc70f547608765b205e1196b91f109 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 19 Apr 2018 23:00:33 -0400 Subject: [PATCH 02/14] Lint --- gulp/tasks/hass-icons.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gulp/tasks/hass-icons.js b/gulp/tasks/hass-icons.js index 2204dc05fa27..c8a63f53fef8 100644 --- a/gulp/tasks/hass-icons.js +++ b/gulp/tasks/hass-icons.js @@ -24,9 +24,10 @@ function findIcons() { function processFile(filename) { const content = fs.readFileSync(filename); let match; + // eslint-disable-next-line while (match = iconRegEx.exec(content)) { icons.add(match[0].substr(4)); - }; + } } mapFiles('src', '.html', processFile); mapFiles('panels', '.html', processFile); @@ -38,12 +39,11 @@ function findIcons() { async function generateHassIcons() { const icons = findIcons(); - const iconDoc = parse5.parseFragment( - fs.readFileSync('hass_frontend/mdi.html', { encoding: 'utf-8' })); + const iconDoc = parse5.parseFragment(fs.readFileSync('hass_frontend/mdi.html', { encoding: 'utf-8' })); const ironIconset = iconDoc.childNodes[0]; - ironIconset.attrs.forEach(attr => { - if (attr.name == 'name') { + ironIconset.attrs.forEach((attr) => { + if (attr.name === 'name') { attr.value = 'hass'; } }); From fd731676310d8bd1f7b11d48f82acf9fde5119b2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 19 Apr 2018 23:22:40 -0400 Subject: [PATCH 03/14] Load mdi on demand --- index.html | 2 +- src/components/entity/ha-state-icon.html | 4 +- src/components/ha-icon.html | 209 +++++++++++++++++++++++ src/components/ha-sidebar.html | 21 +-- 4 files changed, 223 insertions(+), 13 deletions(-) create mode 100644 src/components/ha-icon.html diff --git a/index.html b/index.html index e26d966fac40..b0976de5ffd5 100644 --- a/index.html +++ b/index.html @@ -107,7 +107,7 @@ {% if panel_url -%} {% endif -%} - + {% for extra_url in extra_urls -%} {% endfor -%} diff --git a/src/components/entity/ha-state-icon.html b/src/components/entity/ha-state-icon.html index beaf990185a6..bf00eef39d13 100644 --- a/src/components/entity/ha-state-icon.html +++ b/src/components/entity/ha-state-icon.html @@ -1,10 +1,10 @@ - + diff --git a/src/components/ha-icon.html b/src/components/ha-icon.html new file mode 100644 index 000000000000..93e3e41a9243 --- /dev/null +++ b/src/components/ha-icon.html @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + diff --git a/src/components/ha-sidebar.html b/src/components/ha-sidebar.html index 57946ec062e6..a30adb5fedeb 100644 --- a/src/components/ha-sidebar.html +++ b/src/components/ha-sidebar.html @@ -8,6 +8,7 @@ + @@ -95,24 +96,24 @@
Home Assistant
- +
- + [[localize('panel.states')]] - + [[localize('ui.sidebar.log_out')]] @@ -124,29 +125,29 @@
From 1d29291ba9106301fdefe0f88a2b57e6ff4414dc Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 19 Apr 2018 23:22:46 -0400 Subject: [PATCH 04/14] mdi -> hass --- gulp/tasks/hass-icons.js | 5 +- .../addon-store/hassio-addon-repository.html | 2 +- .../hassio-repositories-editor.html | 4 +- hassio/addon-view/hassio-addon-info.html | 10 +- hassio/addon-view/hassio-addon-view.html | 6 +- hassio/dashboard/hassio-addons.html | 2 +- hassio/dashboard/hassio-hass-update.html | 6 +- hassio/hassio-markdown-dialog.html | 2 +- hassio/hassio-pages-with-tabs.html | 6 +- hassio/snapshots/hassio-snapshot.html | 6 +- hassio/snapshots/hassio-snapshots.html | 2 +- .../automation/ha-automation-editor.html | 4 +- .../automation/ha-automation-picker.html | 6 +- .../config/cloud/ha-config-cloud-login.html | 4 +- panels/config/core/ha-config-core.html | 2 +- .../config/customize/ha-config-customize.html | 2 +- .../customize/ha-customize-attribute.html | 2 +- .../customize/types/ha-customize-icon.html | 2 +- .../dashboard/ha-config-cloud-menu.html | 2 +- .../dashboard/ha-config-entries-menu.html | 2 +- .../dashboard/ha-config-navigation.html | 2 +- panels/config/script/ha-script-editor.html | 4 +- panels/config/script/ha-script-picker.html | 6 +- panels/config/zwave/ha-config-zwave.html | 4 +- panels/config/zwave/zwave-network.html | 2 +- panels/dev-info/ha-panel-dev-info.html | 2 +- panels/dev-state/ha-panel-dev-state.html | 2 +- panels/logbook/ha-panel-logbook.html | 2 +- panels/mailbox/ha-panel-mailbox.html | 2 +- .../shopping-list/ha-panel-shopping-list.html | 4 +- src/cards/ha-media_player-card.html | 12 +- src/cards/ha-plant-card.html | 10 +- src/components/entity/ha-entity-picker.html | 4 +- src/components/entity/ha-entity-toggle.html | 4 +- .../entity/ha-state-label-badge.html | 16 +- src/components/ha-climate-control.html | 4 +- src/components/ha-combo-box.html | 4 +- src/components/ha-cover-controls.html | 6 +- src/components/ha-cover-tilt-controls.html | 6 +- src/components/ha-demo-badge.html | 2 +- src/components/ha-menu-button.html | 2 +- src/components/ha-start-voice-button.html | 2 +- src/components/hassio-card-content.html | 4 +- src/dialogs/ha-voice-command-dialog.html | 2 +- .../more-info/controls/more-info-fan.html | 4 +- .../more-info/controls/more-info-light.html | 6 +- .../controls/more-info-media_player.html | 22 +-- .../more-info/controls/more-info-vacuum.html | 12 +- src/dialogs/more-info/more-info-controls.html | 4 +- src/dialogs/more-info/more-info-settings.html | 2 +- src/layouts/hass-subpage.html | 2 +- src/util/hass-util.html | 142 +++++++++--------- 52 files changed, 190 insertions(+), 189 deletions(-) diff --git a/gulp/tasks/hass-icons.js b/gulp/tasks/hass-icons.js index c8a63f53fef8..a1c084bd1132 100644 --- a/gulp/tasks/hass-icons.js +++ b/gulp/tasks/hass-icons.js @@ -3,7 +3,7 @@ const path = require('path'); const fs = require('fs'); const parse5 = require('parse5'); -const iconRegEx = /mdi:[\w-]+/g; +const iconRegEx = /hass:[\w-]+/g; function mapFiles(startPath, filter, mapFunc) { const files = fs.readdirSync(startPath); @@ -26,7 +26,8 @@ function findIcons() { let match; // eslint-disable-next-line while (match = iconRegEx.exec(content)) { - icons.add(match[0].substr(4)); + // strip off "hass:" and add to set + icons.add(match[0].substr(5)); } } mapFiles('src', '.html', processFile); diff --git a/hassio/addon-store/hassio-addon-repository.html b/hassio/addon-store/hassio-addon-repository.html index 36b9c87c3c92..ed0fdd72f90f 100644 --- a/hassio/addon-store/hassio-addon-repository.html +++ b/hassio/addon-store/hassio-addon-repository.html @@ -60,7 +60,7 @@ } computeIcon(addon) { - return addon.installed && addon.installed !== addon.version ? 'mdi:arrow-up-bold-circle' : 'mdi:puzzle'; + return addon.installed && addon.installed !== addon.version ? 'hass:arrow-up-bold-circle' : 'hass:puzzle'; } computeIconTitle(addon) { diff --git a/hassio/addon-store/hassio-repositories-editor.html b/hassio/addon-store/hassio-repositories-editor.html index 887d4fcbdcb1..04edb92839f2 100644 --- a/hassio/addon-store/hassio-repositories-editor.html +++ b/hassio/addon-store/hassio-repositories-editor.html @@ -37,7 +37,7 @@
@@ -52,7 +52,7 @@
- +
diff --git a/hassio/addon-view/hassio-addon-info.html b/hassio/addon-view/hassio-addon-info.html index bfb8b9e4baa7..1b4d4445bb07 100644 --- a/hassio/addon-view/hassio-addon-info.html +++ b/hassio/addon-view/hassio-addon-info.html @@ -52,11 +52,11 @@ } iron-icon.stopped { color: var(--google-red-300); - } + } ha-call-api-button { font-weight: 500; color: var(--primary-color); - } + } .right { float: right; } @@ -67,7 +67,7 @@
@@ -93,14 +93,14 @@ diff --git a/hassio/addon-view/hassio-addon-view.html b/hassio/addon-view/hassio-addon-view.html index 75cc8a028c5f..907a82d2aa30 100644 --- a/hassio/addon-view/hassio-addon-view.html +++ b/hassio/addon-view/hassio-addon-view.html @@ -21,7 +21,7 @@ :host { color: var(--primary-text-color); --paper-card-header-color: var(--primary-text-color); - } + } .content { padding: 24px 0 32px; max-width: 600px; @@ -42,10 +42,10 @@ > - +
Hass.io: add-on details
diff --git a/hassio/dashboard/hassio-addons.html b/hassio/dashboard/hassio-addons.html index 51ae65ceb5c4..e5c70b327b48 100644 --- a/hassio/dashboard/hassio-addons.html +++ b/hassio/dashboard/hassio-addons.html @@ -54,7 +54,7 @@ } computeIcon(addon) { - return addon.installed !== addon.version ? 'mdi:arrow-up-bold-circle' : 'mdi:puzzle'; + return addon.installed !== addon.version ? 'hass:arrow-up-bold-circle' : 'hass:puzzle'; } computeIconTitle(addon) { diff --git a/hassio/dashboard/hassio-hass-update.html b/hassio/dashboard/hassio-hass-update.html index 9fb6874907b4..0f206dafb416 100644 --- a/hassio/dashboard/hassio-hass-update.html +++ b/hassio/dashboard/hassio-hass-update.html @@ -20,15 +20,15 @@ } - +
diff --git a/panels/config/dashboard/ha-config-entries-menu.html b/panels/config/dashboard/ha-config-entries-menu.html index e6a77a5964c3..6691adb5eab5 100644 --- a/panels/config/dashboard/ha-config-entries-menu.html +++ b/panels/config/dashboard/ha-config-entries-menu.html @@ -22,7 +22,7 @@ Integrations
EXPERIMENTAL – Manage connected devices and services
- + diff --git a/panels/config/dashboard/ha-config-navigation.html b/panels/config/dashboard/ha-config-navigation.html index 921960c16323..087a2f13ea12 100644 --- a/panels/config/dashboard/ha-config-navigation.html +++ b/panels/config/dashboard/ha-config-navigation.html @@ -24,7 +24,7 @@ [[_computeCaption(item, localize)]]
[[_computeDescription(item, localize)]]
- + diff --git a/panels/config/script/ha-script-editor.html b/panels/config/script/ha-script-editor.html index 59c75607757c..10816dcf1050 100644 --- a/panels/config/script/ha-script-editor.html +++ b/panels/config/script/ha-script-editor.html @@ -85,7 +85,7 @@
Script [[name]]
@@ -100,7 +100,7 @@ diff --git a/panels/config/script/ha-script-picker.html b/panels/config/script/ha-script-picker.html index 1be02521d2fc..18095ef93ed8 100644 --- a/panels/config/script/ha-script-picker.html +++ b/panels/config/script/ha-script-picker.html @@ -44,7 +44,7 @@
[[localize('ui.panel.config.script.caption')]]
@@ -72,7 +72,7 @@
[[computeName(script)]]
[[computeDescription(script)]]
- + @@ -80,7 +80,7 @@ diff --git a/panels/config/zwave/ha-config-zwave.html b/panels/config/zwave/ha-config-zwave.html index dc3fa927728d..4d0525e9788b 100644 --- a/panels/config/zwave/ha-config-zwave.html +++ b/panels/config/zwave/ha-config-zwave.html @@ -76,7 +76,7 @@
[[localize('ui.panel.config.zwave.caption')]]
@@ -96,7 +96,7 @@
diff --git a/panels/config/zwave/zwave-network.html b/panels/config/zwave/zwave-network.html index 53f75b634697..e15a525c1569 100644 --- a/panels/config/zwave/zwave-network.html +++ b/panels/config/zwave/zwave-network.html @@ -46,7 +46,7 @@ diff --git a/panels/dev-info/ha-panel-dev-info.html b/panels/dev-info/ha-panel-dev-info.html index 02c10c0dc5d8..0316adde5534 100644 --- a/panels/dev-info/ha-panel-dev-info.html +++ b/panels/dev-info/ha-panel-dev-info.html @@ -195,7 +195,7 @@

Press the button to load the full Home Assistant log. - +

[[errorLog]]
diff --git a/panels/dev-state/ha-panel-dev-state.html b/panels/dev-state/ha-panel-dev-state.html index d26ada4c5586..39763734b744 100644 --- a/panels/dev-state/ha-panel-dev-state.html +++ b/panels/dev-state/ha-panel-dev-state.html @@ -119,7 +119,7 @@

Current entities

diff --git a/panels/logbook/ha-panel-logbook.html b/panels/logbook/ha-panel-logbook.html index 2bb9ab8d1ad9..d097f639702b 100644 --- a/panels/logbook/ha-panel-logbook.html +++ b/panels/logbook/ha-panel-logbook.html @@ -57,7 +57,7 @@
[[localize('panel.logbook')]]
diff --git a/panels/mailbox/ha-panel-mailbox.html b/panels/mailbox/ha-panel-mailbox.html index b2476a687036..24ced83d026f 100644 --- a/panels/mailbox/ha-panel-mailbox.html +++ b/panels/mailbox/ha-panel-mailbox.html @@ -130,7 +130,7 @@

[[localize('ui.panel.mailbox.playback_title')]]

diff --git a/panels/shopping-list/ha-panel-shopping-list.html b/panels/shopping-list/ha-panel-shopping-list.html index 8409c3601a30..38d93479f8f7 100644 --- a/panels/shopping-list/ha-panel-shopping-list.html +++ b/panels/shopping-list/ha-panel-shopping-list.html @@ -74,7 +74,7 @@ vertical-offset="-5" > @@ -91,7 +91,7 @@ diff --git a/src/cards/ha-media_player-card.html b/src/cards/ha-media_player-card.html index 0a137fa72ccd..d26ddba344fd 100644 --- a/src/cards/ha-media_player-card.html +++ b/src/cards/ha-media_player-card.html @@ -167,7 +167,7 @@
@@ -322,9 +322,9 @@ computePlaybackControlIcon(playerObj) { if (playerObj.isPlaying) { - return playerObj.supportsPause ? 'mdi:pause' : 'mdi:stop'; + return playerObj.supportsPause ? 'hass:pause' : 'hass:stop'; } else if (playerObj.isPaused || playerObj.isOff || playerObj.isIdle) { - return playerObj.supportsPlay ? 'mdi:play' : null; + return playerObj.supportsPlay ? 'hass:play' : null; } return ''; } diff --git a/src/cards/ha-plant-card.html b/src/cards/ha-plant-card.html index 5b0a12cc6748..640beef56e73 100644 --- a/src/cards/ha-plant-card.html +++ b/src/cards/ha-plant-card.html @@ -59,11 +59,11 @@ constructor() { super(); this.sensors = { - moisture: 'mdi:water', - temperature: 'mdi:thermometer', - brightness: 'mdi:white-balance-sunny', - conductivity: 'mdi:emoticon-poop', - battery: 'mdi:battery' + moisture: 'hass:water', + temperature: 'hass:thermometer', + brightness: 'hass:white-balance-sunny', + conductivity: 'hass:emoticon-poop', + battery: 'hass:battery' }; } diff --git a/src/components/entity/ha-entity-picker.html b/src/components/entity/ha-entity-picker.html index 10ffa37e124c..114e76cb45cd 100644 --- a/src/components/entity/ha-entity-picker.html +++ b/src/components/entity/ha-entity-picker.html @@ -40,7 +40,7 @@ Clear @@ -157,7 +157,7 @@ } _computeToggleIcon(opened) { - return opened ? 'mdi:menu-up' : 'mdi:menu-down'; + return opened ? 'hass:menu-up' : 'hass:menu-down'; } } diff --git a/src/components/entity/ha-entity-toggle.html b/src/components/entity/ha-entity-toggle.html index 0e9b41a96a4f..d328d74d8676 100644 --- a/src/components/entity/ha-entity-toggle.html +++ b/src/components/entity/ha-entity-toggle.html @@ -25,8 +25,8 @@ diff --git a/src/components/ha-combo-box.html b/src/components/ha-combo-box.html index 4f5e5e9c063c..c9adb994327e 100644 --- a/src/components/ha-combo-box.html +++ b/src/components/ha-combo-box.html @@ -34,7 +34,7 @@ Clear
- - -
diff --git a/src/components/ha-cover-tilt-controls.html b/src/components/ha-cover-tilt-controls.html index f751964791ab..b570177be5c0 100644 --- a/src/components/ha-cover-tilt-controls.html +++ b/src/components/ha-cover-tilt-controls.html @@ -16,14 +16,14 @@ visibility: hidden !important; } - - - diff --git a/src/components/ha-demo-badge.html b/src/components/ha-demo-badge.html index cf91b895b12d..193e17fc227e 100644 --- a/src/components/ha-demo-badge.html +++ b/src/components/ha-demo-badge.html @@ -11,7 +11,7 @@ diff --git a/src/components/ha-menu-button.html b/src/components/ha-menu-button.html index 2777b8bc5d79..907a3e77d19b 100644 --- a/src/components/ha-menu-button.html +++ b/src/components/ha-menu-button.html @@ -11,7 +11,7 @@ } diff --git a/src/components/ha-start-voice-button.html b/src/components/ha-start-voice-button.html index 95bd40013266..b183f508fe07 100644 --- a/src/components/ha-start-voice-button.html +++ b/src/components/ha-start-voice-button.html @@ -6,7 +6,7 @@
diff --git a/src/dialogs/more-info/controls/more-info-fan.html b/src/dialogs/more-info/controls/more-info-fan.html index a391d1367d08..d10ed70f4a46 100644 --- a/src/dialogs/more-info/controls/more-info-fan.html +++ b/src/dialogs/more-info/controls/more-info-fan.html @@ -62,10 +62,10 @@
Direction
- -
diff --git a/src/dialogs/more-info/controls/more-info-light.html b/src/dialogs/more-info/controls/more-info-light.html index ade233e5741e..787156bc4c6c 100644 --- a/src/dialogs/more-info/controls/more-info-light.html +++ b/src/dialogs/more-info/controls/more-info-light.html @@ -70,7 +70,7 @@
@@ -78,7 +78,7 @@
diff --git a/src/dialogs/more-info/controls/more-info-media_player.html b/src/dialogs/more-info/controls/more-info-media_player.html index 05c5a9169459..c49d2e84cc54 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.html +++ b/src/dialogs/more-info/controls/more-info-media_player.html @@ -58,19 +58,19 @@
-
@@ -79,13 +79,13 @@
+ icon="hass:volume-off"> + icon="hass:volume-medium"> + icon="hass:volume-high">
- + @@ -179,7 +179,7 @@ } computeMuteVolumeIcon(playerObj) { - return playerObj.isMuted ? 'mdi:volume-off' : 'mdi:volume-high'; + return playerObj.isMuted ? 'hass:volume-off' : 'hass:volume-high'; } computeHideVolumeButtons(playerObj) { @@ -192,9 +192,9 @@ computePlaybackControlIcon(playerObj) { if (playerObj.isPlaying) { - return playerObj.supportsPause ? 'mdi:pause' : 'mdi:stop'; + return playerObj.supportsPause ? 'hass:pause' : 'hass:stop'; } - return playerObj.supportsPlay ? 'mdi:play' : null; + return playerObj.supportsPlay ? 'hass:play' : null; } computeHidePowerButton(playerObj) { diff --git a/src/dialogs/more-info/controls/more-info-vacuum.html b/src/dialogs/more-info/controls/more-info-vacuum.html index 0f0c5e8d9322..3f2763087735 100644 --- a/src/dialogs/more-info/controls/more-info-vacuum.html +++ b/src/dialogs/more-info/controls/more-info-vacuum.html @@ -43,23 +43,23 @@
Vacuum cleaner commands:
-
-
-
-
-
@@ -76,7 +76,7 @@
- [[stateObj.attributes.fan_speed]] + [[stateObj.attributes.fan_speed]]

diff --git a/src/dialogs/more-info/more-info-controls.html b/src/dialogs/more-info/more-info-controls.html index aa31748e6fbf..0e3864639001 100644 --- a/src/dialogs/more-info/more-info-controls.html +++ b/src/dialogs/more-info/more-info-controls.html @@ -45,13 +45,13 @@
[[_computeStateName(stateObj)]]
diff --git a/src/dialogs/more-info/more-info-settings.html b/src/dialogs/more-info/more-info-settings.html index 7282ec0b7476..a8bea1008b7f 100644 --- a/src/dialogs/more-info/more-info-settings.html +++ b/src/dialogs/more-info/more-info-settings.html @@ -33,7 +33,7 @@
[[_computeStateName(stateObj)]]
diff --git a/src/layouts/hass-subpage.html b/src/layouts/hass-subpage.html index c8365722ad80..934d79eb5869 100644 --- a/src/layouts/hass-subpage.html +++ b/src/layouts/hass-subpage.html @@ -11,7 +11,7 @@
[[header]]
diff --git a/src/util/hass-util.html b/src/util/hass-util.html index d00ee7f64269..45d9b8692f3c 100644 --- a/src/util/hass-util.html +++ b/src/util/hass-util.html @@ -7,7 +7,7 @@ - + diff --git a/js/panel-config/condition/condition_row.js b/js/panel-config/condition/condition_row.js index 8dd1e40067e8..f777d5b359f3 100644 --- a/js/panel-config/condition/condition_row.js +++ b/js/panel-config/condition/condition_row.js @@ -27,7 +27,7 @@ export default class ConditionRow extends Component { vertical-offset="-5" > diff --git a/js/panel-config/script/action_row.js b/js/panel-config/script/action_row.js index 286951fbd310..6eae30e6ff44 100644 --- a/js/panel-config/script/action_row.js +++ b/js/panel-config/script/action_row.js @@ -27,7 +27,7 @@ export default class Action extends Component { vertical-offset="-5" > diff --git a/js/panel-config/trigger/trigger_row.js b/js/panel-config/trigger/trigger_row.js index 0cd1fe767d0e..ddd3f036d309 100644 --- a/js/panel-config/trigger/trigger_row.js +++ b/js/panel-config/trigger/trigger_row.js @@ -27,7 +27,7 @@ export default class TriggerRow extends Component { vertical-offset="-5" > diff --git a/script/update_mdi.py b/script/update_mdi.py deleted file mode 100755 index ae9225773a4e..000000000000 --- a/script/update_mdi.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python3 -"""Download the latest Polymer v1 iconset for materialdesignicons.com.""" -import os -import re -import sys -import urllib.request - -GETTING_STARTED_URL = ('https://raw.githubusercontent.com/Templarian/' - 'MaterialDesign/master/site/getting-started.savvy') -DOWNLOAD_LINK = re.compile(r'(/api/download/polymer/v1/([A-Z0-9-]{36}))') -START_ICONSET = '
- +
[[localize('ui.card.weather.attributes.temperature')]]
[[stateObj.attributes.temperature]] [[getUnit('temperature')]]
- +
[[localize('ui.card.weather.attributes.humidity')]]
[[stateObj.attributes.humidity]] %
- +
[[localize('ui.card.weather.attributes.wind_speed')]]
[[getWind(stateObj.attributes.wind_speed, stateObj.attributes.wind_bearing, localize)]]