Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New device types added #22

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open

New device types added #22

wants to merge 99 commits into from

Conversation

clooka
Copy link

@clooka clooka commented Mar 18, 2021

Hi, I've added new devices type.

		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;
	}

index.js.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants