Skip to content

Commit

Permalink
Add battery support and fix model. Koenkk/zigbee2mqtt#997
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Feb 9, 2019
1 parent 83707de commit 5be1e7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ const devices = [
toZigbee: [],
},
{
zigbeeModel: ['TRADFRI ON/OFF Switch'],
zigbeeModel: ['TRADFRI on/off switch'],
model: 'E1743',
vendor: 'IKEA',
description: 'TRADFRI ON/OFF switch',
Expand All @@ -590,8 +590,14 @@ const devices = [
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfg = {
direction: 0, attrId: 33, dataType: 32, minRepIntval: 0, maxRepIntval: repInterval.MAX, repChange: 0,
};

const actions = [
(cb) => device.bind('genOnOff', coordinatorGroup, cb),
(cb) => device.bind('genPowerCfg', coordinator, cb),
(cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb),
];

execute(device, actions, callback);
Expand Down

0 comments on commit 5be1e7d

Please sign in to comment.