Skip to content

Commit

Permalink
include channel type blind in working detection workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Oct 2, 2018
1 parent 2f3ec31 commit 4454ab5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodes/ccu-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1527,14 +1527,14 @@ module.exports = function (RED) {
this.logger.debug('publishEvent', JSON.stringify(params));

const msg = this.createMessage(iface, channel, datapoint, payload, {cache: false, working, direction});
if (msg.channelType === 'DIMMER' && msg.datapoint === 'LEVEL' && !working) {
if (['DIMMER', 'BLIND'].includes(msg.channelType) && msg.datapoint === 'LEVEL' && !working) {
clearTimeout(this.workingTimeout);
this.workingTimeout = setTimeout(() => {
const datapointName = iface + '.' + channel + '.';
msg.working = this.values[datapointName + 'WORKING'] && this.values[datapointName + 'WORKING'].working;
msg.direction = this.values[datapointName + 'DIRECTION'] && this.values[datapointName + 'DIRECTION'].direction;
this.callCallbacks(msg);
}, 250);
}, 300);
} else {
this.callCallbacks(msg);
}
Expand Down

0 comments on commit 4454ab5

Please sign in to comment.