From a1264913ecc85371b82ae1f41655ae8fe7076ab4 Mon Sep 17 00:00:00 2001 From: Jan Scheiper Date: Thu, 20 Feb 2020 23:00:12 +0100 Subject: [PATCH] added police effect --- HCTasmota.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/HCTasmota.js b/HCTasmota.js index a891b2a..5d5e27c 100644 --- a/HCTasmota.js +++ b/HCTasmota.js @@ -86,6 +86,7 @@ class HCTasmota extends HCColorLamp { { name: "Color Cycle Down FAST", id: "scheme-3-fast" }, { name: "Color Cycle Random SLOW", id: "scheme-4-slow" }, { name: "Color Cycle Random FAST", id: "scheme-4-fast" }, + { name: "Police", id: "police" }, ]; } @@ -210,6 +211,16 @@ class HCTasmota extends HCColorLamp { [0, 0, 255], ], 800, this._sendCommand.bind(this)); + return this._effect.init().then(() => { + return this._stepEffect(); + }); + case "police": + futureState.effect = id; + this._effect = new ColorJumpEffect([ + [255, 0, 0], + [0, 0, 255], + ], 300, this._sendCommand.bind(this)); + return this._effect.init().then(() => { return this._stepEffect(); });