Skip to content

Commit

Permalink
Fix icon matching to use hvac_action and not state
Browse files Browse the repository at this point in the history
  • Loading branch information
nervetattoo committed Aug 8, 2019
1 parent b86f889 commit 4b83b23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ class SimpleThermostat extends LitElement {
if (this.name === false) return ''

let icon = this.icon
const { state } = this.entity
const { hvac_action: action } = this.entity.attributes
if (typeof this.icon === 'object') {
icon = state in this.icon ? this.icon[state] : false
icon = action in this.icon ? this.icon[action] : false
}

return html`
Expand Down

0 comments on commit 4b83b23

Please sign in to comment.