Skip to content

Commit

Permalink
Update P1Accessory.js
Browse files Browse the repository at this point in the history
Delay call to `inheritLogLevel()` until after main _Electricity_ accessory has initialed, see #75.
  • Loading branch information
ebaauw committed Apr 9, 2023
1 parent 89925df commit b45c4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/P1Accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ class ElectricityDetails extends homebridgeLib.AccessoryDelegate {
model: 'homebridge-p1',
category: accessory.platform.Accessory.Categories.Sensor
})
this.inheritLogLevel(accessory.platform.electricity)
this.dummyService = new homebridgeLib.ServiceDelegate.Dummy(this)
this.peakServices = []
this.check(data)
setImmediate(() => {
this.inheritLogLevel(accessory.platform.electricity)
this.emit('initialised')
})
}
Expand Down

0 comments on commit b45c4f0

Please sign in to comment.