Power Management

UUID: 00000221-0000-1000-8000-0026BB765291

Required Characteristics

Example

Note

The example below is automatically generated and may not be a complete example of what is required to create a working "Power Management" Homebridge plugin.
// Example Power Management Plugin

module.exports = (api) => {
  api.registerAccessory('ExamplePowerManagementPlugin', ExamplePowerManagementAccessory);
};

class ExamplePowerManagementAccessory {

  constructor(log, config, api) {
      this.log = log;
      this.config = config;
      this.api = api;

      this.Service = this.api.hap.Service;
      this.Characteristic = this.api.hap.Characteristic;

      // extract name from config
      this.name = config.name;

      // create a new Power Management service
      this.service = new this.Service(this.Service.PowerManagement);

      // create handlers for required characteristics

  }


}