Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaauw committed May 10, 2024
1 parent 3f93ccf commit 90f4d89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//
// Homebridge plugin for virtual weather station.

'use strict'

import { createRequire } from 'node:module'

import { WsPlatform } from './lib/WsPlatform.js'
Expand Down
6 changes: 2 additions & 4 deletions lib/WsPlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
//
// Homebridge plugin for virtual weather station.

'use strict'

import events from 'events'
import { once } from 'node:events'

import { HttpClient } from 'homebridge-lib/HttpClient'
import { OptionParser } from 'homebridge-lib/OptionParser'
Expand Down Expand Up @@ -132,7 +130,7 @@ class WsPlatform extends Platform {
hourlyForecasts: this.config.hourlyForecasts
}
const wsAccessory = new WsAccessory(this, params)
jobs.push(events.once(wsAccessory, 'initialised'))
jobs.push(once(wsAccessory, 'initialised'))
this.wsAccessories[name] = wsAccessory
} catch (error) {
this.error(error)
Expand Down

0 comments on commit 90f4d89

Please sign in to comment.