added police effect

This commit is contained in:
Jan Scheiper 2020-02-20 23:00:12 +01:00
parent 07646b952a
commit a1264913ec

View File

@ -86,6 +86,7 @@ class HCTasmota extends HCColorLamp {
{ name: "Color Cycle Down FAST", id: "scheme-3-fast" }, { name: "Color Cycle Down FAST", id: "scheme-3-fast" },
{ name: "Color Cycle Random SLOW", id: "scheme-4-slow" }, { name: "Color Cycle Random SLOW", id: "scheme-4-slow" },
{ name: "Color Cycle Random FAST", id: "scheme-4-fast" }, { name: "Color Cycle Random FAST", id: "scheme-4-fast" },
{ name: "Police", id: "police" },
]; ];
} }
@ -210,6 +211,16 @@ class HCTasmota extends HCColorLamp {
[0, 0, 255], [0, 0, 255],
], 800, this._sendCommand.bind(this)); ], 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._effect.init().then(() => {
return this._stepEffect(); return this._stepEffect();
}); });