Navigation Menu

Skip to content

Commit

Permalink
ensure initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 23, 2019
1 parent 1710a25 commit d7d0c27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Expand Up @@ -11,6 +11,10 @@ log.i('Hello World. This will create a virtual OnOff device.');
// to add support for more capabilities, like Brightness or Lock.

class Device extends ScryptedDeviceBase implements OnOff {
constructor() {
super();
this.on = this.on || false;
}
turnOff(): void {
log.i('turnOff was called!');
this.on = false;
Expand Down

0 comments on commit d7d0c27

Please sign in to comment.