fix: Fix Cannot read properties of null (reading 'toString') when Home Assistant event entities are enabled https://github.com/Koenkk/zigbee2mqtt/issues/25133

This commit is contained in:
Koen Kanters
2024-12-11 22:25:54 +01:00
parent ec13ebd3ad
commit 9eea58eba4
+1 -1
View File
@@ -1069,7 +1069,7 @@ export default class HomeAssistant extends Extension {
discoveryEntries.push({
type: 'event',
object_id: firstExpose.property,
mockProperties: [{property: firstExpose.property, value: null}],
mockProperties: [],
discovery_payload: {
name: endpoint ? /* istanbul ignore next */ `${firstExpose.label} ${endpoint}` : firstExpose.label,
state_topic: true,