mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
Don't provide undefined state. https://github.com/Koenkk/zigbee2mqtt/issues/2164
This commit is contained in:
parent
01dfcd18ce
commit
c80be7bda2
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user