Skip to content

Commit

Permalink
Add GE 45856 light switch (#197)
Browse files Browse the repository at this point in the history
* Add GE 45856 light switch

Only supports on/off - device also reports elecrical usage,
but not supported yet.

* Update devices.js
  • Loading branch information
mgsb authored and Koenkk committed Jan 6, 2019
1 parent 3258e7b commit f18f9df
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,25 @@ const devices = [
execute(device, actions, callback);
},
},
{
zigbeeModel: ['45856'],
model: '45856GE',
vendor: 'GE',
description: 'In-wall smart switch',
supports: 'on/off',
fromZigbee: [fz.ignore_onoff_change, fz.generic_state],
toZigbee: [tz.on_off, tz.ignore_transition],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
];

execute(device, actions, callback);
},
},
{
zigbeeModel: ['45857'],
model: '45857GE',
Expand Down

0 comments on commit f18f9df

Please sign in to comment.