Skip to content

Commit

Permalink
Fix icon/name override for individual modes. Fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
nervetattoo committed Oct 15, 2019
1 parent e103056 commit 44e52b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ class SimpleThermostat extends LitElement {
this.modeOptions.names = _names
this.modeOptions.icons = _icons

if (modes.length > 0) {
controlModes = Object.entries(modes)
const entries = Object.entries(modes)
if (entries.length > 0) {
controlModes = entries
.filter(([type]) => supportedModeType(type))
.map(([type, config]) => {
return {
Expand Down

0 comments on commit 44e52b1

Please sign in to comment.