fixed turn off with transition bug and upped ver
This commit is contained in:
parent
3aa69d0930
commit
a9567517ef
2 changed files with 2 additions and 2 deletions
|
|
@ -117,7 +117,7 @@ class PlejdService extends EventEmitter {
|
|||
if (command.transition) {
|
||||
// we have a transition time, split the target brightness (which will be 0)
|
||||
// into pieces spread of the transition time
|
||||
const initialBrightness = this.plejdDevices[id].dim;
|
||||
const initialBrightness = this.plejdDevices[id] ? this.plejdDevices[id].dim : 250;
|
||||
const steps = command.transition * 2;
|
||||
const brightnessStep = initialBrightness / steps;
|
||||
let currentBrightness = initialBrightness;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue