Fix for no template

This commit is contained in:
tsightler
2020-10-03 10:38:43 -04:00
parent 99f5358794
commit 68d8743882
2 changed files with 6 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ class GenericDevice extends TuyaDevice {
// Map generic DPS topics to device specific topic names
this.deviceTopics = this.config.template
} else {
this.deviceTopics = {}
// Try to get schema to at least know what DPS keys to get initial update
const result = await this.device.get({"schema": true})
if (!utils.isJsonString(result)) {