Added ContactSensor
This commit is contained in:
1 parent
9c360dff2d
commit
a8c5b1b9e6
2 files changed
+72
No files matched your search
@@ -18,6 +18,7 @@ import { Lightbulb } from './Accessories/Lightbulb';
|
||||
import { TemperatureSensor } from './Accessories/TemperatureSensor';
|
||||
import { Thermostat } from './Accessories/Thermostat';
|
||||
import { WindowCovering } from './Accessories/WindowCovering';
|
||||
import { ContactSensor } from './Accessories/ContactSensor';
|
||||
|
||||
function uncapitalizeKeys(obj): Record<string, unknown> {
|
||||
function isObject(o: unknown): boolean {
|
||||
@@ -89,6 +90,11 @@ export class SmartHomeNGPlatform implements StaticPlatformPlugin {
|
||||
devices.push(new MotionSensor(this, accessory));
|
||||
break;
|
||||
|
||||
// Contact sensor
|
||||
case 'contactsensor':
|
||||
devices.push(new ContactSensor(this, accessory));
|
||||
break;
|
||||
|
||||
// Switch
|
||||
case 'switch':
|
||||
devices.push(new Switch(this, accessory));
|
||||
|
||||
Reference in new issue
Block a user