Skip to content

Commit

Permalink
fix(dingz:input): dynamic config
Browse files Browse the repository at this point in the history
- update input/output (I1/D1) when config changes
  • Loading branch information
johannrichard committed Dec 8, 2020
1 parent a2fc989 commit d720d7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dingzAccessory.ts
Expand Up @@ -1072,7 +1072,7 @@ export class DingzAccessory extends DingzDaBaseAccessory {
address: this.device.address,
token: this.device.token,
})
.then(({ dingzDevices, dimmerConfig, blindConfig }) => {
.then(({ dingzDevices, inputConfig, dimmerConfig, blindConfig }) => {
if (this.reachabilityState !== null) {
this.log.warn('Device recovered from unreachable state');
this.reachabilityState = null;
Expand All @@ -1099,7 +1099,8 @@ export class DingzAccessory extends DingzDaBaseAccessory {
this.removeMotionService();
}
}
// Update dimmer services
// Update output, blind, input services
this.device.dingzInputInfo = inputConfig.inputs;
this.device.dimmerConfig = dimmerConfig;
this.device.windowCoveringConfig = blindConfig.blinds;

Expand Down

0 comments on commit d720d7d

Please sign in to comment.