This commit is contained in:
Koen Kanters 2019-10-20 21:17:18 +02:00
parent 01dfcd18ce
commit c80be7bda2

View File

@ -106,7 +106,7 @@ class EntityPublish extends BaseExtension {
* the color temperature. This would lead to 2 zigbee publishes, where the first one
* (state) is probably unecessary.
*/
const deviceState = this.state.get(entity.settings.ID);
const deviceState = this.state.get(entity.settings.ID) || {};
if (settings.get().homeassistant) {
const hasColorTemp = json.hasOwnProperty('color_temp');
const hasColor = json.hasOwnProperty('color');