homebridge-delay-switch
Advanced tools
Comparing version 2.1.5 to 2.2.0
@@ -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] |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54330
111
87