File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 55 stateIcon ,
66} from 'custom-card-helpers' ; // computeStateDisplay,
77import registerTemplates from 'ha-template' ;
8- import get from 'lodash.get' ;
8+ // import get from 'lodash.get';
99import localize from './localize' ;
1010import styles from './styles' ;
1111import defaultImage from './landroid.svg' ;
@@ -775,9 +775,13 @@ class LandroidCard extends LitElement {
775775 }
776776
777777 try {
778+ // Usinglodash.get;
779+ // const value = entity_id
780+ // ? this.hass.states[entity_id].state
781+ // : get(this.entity.attributes, attribute);
778782 const value = entity_id
779783 ? this . hass . states [ entity_id ] . state
780- : get ( this . entity . attributes , attribute ) ;
784+ : this . entity ? .attributes ?. [ attribute ] ;
781785
782786 return html `
783787 < div
You can’t perform that action at this time.
0 commit comments