Skip to content

Commit 0ec2820

Browse files
authored
Merge pull request #306 from tim-hellhake/add-door-sensor-support
Add DoorSensor support
2 parents 7bd74e8 + ea390f0 commit 0ec2820

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/zigbee2mqtt/zigbee2mqtt-property.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ export class Zigbee2MqttProperty<T extends PropertyValue> extends Property<T> {
151151
this.setAtType('SmokeProperty');
152152
break;
153153
}
154+
case 'contact': {
155+
device['@type'].push('DoorSensor');
156+
this.setTitle('Open');
157+
this.setAtType('OpenProperty');
158+
break;
159+
}
154160
}
155161
}
156162

0 commit comments

Comments
 (0)