From bb2e37aa91061212a1d363efbca7f74564e5acf2 Mon Sep 17 00:00:00 2001 From: Jorge Schrauwen Date: Mon, 29 May 2023 14:08:33 +0200 Subject: [PATCH] fix: extend should pass options.supportsHueSaturation to meta.supportsHueSaturation --- src/lib/extend.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/extend.js b/src/lib/extend.js index 4b0f25c1fe4a5..bb3dbc944bf66 100644 --- a/src/lib/extend.js +++ b/src/lib/extend.js @@ -88,6 +88,7 @@ const extend = { const toZigbee = [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move, tz.light_brightness_step, tz.level_config, tz.light_hue_saturation_move, ...options.toZigbee, tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])]; + const meta = {supportsHueAndSaturation: options.supportsHueAndSaturation}; if (!options.disablePowerOnBehavior) { exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous'])); @@ -95,7 +96,7 @@ const extend = { toZigbee.push(tz.power_on_behavior); } - const result = {exposes, fromZigbee, toZigbee}; + const result = {exposes, fromZigbee, toZigbee, meta}; if (!options.noConfigure) { result.configure = async (device, coordinatorEndpoint, logger) => { await light.configure(device, coordinatorEndpoint, logger, false); @@ -120,6 +121,7 @@ const extend = { tz.light_colortemp_move, tz.light_brightness_step, tz.light_colortemp_step, tz.light_hue_saturation_move, tz.light_hue_saturation_step, tz.light_colortemp_startup, tz.level_config, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : []), ...options.toZigbee]; + const meta = {supportsHueAndSaturation: options.supportsHueAndSaturation}; if (options.disableColorTempStartup) { exposes[0].removeFeature('color_temp_startup'); @@ -132,7 +134,7 @@ const extend = { toZigbee.push(tz.power_on_behavior); } - const result = {exposes, fromZigbee, toZigbee}; + const result = {exposes, fromZigbee, toZigbee, meta}; if (!options.noConfigure) { result.configure = async (device, coordinatorEndpoint, logger) => { await light.configure(device, coordinatorEndpoint, logger, true);