From 063d643dc33f74a8114edc08e59ef54ce1a6f00e Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 15:04:27 +0100 Subject: [PATCH 01/10] added Hue Power-on Converter tested with GU10. needs Firmware 1.46 hue_power_on_behavior // default / enable / disable / configure hue_power_on_behavior, // default = 1 // on - lamps on after power loss with configured brightness, color temperature, color // off - lamps off after power loss // recover - lamps on after power loss with last state hue_power_on_brightness // brightness when hue_power_on_behavior = on, same settings as brightness converter // default = 255 hue_power_on_color_temperature // color temperature when hue_power_on_behavior = on, same settings as colortemp converter // default = 366 to-do: hue_power_on_color (must be added by someone with appropriate bulb) --- converters/toZigbee.js | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/converters/toZigbee.js b/converters/toZigbee.js index 2fe3d0084e955..7f1983ef18c61 100644 --- a/converters/toZigbee.js +++ b/converters/toZigbee.js @@ -90,6 +90,73 @@ const converters = { }; } }, + }, + hue_power_on_behavior: { + key: ['power_on_behavior'], + convert: (key, value, message, type) => { + const lookup = { + 'default': 0x01, + 'on': 0x01, + 'off': 0x00, + 'recover': 0xff, + }; + + if (type === 'set') { + return { + cid: 'genOnOff', + cmd: 'write', + cmdType: 'foundation', + zclData: [{ + attrId: 0x4003, + dataType: 0x30, + attrData: lookup[value], + }], + cfg: cfg.default, + }; + } + }, + }, + hue_power_on_brightness: { + key: ['hue_power_on_brightness'], + convert: (key, value, message, type) => { + if (type === 'set') { + if (value === 'default') { + value = 255; + }; + return { + cid: 'genLevelCtrl', + cmd: 'write', + cmdType: 'foundation', + zclData: [{ + attrId: 0x4000, + dataType: 0x20, + attrData: value, + }], + cfg: cfg.default, + }; + } + }, + }, + hue_power_on_color_temperature: { + key: ['hue_power_on_color_temperature'], + convert: (key, value, message, type) => { + if (type === 'set') { + if (value === 'default') { + value = 366; + }; + return { + cid: 'lightingColorCtrl', + cmd: 'write', + cmdType: 'foundation', + zclData: [{ + attrId: 0x4010, + dataType: 0x21, + attrData: value, + }], + cfg: cfg.default, + }; + } + }, }, light_brightness: { key: ['brightness', 'brightness_percent'], From e42b28905cad8ff58acc12ee516561f6b6266803 Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 15:06:04 +0100 Subject: [PATCH 02/10] Update toZigbee.js --- converters/toZigbee.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converters/toZigbee.js b/converters/toZigbee.js index 7f1983ef18c61..4f1f62a90e3d6 100644 --- a/converters/toZigbee.js +++ b/converters/toZigbee.js @@ -91,7 +91,7 @@ const converters = { } }, }, - hue_power_on_behavior: { + hue_power_on_behavior: { key: ['power_on_behavior'], convert: (key, value, message, type) => { const lookup = { @@ -100,7 +100,7 @@ const converters = { 'off': 0x00, 'recover': 0xff, }; - + if (type === 'set') { return { cid: 'genOnOff', From 716fb4739e9c713a7bfdad4a9dc9b800bf17a179 Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 15:21:24 +0100 Subject: [PATCH 03/10] Hue specific settings generic hue settings with power-on converter --- devices.js | 155 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 95 insertions(+), 60 deletions(-) diff --git a/devices.js b/devices.js index d2a1e6c40739c..446b2ed235049 100644 --- a/devices.js +++ b/devices.js @@ -34,6 +34,41 @@ const generic = { }, }; +const hue = { + light_onoff_brightness: { + supports: 'on/off, brightness, power-on behavior', + fromZigbee: [fz.light_brightness, fz.light_state], + toZigbee: [ + tz.on_off, tz.light_brightness, tz.ignore_transition, tz.light_alert, tz.hue_power_on_behavior, + tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, + ], + }, + light_onoff_brightness_colortemp: { + supports: 'on/off, brightness, color temperature, power-on behavior', + fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], + toZigbee: [ + tz.on_off, tz.light_brightness, tz.light_colortemp, tz.ignore_transition, tz.light_alert, + tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, + ], + }, + light_onoff_brightness_colorxy: { + supports: 'on/off, brightness, color xy, power-on behavior', + fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], + toZigbee: [ + tz.on_off, tz.light_brightness, tz.light_color, tz.ignore_transition, tz.light_alert, + tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, + ], + }, + light_onoff_brightness_colortemp_colorxy: { + supports: 'on/off, brightness, color temperature, color xy, power-on behavior', + fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], + toZigbee: [ + tz.on_off, tz.light_brightness, tz.light_colortemp, tz.light_color, tz.ignore_transition, + tz.light_alert, tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, + ], + }, +}; + const foundationCfg = {manufSpec: 0, disDefaultRsp: 0}; const execute = (device, actions, callback, delay) => { @@ -576,180 +611,180 @@ const devices = [ model: '7299760PH', vendor: 'Philips', description: 'Hue Bloom', - supports: generic.light_onoff_brightness_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, }, { zigbeeModel: ['LLC020'], model: '7146060PH', vendor: 'Philips', description: 'Hue Go', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LWB004'], model: '433714', vendor: 'Philips', description: 'Hue Lux A19 bulb E27', - supports: generic.light_onoff_brightness.supports, - fromZigbee: generic.light_onoff_brightness.fromZigbee, - toZigbee: generic.light_onoff_brightness.toZigbee, + supports: hue.light_onoff_brightness.supports, + fromZigbee: hue.light_onoff_brightness.fromZigbee, + toZigbee: hue.light_onoff_brightness.toZigbee, }, { zigbeeModel: ['LWB006', 'LWB014'], model: '9290011370', vendor: 'Philips', description: 'Hue white A60 bulb E27', - supports: generic.light_onoff_brightness.supports, - fromZigbee: generic.light_onoff_brightness.fromZigbee, - toZigbee: generic.light_onoff_brightness.toZigbee, + supports: hue.light_onoff_brightness.supports, + fromZigbee: hue.light_onoff_brightness.fromZigbee, + toZigbee: hue.light_onoff_brightness.toZigbee, }, { zigbeeModel: ['LWB010'], model: '8718696449691', vendor: 'Philips', description: 'Hue White Single bulb B22', - supports: generic.light_onoff_brightness.supports, - fromZigbee: generic.light_onoff_brightness.fromZigbee, - toZigbee: generic.light_onoff_brightness.toZigbee, + supports: hue.light_onoff_brightness.supports, + fromZigbee: hue.light_onoff_brightness.fromZigbee, + toZigbee: hue.light_onoff_brightness.toZigbee, }, { zigbeeModel: ['LST001'], model: '7299355PH', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip', - supports: generic.light_onoff_brightness_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, }, { zigbeeModel: ['LST002'], model: '915005106701', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip plus', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LCT001', 'LCT007', 'LCT010', 'LCT012', 'LCT014', 'LCT015', 'LCT016'], model: '9290012573A', vendor: 'Philips', description: 'Hue white and color ambiance E26/E27/E14', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LCT002'], model: '9290002579A', vendor: 'Philips', description: 'Hue white and color ambiance BR30', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LCT003'], model: '8718696485880', vendor: 'Philips', description: 'Hue white and color ambiance GU10', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LCT024'], model: '915005733701', vendor: 'Philips', description: 'Hue White and color ambiance Play Lightbar', - supports: generic.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colortemp_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, }, { zigbeeModel: ['LTW011'], model: '464800', vendor: 'Philips', description: 'Hue white ambiance BR30 flood light', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTW012'], model: '8718696695203', vendor: 'Philips', description: 'Hue white ambiance E14', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTW013'], model: '8718696598283', vendor: 'Philips', description: 'Hue white ambiance GU10', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTW010', 'LTW001', 'LTW004'], model: '8718696548738', vendor: 'Philips', description: 'Hue white ambiance E26/E27', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTC001'], model: '3261030P7', vendor: 'Philips', description: 'Hue Being', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTC003'], model: '3261331P7', vendor: 'Philips', description: 'Hue white ambiance Still', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTC015'], model: '3216331P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle rectangle panel light', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LTC016'], model: '3216431P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle round panel light', - supports: generic.light_onoff_brightness_colortemp.supports, - fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: generic.light_onoff_brightness_colortemp.toZigbee, + supports: hue.light_onoff_brightness_colortemp.supports, + fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, }, { zigbeeModel: ['LLC010'], model: '7199960PH', vendor: 'Philips', description: 'Hue Iris', - supports: generic.light_onoff_brightness_colorxy.supports, - fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: generic.light_onoff_brightness_colorxy.toZigbee, + supports: hue.light_onoff_brightness_colorxy.supports, + fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, + toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, }, { zigbeeModel: ['RWL020', 'RWL021'], From 692ff804c8c64cc35c375a5956f9788cc3c71854 Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 15:41:13 +0100 Subject: [PATCH 04/10] Update toZigbee.js --- converters/toZigbee.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/converters/toZigbee.js b/converters/toZigbee.js index 4f1f62a90e3d6..6a7bf2394162b 100644 --- a/converters/toZigbee.js +++ b/converters/toZigbee.js @@ -95,12 +95,12 @@ const converters = { key: ['power_on_behavior'], convert: (key, value, message, type) => { const lookup = { - 'default': 0x01, - 'on': 0x01, + 'default': 0x01, + 'on': 0x01, 'off': 0x00, 'recover': 0xff, }; - + if (type === 'set') { return { cid: 'genOnOff', @@ -120,9 +120,9 @@ const converters = { key: ['hue_power_on_brightness'], convert: (key, value, message, type) => { if (type === 'set') { - if (value === 'default') { - value = 255; - }; + if (value === 'default') { + value = 255; + } return { cid: 'genLevelCtrl', cmd: 'write', @@ -141,9 +141,9 @@ const converters = { key: ['hue_power_on_color_temperature'], convert: (key, value, message, type) => { if (type === 'set') { - if (value === 'default') { - value = 366; - }; + if (value === 'default') { + value = 366; + } return { cid: 'lightingColorCtrl', cmd: 'write', From 2c0ab73a7692a4f4d4b2ad21c239546068a5e78e Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 17:20:21 +0100 Subject: [PATCH 05/10] fixed 'null' values as discussed here: https://github.com/Koenkk/zigbee2mqtt/issues/848 --- converters/fromZigbee.js | 130 ++++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 42 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index e4c49e94156de..58d524cc37ec3 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1258,54 +1258,100 @@ const converters = { cid: 'hvacThermostat', type: 'devChange', convert: (model, msg, publish, options) => { - return { - local_temperature: precisionRound(msg.data.data['localTemp'], 2) / 100, - // Signed difference in 0.01 degrees Celsius between the previous temperature setpoint and the new - // temperature setpoint. - local_temperature_calibration: precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10, - // Specifies whether the heated/cooled space is occupied or not. - // If bit 0 = 1, the space is occupied, else it is unoccupied - occupancy: msg.data.data['occupancy'], - occupied_heating_setpoint: precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100, - unoccupied_heating_setpoint: precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100, - // start_of_week: value.start_of_week, // 0x00 = Sunday to 0x06 = Saturday - // number_of_daily_transitions: value.number_of_daily_transitions, - // number_of_weeky_transitions: value.number_of_weeky_transitions, - weekly_schedule: msg.data.data['weeklySchedule'], - // The signed difference in 0.01 degrees Celsius between the previous temperature setpoint and - // the new temperature setpoint. - setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100, - // 0x00 Manual, user-initiated setpoint change via the thermostat - // 0x01 Schedule/internal programming-initiated setpoint change - // 0x02 Externally-initiated setpoint change (e.g., DRLC cluster command, attribute write) - setpoint_change_source: msg.data.data['setpointChangeSource'], - setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp'], - remote_sensing: msg.data.data['remoteSensing'], - control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], - system_mode: msg.data.data['systemMode'], - running_state: msg.data.data['runningState'], - }; + const result = {}; + if (typeof msg.data.data['localTemp'] == 'number') { + result.local_temperature = precisionRound(msg.data.data['localTemp'], 2) / 100; + } + if (typeof msg.data.data['localTemperatureCalibration'] == 'number') { + result.local_temperature_calibration: + precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10; + } + if (typeof msg.data.data['occupancy'] == 'number') { + result.occupancy: msg.data.data['occupancy']; + } + if (typeof msg.data.data['occupiedHeatingSetpoint'] == 'number') { + result.occupied_heating_setpoint: + precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100; + } + if (typeof msg.data.data['unoccupiedHeatingSetpoint'] == 'number') { + result.unoccupied_heating_setpoint: + precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100; + } + if (typeof msg.data.data['weeklySchedule'] == 'number') { + result.weekly_schedule: msg.data.data['weeklySchedule']; + } + if (typeof msg.data.data['setpointChangeAmount'] == 'number') { + result.setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100; + } + if (typeof msg.data.data['setpointChangeSource'] == 'number') { + result.setpoint_change_source: msg.data.data['setpointChangeSource']; + } + if (typeof msg.data.data['setpointChangeSourceTimeStamp'] == 'number') { + result.setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp']; + } + if (typeof msg.data.data['remoteSensing'] == 'number') { + result.remote_sensing: msg.data.data['remoteSensing']; + } + if (typeof msg.data.data['ctrlSeqeOfOper'] == 'number') { + result.control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], + } + if (typeof msg.data.data['systemMode'] == 'number') { + result.system_mode: msg.data.data['systemMode']; + } + if (typeof msg.data.data['runningState'] == 'number') { + result.running_state: msg.data.data['runningState']; + } + return result; }, }, thermostat_att_report: { cid: 'hvacThermostat', type: 'attReport', convert: (model, msg, publish, options) => { - return { - local_temperature: precisionRound(msg.data.data['localTemp'], 2) / 100, - local_temperature_calibration: precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10, - occupancy: msg.data.data['occupancy'], - occupied_heating_setpoint: precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100, - unoccupied_heating_setpoint: precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100, - weekly_schedule: msg.data.data['weeklySchedule'], - setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100, - setpoint_change_source: msg.data.data['setpointChangeSource'], - setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp'], - remote_sensing: msg.data.data['remoteSensing'], - control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], - system_mode: msg.data.data['systemMode'], - running_state: msg.data.data['runningState'], - }; + const result = {}; + if (typeof msg.data.data['localTemp'] == 'number') { + result.local_temperature = precisionRound(msg.data.data['localTemp'], 2) / 100; + } + if (typeof msg.data.data['localTemperatureCalibration'] == 'number') { + result.local_temperature_calibration: + precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10; + } + if (typeof msg.data.data['occupancy'] == 'number') { + result.occupancy: msg.data.data['occupancy']; + } + if (typeof msg.data.data['occupiedHeatingSetpoint'] == 'number') { + result.occupied_heating_setpoint: + precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100; + } + if (typeof msg.data.data['unoccupiedHeatingSetpoint'] == 'number') { + result.unoccupied_heating_setpoint: + precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100; + } + if (typeof msg.data.data['weeklySchedule'] == 'number') { + result.weekly_schedule: msg.data.data['weeklySchedule']; + } + if (typeof msg.data.data['setpointChangeAmount'] == 'number') { + result.setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100; + } + if (typeof msg.data.data['setpointChangeSource'] == 'number') { + result.setpoint_change_source: msg.data.data['setpointChangeSource']; + } + if (typeof msg.data.data['setpointChangeSourceTimeStamp'] == 'number') { + result.setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp']; + } + if (typeof msg.data.data['remoteSensing'] == 'number') { + result.remote_sensing: msg.data.data['remoteSensing']; + } + if (typeof msg.data.data['ctrlSeqeOfOper'] == 'number') { + result.control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], + } + if (typeof msg.data.data['systemMode'] == 'number') { + result.system_mode: msg.data.data['systemMode']; + } + if (typeof msg.data.data['runningState'] == 'number') { + result.running_state: msg.data.data['runningState']; + } + return result; }, }, E1524_toggle: { From 0c7c6883ff3b2de25060bc7e68d6649d73911425 Mon Sep 17 00:00:00 2001 From: Chrischi- Date: Sun, 13 Jan 2019 17:39:36 +0100 Subject: [PATCH 06/10] Update fromZigbee.js --- converters/fromZigbee.js | 132 +++++++++++++-------------------------- 1 file changed, 43 insertions(+), 89 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 58d524cc37ec3..0b8e42dfbcae7 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1258,102 +1258,56 @@ const converters = { cid: 'hvacThermostat', type: 'devChange', convert: (model, msg, publish, options) => { - const result = {}; - if (typeof msg.data.data['localTemp'] == 'number') { - result.local_temperature = precisionRound(msg.data.data['localTemp'], 2) / 100; - } - if (typeof msg.data.data['localTemperatureCalibration'] == 'number') { - result.local_temperature_calibration: - precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10; - } - if (typeof msg.data.data['occupancy'] == 'number') { - result.occupancy: msg.data.data['occupancy']; - } - if (typeof msg.data.data['occupiedHeatingSetpoint'] == 'number') { - result.occupied_heating_setpoint: - precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100; - } - if (typeof msg.data.data['unoccupiedHeatingSetpoint'] == 'number') { - result.unoccupied_heating_setpoint: - precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100; - } - if (typeof msg.data.data['weeklySchedule'] == 'number') { - result.weekly_schedule: msg.data.data['weeklySchedule']; - } - if (typeof msg.data.data['setpointChangeAmount'] == 'number') { - result.setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100; - } - if (typeof msg.data.data['setpointChangeSource'] == 'number') { - result.setpoint_change_source: msg.data.data['setpointChangeSource']; - } - if (typeof msg.data.data['setpointChangeSourceTimeStamp'] == 'number') { - result.setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp']; - } - if (typeof msg.data.data['remoteSensing'] == 'number') { - result.remote_sensing: msg.data.data['remoteSensing']; - } - if (typeof msg.data.data['ctrlSeqeOfOper'] == 'number') { - result.control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], - } - if (typeof msg.data.data['systemMode'] == 'number') { - result.system_mode: msg.data.data['systemMode']; - } - if (typeof msg.data.data['runningState'] == 'number') { - result.running_state: msg.data.data['runningState']; - } - return result; + return { + local_temperature: precisionRound(msg.data.data['localTemp'], 2) / 100, + // Signed difference in 0.01 degrees Celsius between the previous temperature setpoint and the new + // temperature setpoint. + local_temperature_calibration: precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10, + // Specifies whether the heated/cooled space is occupied or not. + // If bit 0 = 1, the space is occupied, else it is unoccupied + occupancy: msg.data.data['occupancy'], + occupied_heating_setpoint: precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100, + unoccupied_heating_setpoint: precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100, + // start_of_week: value.start_of_week, // 0x00 = Sunday to 0x06 = Saturday + // number_of_daily_transitions: value.number_of_daily_transitions, + // number_of_weeky_transitions: value.number_of_weeky_transitions, + weekly_schedule: msg.data.data['weeklySchedule'], + // The signed difference in 0.01 degrees Celsius between the previous temperature setpoint and + // the new temperature setpoint. + setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100, + // 0x00 Manual, user-initiated setpoint change via the thermostat + // 0x01 Schedule/internal programming-initiated setpoint change + // 0x02 Externally-initiated setpoint change (e.g., DRLC cluster command, attribute write) + setpoint_change_source: msg.data.data['setpointChangeSource'], + setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp'], + remote_sensing: msg.data.data['remoteSensing'], + control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], + system_mode: msg.data.data['systemMode'], + running_state: msg.data.data['runningState'], + }; }, }, thermostat_att_report: { cid: 'hvacThermostat', type: 'attReport', convert: (model, msg, publish, options) => { - const result = {}; - if (typeof msg.data.data['localTemp'] == 'number') { - result.local_temperature = precisionRound(msg.data.data['localTemp'], 2) / 100; - } - if (typeof msg.data.data['localTemperatureCalibration'] == 'number') { - result.local_temperature_calibration: - precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10; - } - if (typeof msg.data.data['occupancy'] == 'number') { - result.occupancy: msg.data.data['occupancy']; - } - if (typeof msg.data.data['occupiedHeatingSetpoint'] == 'number') { - result.occupied_heating_setpoint: - precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100; - } - if (typeof msg.data.data['unoccupiedHeatingSetpoint'] == 'number') { - result.unoccupied_heating_setpoint: - precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100; - } - if (typeof msg.data.data['weeklySchedule'] == 'number') { - result.weekly_schedule: msg.data.data['weeklySchedule']; - } - if (typeof msg.data.data['setpointChangeAmount'] == 'number') { - result.setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100; - } - if (typeof msg.data.data['setpointChangeSource'] == 'number') { - result.setpoint_change_source: msg.data.data['setpointChangeSource']; - } - if (typeof msg.data.data['setpointChangeSourceTimeStamp'] == 'number') { - result.setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp']; - } - if (typeof msg.data.data['remoteSensing'] == 'number') { - result.remote_sensing: msg.data.data['remoteSensing']; - } - if (typeof msg.data.data['ctrlSeqeOfOper'] == 'number') { - result.control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], - } - if (typeof msg.data.data['systemMode'] == 'number') { - result.system_mode: msg.data.data['systemMode']; - } - if (typeof msg.data.data['runningState'] == 'number') { - result.running_state: msg.data.data['runningState']; - } - return result; + return { + local_temperature: precisionRound(msg.data.data['localTemp'], 2) / 100, + local_temperature_calibration: precisionRound(msg.data.data['localTemperatureCalibration'], 2) / 10, + occupancy: msg.data.data['occupancy'], + occupied_heating_setpoint: precisionRound(msg.data.data['occupiedHeatingSetpoint'], 2) / 100, + unoccupied_heating_setpoint: precisionRound(msg.data.data['unoccupiedHeatingSetpoint'], 2) / 100, + weekly_schedule: msg.data.data['weeklySchedule'], + setpoint_change_amount: msg.data.data['setpointChangeAmount'] / 100, + setpoint_change_source: msg.data.data['setpointChangeSource'], + setpoint_change_source_timestamp: msg.data.data['setpointChangeSourceTimeStamp'], + remote_sensing: msg.data.data['remoteSensing'], + control_sequence_of_operation: msg.data.data['ctrlSeqeOfOper'], + system_mode: msg.data.data['systemMode'], + running_state: msg.data.data['runningState'], + }; }, - }, +}, E1524_toggle: { cid: 'genOnOff', type: 'cmdToggle', From bea2c331256d77e1965822b4b9bece159e45343a Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 13 Jan 2019 17:43:02 +0100 Subject: [PATCH 07/10] Update fromZigbee.js --- converters/fromZigbee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 0b8e42dfbcae7..e4c49e94156de 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1307,7 +1307,7 @@ const converters = { running_state: msg.data.data['runningState'], }; }, -}, + }, E1524_toggle: { cid: 'genOnOff', type: 'cmdToggle', From 7dc63f328b7cadab89673dd54366508599ca33e4 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 13 Jan 2019 17:48:03 +0100 Subject: [PATCH 08/10] Update toZigbee.js --- converters/toZigbee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/converters/toZigbee.js b/converters/toZigbee.js index 6a7bf2394162b..83575d06bc39b 100644 --- a/converters/toZigbee.js +++ b/converters/toZigbee.js @@ -92,7 +92,7 @@ const converters = { }, }, hue_power_on_behavior: { - key: ['power_on_behavior'], + key: ['hue_power_on_behavior'], convert: (key, value, message, type) => { const lookup = { 'default': 0x01, From 7eb7b749d17d8632018513c69b312c3e68e03196 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 13 Jan 2019 17:57:42 +0100 Subject: [PATCH 09/10] Update devices.js --- devices.js | 117 +++++++++++++++-------------------------------------- 1 file changed, 33 insertions(+), 84 deletions(-) diff --git a/devices.js b/devices.js index 446b2ed235049..07a45884fb8f6 100644 --- a/devices.js +++ b/devices.js @@ -34,38 +34,27 @@ const generic = { }, }; +const tzHuePowerOnBehavior = [tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature]; const hue = { light_onoff_brightness: { - supports: 'on/off, brightness, power-on behavior', - fromZigbee: [fz.light_brightness, fz.light_state], - toZigbee: [ - tz.on_off, tz.light_brightness, tz.ignore_transition, tz.light_alert, tz.hue_power_on_behavior, - tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, - ], + supports: generic.light_onoff_brightness.supports + ', , power-on behavior', + fromZigbee: generic.light_onoff_brightness.fromZigbee, + toZigbee: generic.light_onoff_brightness.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp: { - supports: 'on/off, brightness, color temperature, power-on behavior', - fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], - toZigbee: [ - tz.on_off, tz.light_brightness, tz.light_colortemp, tz.ignore_transition, tz.light_alert, - tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, - ], + supports: generic.light_onoff_brightness_colortemp.supports + ', , power-on behavior', + fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, + toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colorxy: { - supports: 'on/off, brightness, color xy, power-on behavior', - fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], - toZigbee: [ - tz.on_off, tz.light_brightness, tz.light_color, tz.ignore_transition, tz.light_alert, - tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, - ], + supports: generic.light_onoff_brightness_colorxy.supports + ', , power-on behavior', + fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, + toZigbee: generic.light_onoff_brightness_colorxy.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp_colorxy: { - supports: 'on/off, brightness, color temperature, color xy, power-on behavior', - fromZigbee: [fz.light_brightness, fz.light_color_colortemp, fz.light_state], - toZigbee: [ - tz.on_off, tz.light_brightness, tz.light_colortemp, tz.light_color, tz.ignore_transition, - tz.light_alert, tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature, - ], + supports: generic.light_onoff_brightness_colortemp_colorxy.supports + ', , power-on behavior', + fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, + toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat(tzHuePowerOnBehavior), }, }; @@ -611,180 +600,140 @@ const devices = [ model: '7299760PH', vendor: 'Philips', description: 'Hue Bloom', - supports: hue.light_onoff_brightness_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['LLC020'], model: '7146060PH', vendor: 'Philips', description: 'Hue Go', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LWB004'], model: '433714', vendor: 'Philips', description: 'Hue Lux A19 bulb E27', - supports: hue.light_onoff_brightness.supports, - fromZigbee: hue.light_onoff_brightness.fromZigbee, - toZigbee: hue.light_onoff_brightness.toZigbee, + extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB006', 'LWB014'], model: '9290011370', vendor: 'Philips', description: 'Hue white A60 bulb E27', - supports: hue.light_onoff_brightness.supports, - fromZigbee: hue.light_onoff_brightness.fromZigbee, - toZigbee: hue.light_onoff_brightness.toZigbee, + extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB010'], model: '8718696449691', vendor: 'Philips', description: 'Hue White Single bulb B22', - supports: hue.light_onoff_brightness.supports, - fromZigbee: hue.light_onoff_brightness.fromZigbee, - toZigbee: hue.light_onoff_brightness.toZigbee, + extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LST001'], model: '7299355PH', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip', - supports: hue.light_onoff_brightness_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['LST002'], model: '915005106701', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip plus', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT001', 'LCT007', 'LCT010', 'LCT012', 'LCT014', 'LCT015', 'LCT016'], model: '9290012573A', vendor: 'Philips', description: 'Hue white and color ambiance E26/E27/E14', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT002'], model: '9290002579A', vendor: 'Philips', description: 'Hue white and color ambiance BR30', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT003'], model: '8718696485880', vendor: 'Philips', description: 'Hue white and color ambiance GU10', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT024'], model: '915005733701', vendor: 'Philips', description: 'Hue White and color ambiance Play Lightbar', - supports: hue.light_onoff_brightness_colortemp_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colortemp_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LTW011'], model: '464800', vendor: 'Philips', description: 'Hue white ambiance BR30 flood light', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW012'], model: '8718696695203', vendor: 'Philips', description: 'Hue white ambiance E14', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW013'], model: '8718696598283', vendor: 'Philips', description: 'Hue white ambiance GU10', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW010', 'LTW001', 'LTW004'], model: '8718696548738', vendor: 'Philips', description: 'Hue white ambiance E26/E27', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC001'], model: '3261030P7', vendor: 'Philips', description: 'Hue Being', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC003'], model: '3261331P7', vendor: 'Philips', description: 'Hue white ambiance Still', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC015'], model: '3216331P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle rectangle panel light', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC016'], model: '3216431P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle round panel light', - supports: hue.light_onoff_brightness_colortemp.supports, - fromZigbee: hue.light_onoff_brightness_colortemp.fromZigbee, - toZigbee: hue.light_onoff_brightness_colortemp.toZigbee, + extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LLC010'], model: '7199960PH', vendor: 'Philips', description: 'Hue Iris', - supports: hue.light_onoff_brightness_colorxy.supports, - fromZigbee: hue.light_onoff_brightness_colorxy.fromZigbee, - toZigbee: hue.light_onoff_brightness_colorxy.toZigbee, + extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['RWL020', 'RWL021'], From fa99cdac56c30f4982feffaeb00bda020b350ad9 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 13 Jan 2019 17:58:52 +0100 Subject: [PATCH 10/10] Update devices.js --- devices.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devices.js b/devices.js index 07a45884fb8f6..74e5b3a4e35fb 100644 --- a/devices.js +++ b/devices.js @@ -37,22 +37,22 @@ const generic = { const tzHuePowerOnBehavior = [tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature]; const hue = { light_onoff_brightness: { - supports: generic.light_onoff_brightness.supports + ', , power-on behavior', + supports: generic.light_onoff_brightness.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness.fromZigbee, toZigbee: generic.light_onoff_brightness.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp: { - supports: generic.light_onoff_brightness_colortemp.supports + ', , power-on behavior', + supports: generic.light_onoff_brightness_colortemp.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colorxy: { - supports: generic.light_onoff_brightness_colorxy.supports + ', , power-on behavior', + supports: generic.light_onoff_brightness_colorxy.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, toZigbee: generic.light_onoff_brightness_colorxy.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp_colorxy: { - supports: generic.light_onoff_brightness_colortemp_colorxy.supports + ', , power-on behavior', + supports: generic.light_onoff_brightness_colortemp_colorxy.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat(tzHuePowerOnBehavior), },