Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
moifort committed Jun 8, 2023
1 parent e7bb7a6 commit a4d4989
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platformAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class CeilingFanAccessory {
.onSet(async (value: CharacteristicValue) => {
this.state.fanOn = value.valueOf() as boolean;
await device.set({dps: 60, set: value.valueOf() as boolean, shouldWaitForResponse: false});
await device.refresh({});
})
.onGet(() => this.state.fanOn);
const stateHook = (data: DPSObject) => {
Expand Down Expand Up @@ -116,6 +117,7 @@ export class CeilingFanAccessory {
.onSet(async (value: CharacteristicValue) => {
this.state.lightOn = value.valueOf() as boolean;
await device.set({dps: 20, set: value.valueOf() as boolean, shouldWaitForResponse: false});
await device.refresh({});
})
.onGet(() => this.state.lightOn);

Expand Down

0 comments on commit a4d4989

Please sign in to comment.