mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-05 14:23:12 +01:00
adde MAX ShutterContact
This commit is contained in:
@@ -602,6 +602,10 @@ FHEMAccessory(log, connection, s, activity_name) {
|
|||||||
} else if( s.Internals.TYPE == 'CUL_FHTTK' ) {
|
} else if( s.Internals.TYPE == 'CUL_FHTTK' ) {
|
||||||
this.mappings.contact = { reading: 'Window' };
|
this.mappings.contact = { reading: 'Window' };
|
||||||
|
|
||||||
|
} else if( s.Internals.TYPE == 'MAX'
|
||||||
|
&& s.Internals.type == 'ShutterContact' ) {
|
||||||
|
this.mappings.contact = { reading: 'state' };
|
||||||
|
|
||||||
} else if( s.Attributes.subType == 'threeStateSensor' ) {
|
} else if( s.Attributes.subType == 'threeStateSensor' ) {
|
||||||
this.mappings.contact = { reading: 'contact' };
|
this.mappings.contact = { reading: 'contact' };
|
||||||
|
|
||||||
@@ -921,6 +925,10 @@ FHEMAccessory.prototype = {
|
|||||||
|
|
||||||
if( value == 'off' )
|
if( value == 'off' )
|
||||||
value = 0;
|
value = 0;
|
||||||
|
else if( value == 'opened' )
|
||||||
|
value = Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
|
||||||
|
else if( value == 'closed' )
|
||||||
|
value = Characteristic.ContactSensorState.CONTACT_DETECTED;
|
||||||
else if( value == 'present' )
|
else if( value == 'present' )
|
||||||
value = Characteristic.OccupancyDetected.OCCUPANCY_DETECTED;
|
value = Characteristic.OccupancyDetected.OCCUPANCY_DETECTED;
|
||||||
else if( value == 'absent' )
|
else if( value == 'absent' )
|
||||||
|
|||||||
Reference in New Issue
Block a user