Skip to content

Commit

Permalink
fix: Fix IKEA E1524/E1810 and E2001/E2002 right/left hold action not …
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed May 5, 2024
1 parent 7fc3276 commit 4fc2717
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/ikea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,16 @@ export function ikeaArrowClick(args?: {styrbar: boolean}): ModernExtend {
return {action: `arrow_${direction}_click`};
},
},
{
cluster: 'genScenes',
type: 'commandTradfriArrowHold',
convert: (model, msg, publish, options, meta) => {
if (hasAlreadyProcessedMessage(msg, model)) return;
const direction = msg.data.value === 3329 ? 'left' : 'right';
globalStore.putValue(msg.endpoint, 'direction', direction);
return {action: `arrow_${direction}_hold`};
},
},
{
cluster: 'genScenes',
type: 'commandTradfriArrowRelease',
Expand Down

0 comments on commit 4fc2717

Please sign in to comment.