fixed turn off with transition bug and upped ver

This commit is contained in:
icanos 2019-12-22 18:05:05 +00:00
parent 3aa69d0930
commit a9567517ef
2 changed files with 2 additions and 2 deletions

View file

@ -117,7 +117,7 @@ class PlejdService extends EventEmitter {
if (command.transition) { if (command.transition) {
// we have a transition time, split the target brightness (which will be 0) // we have a transition time, split the target brightness (which will be 0)
// into pieces spread of the transition time // 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 steps = command.transition * 2;
const brightnessStep = initialBrightness / steps; const brightnessStep = initialBrightness / steps;
let currentBrightness = initialBrightness; let currentBrightness = initialBrightness;

View file

@ -1,6 +1,6 @@
{ {
"name": "Plejd", "name": "Plejd",
"version": "0.1.0", "version": "0.2.0",
"slug": "plejd", "slug": "plejd",
"description": "Adds support for the Swedish home automation devices from Plejd.", "description": "Adds support for the Swedish home automation devices from Plejd.",
"url": "https://github.com/icanos/hassio-plejd/", "url": "https://github.com/icanos/hassio-plejd/",