Skip to content

Commit

Permalink
Update battery cfg for TRADFRI wireless dimmer. Koenkk/zigbee2mqtt#792
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jan 14, 2019
1 parent 2e575ef commit 39e0d04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,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: seconds.ONE_DAY, repChange: 0,
};

const actions = [
(cb) => device.bind('genLevelCtrl', coordinator, cb),
(cb) => device.bind('genPowerCfg', coordinator, cb),
(cb) => device.report('genPowerCfg', 'batteryPercentageRemaining', 0, seconds.ONE_DAY, 0, cb),
(cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb),
];
execute(device, actions, callback);
},
Expand Down

0 comments on commit 39e0d04

Please sign in to comment.