Skip to content

Commit

Permalink
tint remote (ZBT-Remote) Color keys (#284)
Browse files Browse the repository at this point in the history
* tint remote, 3 keys

activated On-Off and brightness up/down

* Update devices.js

* Update fromZigbee.js

* Update devices.js

* Update devices.js

* tint remote (ZBT-Remote) Color keys

Implementation of color wheel and color temp, brightness with stesize and transition-time

* syntax power-key

* Update fromZigbee.js

change on/off-button to action:'on' and 'off'

* Update fromZigbee.js

* Update devices.js

* Update fromZigbee.js

* Update devices.js
  • Loading branch information
MoskitoHorst authored and Koenkk committed Feb 19, 2019
1 parent 60a1ebd commit 3159734
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
40 changes: 37 additions & 3 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -1570,22 +1570,56 @@ const converters = {
cid: 'genOnOff',
type: 'cmdOn',
convert: (model, msg, publish, options) => {
return {action: 'toggle'};
return {action: 'on'};
},
},
tint404011_off: {
cid: 'genOnOff',
type: 'cmdOff',
convert: (model, msg, publish, options) => {
return {action: 'toggle'};
return {action: 'off'};
},
},
tint404011_brightness_updown_click: {
cid: 'genLevelCtrl',
type: 'cmdStep',
convert: (model, msg, publish, options) => {
const direction = msg.data.data.stepmode === 1 ? 'down' : 'up';
return {action: `brightness_${direction}_click`};
return {
action: `brightness_${direction}_click`,
step_size: msg.data.data.stepsize,
transition_time: msg.data.data.transtime,
};
},
},
tint404011_scene: {
cid: 'genBasic',
type: 'cmdWrite',
convert: (model, msg, publish, options) => {
return {action: `scene${msg.data.data[0].attrData}`};
},
},
tint404011_move_to_color_temp: {
cid: 'lightingColorCtrl',
type: 'cmdMoveToColorTemp',
convert: (model, msg, publish, options) => {
return {
action: `color_temp`,
action_color_temperature: msg.data.data.colortemp,
transition_time: msg.data.data.transtime,
};
},
},
tint404011_move_to_color: {
cid: 'lightingColorCtrl',
type: 'cmdMoveToColor',
convert: (model, msg, publish, options) => {
return {
action: `color_wheel`,
action_color_x: msg.data.data.colorx,
action_color_y: msg.data.data.colory,
transition_time: msg.data.data.transtime,
};
},
},
cmdToggle: {
Expand Down
1 change: 1 addition & 0 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,7 @@ const devices = [
vendor: 'Müller Licht',
fromZigbee: [
fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click,
fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene,
],
toZigbee: [],
},
Expand Down

0 comments on commit 3159734

Please sign in to comment.