Skip to content

Commit

Permalink
fix: Fix get_list for HEIMAN HS2IRC Koenkk/zigbee2mqtt#20250
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Dec 17, 2023
1 parent 40d04a8 commit 348937e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/converters/toZigbee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4045,7 +4045,6 @@ const converters2 = {
heiman_ir_remote: {
key: ['send_key', 'create', 'learn', 'delete', 'get_list'],
convertSet: async (entity, key, value, meta) => {
utils.assertObject(value);
const options = {
// Don't send a manufacturerCode (otherwise set in herdsman):
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/2827
Expand All @@ -4055,17 +4054,21 @@ const converters2 = {
};
switch (key) {
case 'send_key':
utils.assertObject(value);
await entity.command('heimanSpecificInfraRedRemote', 'sendKey',
{id: value['id'], keyCode: value['key_code']}, options);
break;
case 'create':
utils.assertObject(value);
await entity.command('heimanSpecificInfraRedRemote', 'createId', {modelType: value['model_type']}, options);
break;
case 'learn':
utils.assertObject(value);
await entity.command('heimanSpecificInfraRedRemote', 'studyKey',
{id: value['id'], keyCode: value['key_code']}, options);
break;
case 'delete':
utils.assertObject(value);
await entity.command('heimanSpecificInfraRedRemote', 'deleteKey',
{id: value['id'], keyCode: value['key_code']}, options);
break;
Expand Down

0 comments on commit 348937e

Please sign in to comment.