Minor enhancements

* Properly disconnect from devices on exit
* Monitor for Home Assistant status and resend discovery
This commit is contained in:
tsightler
2020-10-15 11:05:41 -04:00
parent 271697439c
commit 748a5cae39
5 changed files with 52 additions and 11 deletions

View File

@@ -33,6 +33,9 @@ class SimpleSwitch extends TuyaDevice {
name: (this.config.name) ? this.config.name : this.config.id,
state_topic: this.baseTopic+'state',
command_topic: this.baseTopic+'command',
availability_topic: this.baseTopic+'status',
payload_available: 'online',
payload_not_available: 'offline',
unique_id: this.config.id,
device: this.deviceData
}