Skip to content

Commit

Permalink
defaults to own object
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Oct 27, 2020
1 parent 9d5f672 commit c10845b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/govee-platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module.exports = class goveePlatform {
this.refreshFlag = true
this.refreshTime = parseInt(this.config.refreshTime)
this.refreshTime = isNaN(this.refreshTime)
? helpers.refreshTime
? helpers.defaults.refreshTime
: this.refreshTime < 10
? helpers.refreshTime
? helpers.defaults.refreshTime
: this.refreshTime
this.api
.on('didFinishLaunching', () => this.goveeSetup())
Expand Down
4 changes: 3 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
/* eslint-disable new-cap */
'use strict'
module.exports = {
refreshTime: 15,
defaults: {
refreshTime: 15
},
modelsLED: [
'H6160', 'H6163', 'H6104', 'H6109',
'H6110', 'H6117', 'H6159', 'H7021',
Expand Down

0 comments on commit c10845b

Please sign in to comment.