diff --git a/src/cards/ha-camera-card.html b/src/cards/ha-camera-card.html
index 067719ab1..2029fde59 100644
--- a/src/cards/ha-camera-card.html
+++ b/src/cards/ha-camera-card.html
@@ -17,6 +17,7 @@
border-radius: 2px;
}
.caption {
+ @apply(--paper-font-common-nowrap);
position: absolute;
left: 0px;
right: 0px;
@@ -32,9 +33,6 @@
font-weight: 500;
line-height: 16px;
color: white;
- white-space: nowrap;
- overflow-x: hidden;
- text-overflow: ellipsis;
}
diff --git a/src/cards/ha-entities-card.html b/src/cards/ha-entities-card.html
index e79e8d2a6..242b4cadb 100644
--- a/src/cards/ha-entities-card.html
+++ b/src/cards/ha-entities-card.html
@@ -15,13 +15,13 @@
cursor: pointer;
}
.header {
- font-size: 24px;
+ @apply(--paper-font-headline);
+ color: var(--primary-text-color);
padding: 24px 16px 16px;
text-transform: capitalize;
}
.header .name {
- overflow: hidden;
- text-overflow: ellipsis;
+ @apply(--paper-font-common-nowrap);
}
ha-entity-toggle {
margin-left: 16px;
diff --git a/src/cards/ha-introduction-card.html b/src/cards/ha-introduction-card.html
index 3f36f2116..deafb1285 100644
--- a/src/cards/ha-introduction-card.html
+++ b/src/cards/ha-introduction-card.html
@@ -5,7 +5,7 @@
diff --git a/src/components/entity/ha-entity-toggle.js b/src/components/entity/ha-entity-toggle.js
index c432c8180..b3bbcab40 100644
--- a/src/components/entity/ha-entity-toggle.js
+++ b/src/components/entity/ha-entity-toggle.js
@@ -25,6 +25,14 @@ export default new Polymer({
},
},
+ listeners: {
+ tap: 'onTap',
+ },
+
+ onTap(ev) {
+ ev.stopPropagation();
+ },
+
ready() {
this.forceStateChange();
},
diff --git a/src/components/ha-card.html b/src/components/ha-card.html
index fe60d5192..7626381ab 100644
--- a/src/components/ha-card.html
+++ b/src/components/ha-card.html
@@ -11,7 +11,9 @@
background-color: white;
}
.header {
- font-size: 24px;
+ @apply(--paper-font-headline);
+ @apply(--paper-font-common-expensive-kerning);
+ opacity: var(--dark-primary-opacity);
padding: 24px 16px 16px;
text-transform: capitalize;
}
diff --git a/src/components/logbook-entry.html b/src/components/logbook-entry.html
index d83174c1f..14c821246 100644
--- a/src/components/logbook-entry.html
+++ b/src/components/logbook-entry.html
@@ -8,6 +8,8 @@
diff --git a/src/components/state-cards.html b/src/components/state-cards.html
deleted file mode 100644
index 41eca2d2d..000000000
--- a/src/components/state-cards.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Hi there!
-
- 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.
-
-
-
-
-
-
-
diff --git a/src/components/state-cards.js b/src/components/state-cards.js
deleted file mode 100644
index 846e3e623..000000000
--- a/src/components/state-cards.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Polymer from '../polymer';
-
-require('../state-summary/state-card');
-
-export default new Polymer({
- is: 'state-cards',
-
- properties: {
- states: {
- type: Array,
- value: [],
- },
- },
-
- computeEmptyStates(states) {
- return states.length === 0;
- },
-});
diff --git a/src/components/state-info.html b/src/components/state-info.html
index 5f3404d69..f87c6a8ca 100644
--- a/src/components/state-info.html
+++ b/src/components/state-info.html
@@ -6,7 +6,7 @@
@@ -39,11 +41,13 @@
-
[[stateObj.entityDisplay]]
+
[[stateObj.entityDisplay]]
-
-
-
+
+
+
+
+
diff --git a/src/components/state-info.js b/src/components/state-info.js
index 6bd1969f4..9370f0a80 100644
--- a/src/components/state-info.js
+++ b/src/components/state-info.js
@@ -7,6 +7,11 @@ export default new Polymer({
is: 'state-info',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/dialogs/more-info-dialog.html b/src/dialogs/more-info-dialog.html
index 970699c3b..a327275ee 100644
--- a/src/dialogs/more-info-dialog.html
+++ b/src/dialogs/more-info-dialog.html
@@ -37,7 +37,7 @@
-
+
- [[errorLog]]
+ [[errorLog]]
diff --git a/src/state-summary/state-card-configurator.html b/src/state-summary/state-card-configurator.html
index cb6ebd970..0ca0ba85b 100644
--- a/src/state-summary/state-card-configurator.html
+++ b/src/state-summary/state-card-configurator.html
@@ -1,11 +1,26 @@
+
+
+
-
+
+
+
-
+
diff --git a/src/state-summary/state-card-configurator.js b/src/state-summary/state-card-configurator.js
index 3ef0ee62c..31b6857df 100644
--- a/src/state-summary/state-card-configurator.js
+++ b/src/state-summary/state-card-configurator.js
@@ -7,6 +7,11 @@ export default new Polymer({
is: 'state-card-configurator',
properties: {
+ inDialog: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-content.js b/src/state-summary/state-card-content.js
index 29a85ca7c..0e81649d2 100644
--- a/src/state-summary/state-card-content.js
+++ b/src/state-summary/state-card-content.js
@@ -19,16 +19,24 @@ export default new Polymer({
is: 'state-card-content',
properties: {
+ inDialog: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
- observer: 'stateObjChanged',
},
},
- stateObjChanged(stateObj) {
+ observers: [
+ 'inputChanged(inDialog, stateObj)',
+ ],
+
+ inputChanged(inDialog, stateObj) {
if (!stateObj) return;
dynamicContentUpdater(
- this, `STATE-CARD-${stateCardType(stateObj).toUpperCase()}`, { stateObj });
+ this, `STATE-CARD-${stateCardType(stateObj).toUpperCase()}`, { stateObj, inDialog });
},
});
diff --git a/src/state-summary/state-card-display.html b/src/state-summary/state-card-display.html
index 401ed8367..772d86862 100755
--- a/src/state-summary/state-card-display.html
+++ b/src/state-summary/state-card-display.html
@@ -6,17 +6,19 @@
-
+
[[stateObj.stateDisplay]]
diff --git a/src/state-summary/state-card-display.js b/src/state-summary/state-card-display.js
index 06d201c4f..1ad21227f 100644
--- a/src/state-summary/state-card-display.js
+++ b/src/state-summary/state-card-display.js
@@ -6,6 +6,11 @@ export default new Polymer({
is: 'state-card-display',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-input_select.html b/src/state-summary/state-card-input_select.html
index b149523f5..16133c283 100644
--- a/src/state-summary/state-card-input_select.html
+++ b/src/state-summary/state-card-input_select.html
@@ -13,7 +13,7 @@
-
+
diff --git a/src/state-summary/state-card-input_select.js b/src/state-summary/state-card-input_select.js
index 3f1c446e6..d521dbb28 100644
--- a/src/state-summary/state-card-input_select.js
+++ b/src/state-summary/state-card-input_select.js
@@ -9,6 +9,11 @@ export default new Polymer({
is: 'state-card-input_select',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-input_slider.html b/src/state-summary/state-card-input_slider.html
index fa2bf7e57..44919804b 100644
--- a/src/state-summary/state-card-input_slider.html
+++ b/src/state-summary/state-card-input_slider.html
@@ -13,7 +13,7 @@
diff --git a/src/state-summary/state-card-input_slider.js b/src/state-summary/state-card-input_slider.js
index 902550d63..355de56af 100644
--- a/src/state-summary/state-card-input_slider.js
+++ b/src/state-summary/state-card-input_slider.js
@@ -9,6 +9,11 @@ export default new Polymer({
is: 'state-card-input_slider',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
observer: 'stateObjectChanged',
diff --git a/src/state-summary/state-card-media_player.html b/src/state-summary/state-card-media_player.html
index c674ad706..97e84f7fd 100644
--- a/src/state-summary/state-card-media_player.html
+++ b/src/state-summary/state-card-media_player.html
@@ -10,29 +10,26 @@
}
.state {
+ @apply(--paper-font-common-nowrap);
+ @apply(--paper-font-body1);
margin-left: 16px;
text-align: right;
- overflow-x: hidden;
}
.main-text {
- white-space: nowrap;
- overflow-x: hidden;
- text-overflow: ellipsis;
+ @apply(--paper-font-common-nowrap);
+ color: var(--primary-text-color);
text-transform: capitalize;
- font-weight: 400;
}
.secondary-text {
- white-space: nowrap;
- overflow-x: hidden;
- text-overflow: ellipsis;
+ @apply(--paper-font-common-nowrap);
color: var(--secondary-text-color);
}
-
+
[[computePrimaryText(stateObj, isPlaying)]]
[[computeSecondaryText(stateObj)]]
diff --git a/src/state-summary/state-card-media_player.js b/src/state-summary/state-card-media_player.js
index cc5b07a90..703941b53 100644
--- a/src/state-summary/state-card-media_player.js
+++ b/src/state-summary/state-card-media_player.js
@@ -8,6 +8,11 @@ export default new Polymer({
is: 'state-card-media_player',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-rollershutter.html b/src/state-summary/state-card-rollershutter.html
index e5b8b9c00..5ef02c91d 100644
--- a/src/state-summary/state-card-rollershutter.html
+++ b/src/state-summary/state-card-rollershutter.html
@@ -19,7 +19,7 @@
-
+
diff --git a/src/state-summary/state-card-rollershutter.js b/src/state-summary/state-card-rollershutter.js
index 11b2f23e7..032dc6c8b 100644
--- a/src/state-summary/state-card-rollershutter.js
+++ b/src/state-summary/state-card-rollershutter.js
@@ -10,6 +10,11 @@ export default new Polymer({
is: 'state-card-rollershutter',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-scene.html b/src/state-summary/state-card-scene.html
index 3a68333b5..e35052fe2 100644
--- a/src/state-summary/state-card-scene.html
+++ b/src/state-summary/state-card-scene.html
@@ -1,23 +1,23 @@
-
+
diff --git a/src/state-summary/state-card-scene.js b/src/state-summary/state-card-scene.js
index d80a26d1a..5594c559b 100644
--- a/src/state-summary/state-card-scene.js
+++ b/src/state-summary/state-card-scene.js
@@ -9,12 +9,18 @@ export default new Polymer({
is: 'state-card-scene',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
},
- activateScene() {
+ activateScene(ev) {
+ ev.stopPropagation();
serviceActions.callTurnOn(this.stateObj.entityId);
},
});
diff --git a/src/state-summary/state-card-script.html b/src/state-summary/state-card-script.html
index f4ee4f054..9f78394b8 100644
--- a/src/state-summary/state-card-script.html
+++ b/src/state-summary/state-card-script.html
@@ -1,5 +1,5 @@
-
+
@@ -7,22 +7,22 @@
diff --git a/src/state-summary/state-card-script.js b/src/state-summary/state-card-script.js
index ce1a9ec67..3c81b0308 100644
--- a/src/state-summary/state-card-script.js
+++ b/src/state-summary/state-card-script.js
@@ -10,12 +10,18 @@ export default new Polymer({
is: 'state-card-script',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
},
- fireScript() {
+ fireScript(ev) {
+ ev.stopPropagation();
serviceActions.callTurnOn(this.stateObj.entityId);
},
});
diff --git a/src/state-summary/state-card-thermostat.html b/src/state-summary/state-card-thermostat.html
index 5960f758c..d48180867 100644
--- a/src/state-summary/state-card-thermostat.html
+++ b/src/state-summary/state-card-thermostat.html
@@ -6,33 +6,26 @@
-
+
[[computeTargetTemperature(stateObj)]]
diff --git a/src/state-summary/state-card-thermostat.js b/src/state-summary/state-card-thermostat.js
index 4b23b9c79..e103ab967 100644
--- a/src/state-summary/state-card-thermostat.js
+++ b/src/state-summary/state-card-thermostat.js
@@ -6,6 +6,11 @@ export default new Polymer({
is: 'state-card-thermostat',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-toggle.html b/src/state-summary/state-card-toggle.html
index 3aee26d14..364c8f79d 100755
--- a/src/state-summary/state-card-toggle.html
+++ b/src/state-summary/state-card-toggle.html
@@ -11,8 +11,8 @@
}
-
-
+
+
diff --git a/src/state-summary/state-card-toggle.js b/src/state-summary/state-card-toggle.js
index 21fe460d6..67755870b 100644
--- a/src/state-summary/state-card-toggle.js
+++ b/src/state-summary/state-card-toggle.js
@@ -7,6 +7,11 @@ export default new Polymer({
is: 'state-card-toggle',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
diff --git a/src/state-summary/state-card-weblink.html b/src/state-summary/state-card-weblink.html
index 9bdd616a4..662014b1b 100644
--- a/src/state-summary/state-card-weblink.html
+++ b/src/state-summary/state-card-weblink.html
@@ -4,22 +4,22 @@
-
- [[stateObj.entityDisplay]]
+
+ [[stateObj.entityDisplay]]
diff --git a/src/state-summary/state-card-weblink.js b/src/state-summary/state-card-weblink.js
index f7678444d..2ab87d95d 100644
--- a/src/state-summary/state-card-weblink.js
+++ b/src/state-summary/state-card-weblink.js
@@ -6,6 +6,11 @@ export default new Polymer({
is: 'state-card-weblink',
properties: {
+ detailed: {
+ type: Boolean,
+ value: false,
+ },
+
stateObj: {
type: Object,
},
@@ -17,6 +22,10 @@ export default new Polymer({
onTap(ev) {
ev.stopPropagation();
+ if (ev.target === this.$.link) {
+ // Only open window if we clicked on card but not the link
+ return;
+ }
window.open(this.stateObj.state, '_blank');
},
});
diff --git a/src/state-summary/state-card.html b/src/state-summary/state-card.html
deleted file mode 100644
index 523b9f222..000000000
--- a/src/state-summary/state-card.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/state-summary/state-card.js b/src/state-summary/state-card.js
deleted file mode 100644
index 91cbe3427..000000000
--- a/src/state-summary/state-card.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import hass from '../util/home-assistant-js-instance';
-
-import Polymer from '../polymer';
-
-require('./state-card-content');
-
-const { moreInfoActions } = hass;
-
-export default new Polymer({
- is: 'state-card',
-
- properties: {
- stateObj: {
- type: Object,
- },
- },
-
- listeners: {
- tap: 'cardTapped',
- },
-
- cardTapped(ev) {
- ev.stopPropagation();
- this.async(() => moreInfoActions.selectEntity(this.stateObj.entityId), 1);
- },
-});