if (accessory.accessory == 'MHOutlet') this.devices.push(new MHRelay(this.log, accessory));
if (accessory.accessory == 'MHOutletFan') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletFanv2') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletDoorbell') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletGarageDoorOpener') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletHeaterCooler') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletHumidifierDehumidifier') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletSpeaker') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletSwitch') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletValve') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletWindowCovering') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHOutletWindow') this.devices.push(new MHRelay(this.log,accessory))
if (accessory.accessory == 'MHButton') this.devices.push(new MHButton(this.log,accessory))
if (accessory.accessory == 'MHTimedRelay') this.devices.push(new MHTimedRelay(this.log, accessory));
switch (this.config.accessory) {
case 'MHOutlet':
this.lightBulbService = new Service.Outlet(this.name);
break;
case 'MHOutletFan':
this.lightBulbService = new Service.Fan(this.name);
break;
case 'MHOutletFanv2':
this.lightBulbService = new Service.Fanv2(this.name);
break;
case 'MHOutletDoorbell':
this.lightBulbService = new Service.Doorbell(this.name);
break;
case 'MHOutletGarageDoorOpener':
this.lightBulbService = new Service.GarageDoorOpener(this.name);
break;
case 'MHOutletHeaterCooler':
this.lightBulbService = new Service.HeaterCooler(this.name);
break;
case 'MHOutletHumidifierDehumidifier':
this.lightBulbService = new Service.HumidifierDehumidifier(this.name);
break;
case 'MHOutletSpeaker':
this.lightBulbService = new Service.Speaker(this.name);
break;
case 'MHOutletSwitch':
this.lightBulbService = new Service.Switch(this.name);
break;
case 'MHOutletValve':
this.lightBulbService = new Service.Valve(this.name);
break;
case 'MHOutletWindow':
this.lightBulbService = new Service.Window(this.name);
break;
case 'MHOutletWindowCovering':
this.lightBulbService = new Service.WindowCovering(this.name);
break;
default:
this.lightBulbService = new Service.Lightbulb(this.name);
break;
}
Hi, I've added new devices type.
index.js.zip