Skip to content

Commit

Permalink
fix: Fix no action on color wheel for Sunricher ZG2858A Koenkk/zigbee…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed May 5, 2024
1 parent 04a1def commit 987343c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/converters/fromZigbee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,22 @@ const converters1 = {
return payload;
},
} satisfies Fz.Converter,
command_move_to_hue_and_saturation: {
cluster: 'lightingColorCtrl',
type: 'commandMoveToHueAndSaturation',
convert: (model, msg, publish, options, meta) => {
if (hasAlreadyProcessedMessage(msg, model)) return;
const payload = {
action: postfixWithEndpointName(`move_to_hue_and_saturation`, msg, model, meta),
action_hue: msg.data.hue,
action_saturation: msg.data.saturation,
action_transition_time: msg.data.transtime,
};

addActionGroup(payload, msg, model);
return payload;
},
} satisfies Fz.Converter,
command_step_hue: {
cluster: 'lightingColorCtrl',
type: ['commandStepHue'],
Expand Down
2 changes: 1 addition & 1 deletion src/devices/sunricher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const definitions: Definition[] = [
description: 'Zigbee handheld remote RGBCCT 3 channels',
fromZigbee: [fz.battery, fz.command_move_to_color, fz.command_move_to_color_temp, fz.command_move_hue,
fz.command_step, fz.command_recall, fz.command_on, fz.command_off, fz.command_toggle, fz.command_stop,
fz.command_move, fz.command_color_loop_set, fz.command_ehanced_move_to_hue_and_saturation],
fz.command_move, fz.command_color_loop_set, fz.command_ehanced_move_to_hue_and_saturation, fz.command_move_to_hue_and_saturation],
exposes: [e.battery(), e.action([
'color_move', 'color_temperature_move', 'hue_move', 'brightness_step_up', 'brightness_step_down',
'recall_*', 'on', 'off', 'toggle', 'brightness_stop', 'brightness_move_up', 'brightness_move_down',
Expand Down

0 comments on commit 987343c

Please sign in to comment.