diff --git a/lib/googleHome.js b/lib/googleHome.js index 98915c26..abf07751 100644 --- a/lib/googleHome.js +++ b/lib/googleHome.js @@ -1754,7 +1754,7 @@ class GoogleHome { } }); - if (!smartName.ghAttributes && traitEnum[smartName.ghTraits[0]].defaultAttributes) { + if ((!(smartName.ghAttributes)) && (traitEnum[smartName.ghTraits[0]].defaultAttributes)) { const defaultAttributes = traitEnum[smartName.ghTraits[0]].defaultAttributes; result[id].attributes = JSON.parse(defaultAttributes); const obj = await this.adapter.getForeignObjectAsync(id); @@ -1772,7 +1772,9 @@ class GoogleHome { }); } } else { - result[id].attributes = {}; + if (!smartName.ghAttributes) { + result[id].attributes = {}; + } } } @@ -2730,7 +2732,7 @@ class GoogleHome { this.adapter.log.error(`[GHOME] No Google Home customData for ${dev.id} cannot handle Google Request.`); } //Workaround for no thermostat mode available - if (responseDev[dev.id].thermostatTemperatureSetpoint) { + if (responseDev[dev.id].thermostatTemperatureSetpoint && responseDev[dev.id].thermostatMode === undefined) { if (responseDev[dev.id].thermostatTemperatureAmbient > responseDev[dev.id].thermostatTemperatureSetpoint) { responseDev[dev.id].thermostatMode = 'cool'; } else {