diff --git a/lib/extension/entityPublish.js b/lib/extension/entityPublish.js index 0fdd025f..708e7425 100644 --- a/lib/extension/entityPublish.js +++ b/lib/extension/entityPublish.js @@ -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');