New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-abode

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-abode - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

1

.eslintrc.json

@@ -158,3 +158,2 @@ {

"quote-props": [2, "as-needed"],
"quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"semi": [2, "always"],

@@ -161,0 +160,0 @@ "sort-vars": 0,

46

index.js

@@ -1,2 +0,2 @@

'use strict';
/* 'use strict';

@@ -45,1 +45,45 @@ var Service;

};
*/
var Service;
var Characteristic;
module.exports = function (homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
homebridge.registerAccessory("homebridge-fakebulb", "FakeBulb", FakeBulbAccessory);
};
function FakeBulbAccessory(log, config) {
this.log = log;
this.name = config.name;
this.bulbName = config.bulb_name || this.name; // fallback to "name" if you didn't specify an exact "bulb_name"
this.binaryState = 0; // bulb state, default is OFF
this.log("Starting a fake bulb device with name '" + this.bulbName + "'...");
// this.search();
}
FakeBulbAccessory.prototype.getPowerOn = function (callback) {
var powerOn = this.binaryState > 0;
this.log("Power state for the '%s' is %s", this.bulbName, this.binaryState);
callback(null, powerOn);
};
FakeBulbAccessory.prototype.setPowerOn = function (powerOn, callback) {
this.binaryState = powerOn ? 1 : 0; // wemo langauge
this.log("Set power state on the '%s' to %s", this.bulbName, this.binaryState);
callback(null);
};
FakeBulbAccessory.prototype.getServices = function () {
var lightbulbService = new Service.Lightbulb(this.name);
lightbulbService
.getCharacteristic(Characteristic.On)
.on('get', this.getPowerOn.bind(this))
.on('set', this.setPowerOn.bind(this));
return [lightbulbService];
};
{
"name": "homebridge-abode",
"version": "0.0.4",
"version": "0.0.5",
"description": "Abode Plugin for homebridge",

@@ -5,0 +5,0 @@ "scripts": {

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