Skip to content

Commit

Permalink
Add power_on_behavior for MOES MS-104Z (Koenkk#2921)
Browse files Browse the repository at this point in the history
  • Loading branch information
nklebedev authored and z-x-f committed Aug 19, 2021
1 parent 4ec0db5 commit 68f1f6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devices/moes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ module.exports = [
model: 'MS-104Z',
description: 'Smart light switch module (1 gang)',
vendor: 'Moes',
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior]),
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior]),
extend: extend.switch(),
exposes: [e.switch(),
exposes.enum('power_on_behavior', ea.ALL, ['on', 'off', 'previous'])
.withDescription('Controls the behaviour when the device is powered on')],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
Expand Down

0 comments on commit 68f1f6a

Please sign in to comment.