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(); });