Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Better hide if empty handling (#3)
Browse files Browse the repository at this point in the history
* Added better hanling of empty state

* version bump
  • Loading branch information
ludeeus authored Jul 25, 2018
1 parent 23d1155 commit f2b7308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.0.4
2 changes: 1 addition & 1 deletion state-attribute-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class StateAttributeElement extends HTMLElement {
const attr = this.config.attribute;
const state = hass.states[entityId].attributes[attr];
const card = document.createElement('state-attribute-element');
if (state != null) {
if (state.length != 0) {
if (prefix_string) {
this.innerHTML = prefix_string + state;
} else {
Expand Down

0 comments on commit f2b7308

Please sign in to comment.