Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-delay-switch

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-delay-switch - npm Package Compare versions

Comparing version 2.1.5 to 2.2.0

4

index.js

@@ -19,2 +19,3 @@

this.disableSensor = config['disableSensor'] || false;
this.startOnReboot = config['startOnReboot'] || false;
this.timer;

@@ -41,2 +42,5 @@ this.switchOn = false;

.on('set', this.setOn.bind(this));
if (this.startOnReboot)
this.switchService.setCharacteristic(Characteristic.On, true)

@@ -43,0 +47,0 @@ var services = [informationService, this.switchService]

2

package.json
{
"name": "homebridge-delay-switch",
"version": "2.1.5",
"version": "2.2.0",
"description": "Delay switches for Homebridge: https://github.com/nfarina/homebridge",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -29,4 +29,5 @@ <img src="branding/hoobs_homebridge_delayswitch.svg" width="700px">

"name": "DelaySwitch",
"delay": 5000,
"disableSensor": false,
"delay": 5000
"startOnReboot": false
}

@@ -37,5 +38,14 @@ ]

| Parameter | Description | Required | Default | type |
| -------------------------------- | --------------------------- |:--------:|:--------:|:--------:|
| `accessory` | always `"DelaySwitch"` | ✓ | - | String |
| `name` | Name for your accessory | ✓ | - | String |
| `delay` | Delay/Timer in milliseconds |     ✓ | - | Integer |
| `disableSensor` | Remove the Motion Sensor | | `false` | Boolean |
| `startOnReboot`       | When set to `true`, the switch will be turned ON and start the timer when HomeBridge restarts |       | `false` | Boolean |
## Why do we need this plugin?
The most common use of this plugin is to turn ON/OFF lights based on a motion/door sensor. This can be achieved by setting an automation to turn ON a lightand the delay switch when motion is detected and turn OFF the light when the dedicated delay motion sensor is triggers (or delay switch is turned OFF).
The most common use of this plugin is to turn ON/OFF lights based on a motion/door sensor. This can be achieved by setting an automation to turn ON a light and the delay switch when motion is detected and turn OFF the light when the dedicated delay motion sensor is triggered (or delay switch is turned OFF).

@@ -58,6 +68,6 @@

## Why Adding Motion Sensor?
## Why Add a Motion Sensor?
A Motion sensor is created for each accessory in order to be able to cancel the timer and the attached automations.
How it works? you can set the automation to be triggered from the motion sensor instead of the switch OFF command and therefore you can turn OFF the switch and prevent the motion sensor from being triggered or any attached automations.
How does it works? You can set the automation to be triggered from the motion sensor instead of the switch OFF command and therefore you can turn OFF the switch and prevent the motion sensor from being triggered or any attached automations.
If you have no use of the sensor you can remove it by adding `"disableSensor": true` to your config.

@@ -64,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc