diff --git a/src/cards/ha-camera-card.html b/src/cards/ha-camera-card.html index 76576cb069..d6c02befbb 100644 --- a/src/cards/ha-camera-card.html +++ b/src/cards/ha-camera-card.html @@ -9,6 +9,7 @@ font-size: 0px; border-radius: 2px; cursor: pointer; + min-height: 48px; } .camera-feed { width: 100%; @@ -28,10 +29,19 @@ font-weight: 500; line-height: 16px; color: white; + white-space: nowrap; + overflow-x: hidden; + text-overflow: ellipsis; } diff --git a/src/cards/ha-camera-card.js b/src/cards/ha-camera-card.js index 2c77bbc40a..6970be4a51 100644 --- a/src/cards/ha-camera-card.js +++ b/src/cards/ha-camera-card.js @@ -18,6 +18,11 @@ export default new Polymer({ type: String, }, + imageLoaded: { + type: Boolean, + value: true, + }, + /** * The z-depth of the card, from 0-5. */ @@ -49,4 +54,12 @@ export default new Polymer({ const time = (new Date()).getTime(); this.cameraFeedSrc = `${stateObj.attributes.entity_picture}?time=${time}`; }, + + imageLoadSuccess() { + this.imageLoaded = true; + }, + + imageLoadFail() { + this.imageLoaded = false; + }, });