Skip to content

Commit

Permalink
Changing fast blink to 200ms
Browse files Browse the repository at this point in the history
  • Loading branch information
cicoub13 committed Jan 29, 2024
1 parent fdff7ed commit 473f19f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions server/lib/scene/scene.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit 473f19f

Please sign in to comment.