diff --git a/lib/exposes.js b/lib/exposes.js index dcfb23966ae89..308b543039ee2 100644 --- a/lib/exposes.js +++ b/lib/exposes.js @@ -84,13 +84,13 @@ class Lock extends Base { withState(property, valueOn, valueOff, description, access=a.ALL) { assert(!this.endpoint, 'Cannot add feature after adding endpoint'); - this.features.push(new Binary('state', access, valueOn, valueOff).withProperty(property).withDescription(description)); + this.features.push(new Binary(property, access, valueOn, valueOff).withProperty(property).withDescription(description)); return this; } withLockState(property, description) { assert(!this.endpoint, 'Cannot add feature after adding endpoint'); - this.features.push(new Enum('lock_state', access.STATE, ['not_fully_locked', 'locked', 'unlocked']).withProperty(property).withDescription(description)); + this.features.push(new Enum(property, access.STATE, ['not_fully_locked', 'locked', 'unlocked']).withProperty(property).withDescription(description)); return this; } }