homebridge-gpio-electic-rim-lock 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -24,7 +24,11 @@ function ElecticRimLockAccessory(log, config) {
24
24
  this.version = require('./package.json').version;
25
25
  this.lastLockTargetState = 1;
26
26
 
27
- if (!this.pin) throw new Error("You must provide a config value for pin.");
27
+ if (!this.name || !this.pin) {
28
+ this.log.warn("You must provide a valid config value for name and pin.");
29
+ this.disabled = true;
30
+ return;
31
+ }
28
32
  if (this.duration == null || this.duration % 1 != 0) this.duration = 500;
29
33
  this.log("Tiro GPIO version: " + this.version);
30
34
  this.log("Switch pin: " + this.pin);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-gpio-electic-rim-lock",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Homebridge plugin to open electric rim locks via Raspberry Pi GPIO pins",
5
5
  "main": "index.js",
6
6
  "scripts": {