Skip to content

Commit

Permalink
feat(add): E2201 (#5964)
Browse files Browse the repository at this point in the history
* Add new device: IKEA RODRET E2201

* removed comments from template

* removed unneccessary actions from E2201 RODRET
added genPollCtrl bind

* E2201: removed typo

* squashed one more copy paste typo

* no more trailing commas

* added back trailing comma
  • Loading branch information
lorenzspenger authored Jul 13, 2023
1 parent ac5e430 commit 3440313
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/devices/ikea.js
Original file line number Diff line number Diff line change
Expand Up @@ -1207,4 +1207,23 @@ module.exports = [
await reporting.batteryVoltage(endpoint1);
},
},
{
zigbeeModel: ['RODRET Dimmer'],
model: 'E2201',
vendor: 'IKEA',
description: 'RODRET wireless dimmer/power switch',
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_move, fz.command_stop],
toZigbee: [tz.battery_percentage_remaining],
exposes: [
e.battery().withAccess(ea.STATE_GET),
e.action(['on', 'off', 'brightness_move_down', 'brightness_move_up', 'brightness_stop']),
],
ota: ota.tradfri,
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
const binds = ['genOnOff', 'genLevelCtrl', 'genPollCtrl'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.batteryPercentageRemaining(endpoint);
},
},
];

0 comments on commit 3440313

Please sign in to comment.