Skip to content

Commit

Permalink
Fix issue with loss of config
Browse files Browse the repository at this point in the history
  • Loading branch information
gadgetchnnel committed Aug 29, 2019
1 parent 8cfc27d commit 6a9857d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 85 deletions.
2 changes: 1 addition & 1 deletion custom_card.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lovelace-home-feed-card": {
"version": "0.2.11b2",
"version": "0.2.11b3",
"remote_location": "https://raw.githubusercontent.com/gadgetchnnel/lovelace-home-feed-card/master/lovelace-home-feed-card.js",
"visit_repo": "https://github.com/gadgetchnnel/lovelace-home-feed-card",
"changelog": "https://github.com/gadgetchnnel/lovelace-home-feed-card"
Expand Down
84 changes: 0 additions & 84 deletions lovelace-home-feed-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ class HomeFeedCard extends LitElement {
this.feedContent = null;
this.loadModules();
}


disconnectedCallback() {
this.pageId = null;
this._hass = null;
this._config = null;
this.moment = null;
this.helpers = null;
}

loadModules(){
try{
Expand Down Expand Up @@ -49,80 +40,6 @@ class HomeFeedCard extends LitElement {

}

static get template(){
return html`
<style>
ha-card {
padding: 0 16px 16px 16px;
}
#notifications {
margin: -4px 0;
}
#notifications > * {
margin: 8px 0;
}
#notifications > div > * {
overflow: hidden;
padding-right: 1em;
}
.item-container {
width: 100%;
height: auto;
}
.item-left, .item-right {
width: 20px;
height: 100%;
float: left;
}
.item-right {
float: right;
}
.item-right ha-icon {
cursor:pointer;
}
.item-content {
overflow: auto;
height: 100%;
}
state-badge {
margin-top: -10px;
margin-left: -10px;
}
.item-content ha-markdown p {
margin-top: 0px;
}
.header {
font-family: var(--paper-font-headline_-_font-family); -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); font-size: var(--paper-font-headline_-_font-size); font-weight: var(--paper-font-headline_-_font-weight); letter-spacing: var(--paper-font-headline_-_letter-spacing); line-height: var(--paper-font-headline_-_line-height);
line-height: 30px;
color: var(--primary-text-color);
padding: 28px 0 12px;
display: flex;
justify-content: space-between;
top: 0;
z-index: 999;
width: 100%;
}
.header .name {
white-space: var(--paper-font-common-nowrap_-_white-space); overflow: var(--paper-font-common-nowrap_-_overflow); text-overflow: var(--paper-font-common-nowrap_-_text-overflow);
}
.state-card-dialog {
cursor: pointer;
}
</style>
<ha-card id="card">
<div id="header" class="header"></div>
<div id="notifications"></div>
</ha-card>
`;
}

createRenderRoot() {
return this;
}
Expand Down Expand Up @@ -838,7 +755,6 @@ class HomeFeedCard extends LitElement {
if(this._hass){
const filtered = Object.keys(this._hass.states).filter(key => key.startsWith("persistent_notification."));
let notificationCount = filtered.length;

if(notificationCount != oldNotificationCount || (this.moment && this.moment().diff(notificationsLastUpdate, 'minutes') > 5)){
this.notificationCount = notificationCount;
this.refreshNotifications().then(() => {});
Expand Down

0 comments on commit 6a9857d

Please sign in to comment.