feat: add on-off capability

This commit is contained in:
Martin Giger 2021-07-25 15:30:59 +02:00
parent aef438e4d6
commit f2785c52b8
Signed by: freaktechnik
GPG key ID: AE530058EFE7FD60

View file

@ -172,6 +172,7 @@ class IRUSBDevice extends Device {
constructor(adapter, uuid, ip, port) {
super(adapter, uuid);
this.name = uuid;
this['@type'] = [ 'OnOffSwitch' ];
this.socket = new net.Socket();
this.socket.setEncoding('ascii');
this.addProperty(new IRUSBProperty(this, 'power', {