Skip to content

Commit

Permalink
wip: add default value for homekit trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarpovich committed Mar 18, 2023
1 parent 1052c00 commit 016cce4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ export class SimpleTriggerHomekit {
name,
username,
pincode,
defaultValue,
homekitPort: port,
}: IHomekitDevice) {
this.getState = this.getState.bind(this);
this.setState = this.setState.bind(this);

this.state = defaultValue === "true";

const { On } = Characteristic;

const accessoryUuid = hap.uuid.generate(uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export interface IHomekitDevice {
homekitPort: number;
hasRGB?: boolean;
zone?: string;
defaultValue?: string;
}

0 comments on commit 016cce4

Please sign in to comment.