Skip to content

Commit

Permalink
set address of blind accessory to first channels address (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Jan 4, 2020
1 parent 4b6898b commit b0386c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions homematic-devices/lib/generic-hmip-blind.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class GenericHmipBlind {
if (pos === 0) {
if (!this.config.options[channel] || !this.config.options[channel].disabled) {
channels[acc].push({channel, name, tilt});
}
}0
} else if (this.config.options[channel] && this.config.options[channel].enabled) {
channels[acc].push({channel, name, tilt, type: desc.TYPE});
}
Expand All @@ -169,7 +169,9 @@ class GenericHmipBlind {
});
channels.forEach(accChannels => {
if (accChannels.length > 0) {
new GenericHmipBlindAcc(Object.assign({}, config, {name: accChannels[0].name}), node, accChannels);
const conf = Object.assign({}, config, {name: accChannels[0].name});
conf.description = Object.assign({}, config.description, {ADDRESS: accChannels[0].channel});
new GenericHmipBlindAcc(conf, node, accChannels);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redmatic-homekit",
"version": "3.0.1",
"version": "3.0.2",
"description": "HAP-Nodejs based Node-RED nodes to create HomeKit Accessories",
"main": "none",
"author": "Sebastian Raff <hobbyquaker@gmail.com>",
Expand Down

0 comments on commit b0386c4

Please sign in to comment.