Skip to content

Commit

Permalink
Merge pull request #15 from RaMin0/master
Browse files Browse the repository at this point in the history
Use text entities directly without an attribute
  • Loading branch information
dimagoltsman authored May 18, 2022
2 parents fbb20c6 + 0ffc294 commit 86c4dde
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dist/refreshable-picture-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,15 @@ class ResfeshablePictureCard extends HTMLElement {

let refreshTime = config.update_interval || 30


var pictureUrl;
let refreshFunc = function(){
var pictureUrl = config.static_picture
pictureUrl = config.static_picture

if(config.entity_picture){
pictureUrl = hassObj.states[config.entity_picture]["attributes"][config.attribute]
pictureUrl = hassObj.states[config.entity_picture].state
if(config.attribute){
pictureUrl = hassObj.states[config.entity_picture]["attributes"][config.attribute]
}


}
Expand Down

0 comments on commit 86c4dde

Please sign in to comment.