From 473f19f0973e6249594d721568fca900c23886df Mon Sep 17 00:00:00 2001 From: Cyril Beslay Date: Mon, 29 Jan 2024 20:56:40 +0100 Subject: [PATCH] Changing fast blink to 200ms --- server/lib/scene/scene.actions.js | 4 ++-- .../lib/scene/actions/scene.action.blinkLights.test.js | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/server/lib/scene/scene.actions.js b/server/lib/scene/scene.actions.js index 16c5886da1..eca32b7bfb 100644 --- a/server/lib/scene/scene.actions.js +++ b/server/lib/scene/scene.actions.js @@ -121,10 +121,10 @@ const actionsFunc = { blinkingInterval = 500; break; case 'fast': - blinkingInterval = 100; + blinkingInterval = 200; break; default: - blinkingInterval = 100; + blinkingInterval = 200; break; } await Promise.map(action.devices, async (deviceSelector) => { diff --git a/server/test/lib/scene/actions/scene.action.blinkLights.test.js b/server/test/lib/scene/actions/scene.action.blinkLights.test.js index 5d46abbb8b..1f94293d5d 100644 --- a/server/test/lib/scene/actions/scene.action.blinkLights.test.js +++ b/server/test/lib/scene/actions/scene.action.blinkLights.test.js @@ -94,7 +94,6 @@ describe('scene.blink-lights', () => { clock.tick(2000); assert.calledWithExactly(device.setValue, device, deviceFeature, 0); assert.calledWithExactly(device.setValue, device, deviceFeature, 1); - // 2 seconds * 2 blinks / sec * on/off + 1 restore assert.callCount(device.setValue, 4); }); @@ -134,8 +133,7 @@ describe('scene.blink-lights', () => { clock.tick(2000); assert.calledWithExactly(device.setValue, device, deviceFeature, 0); assert.calledWithExactly(device.setValue, device, deviceFeature, 1); - // 2 seconds * 10 blinks / sec * on/off + 1 restore - assert.callCount(device.setValue, 20); + assert.callCount(device.setValue, 10); }); it('should blink light in unknown mode', async () => { @@ -174,8 +172,7 @@ describe('scene.blink-lights', () => { clock.tick(2000); assert.calledWithExactly(device.setValue, device, deviceFeature, 0); assert.calledWithExactly(device.setValue, device, deviceFeature, 1); - // 2 seconds * 10 blinks / sec * on/off + 1 restore - assert.callCount(device.setValue, 20); + assert.callCount(device.setValue, 10); }); it('should throw error when blinking light', async () => {