diff --git a/src/cards/ha-camera-card.html b/src/cards/ha-camera-card.html
index 067719ab1d..2029fde593 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 e79e8d2a6a..242b4cadb5 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 3f36f21160..deafb12855 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 c432c8180d..b3bbcab409 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 fe60d5192f..7626381ab0 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 d83174c1f1..14c8212460 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 41eca2d2db..0000000000
--- 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 846e3e623a..0000000000
--- 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 5f3404d69b..f87c6a8ca7 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 6bd1969f49..9370f0a80f 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 970699c3b7..a327275eef 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 cb6ebd9705..0ca0ba85b6 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 3ef0ee62c1..31b6857df6 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 29a85ca7c5..0e81649d20 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 401ed83675..772d868626 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 06d201c4f7..1ad21227f1 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 b149523f59..16133c2837 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 3f1c446e68..d521dbb289 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 fa2bf7e576..44919804b4 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 902550d638..355de56af6 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 c674ad706b..97e84f7fd3 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 cc5b07a90b..703941b539 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 e5b8b9c001..5ef02c91df 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 11b2f23e73..032dc6c8bd 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 3a68333b58..e35052fe20 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 d80a26d1a1..5594c559ba 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 f4ee4f0549..9f78394b89 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 ce1a9ec67d..3c81b03080 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 5960f758cf..d481808670 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 4b23b9c791..e103ab967b 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 3aee26d14f..364c8f79d8 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 21fe460d61..67755870ba 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 9bdd616a4c..662014b1bc 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 f7678444d7..2ab87d95de 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 523b9f2221..0000000000
--- 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 91cbe34272..0000000000
--- 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);
- },
-});