zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Setting homeassistant: null for groups, results in error

Open rdeneer opened this issue 3 years ago • 1 comments

What happened?

If I create a group in z2m and add the line homeassistant: null to prevent exposing the group to HA, I get the following error when rebooting z2m:

error 2023-10-10 15:18:51: Failed to call 'HomeAssistant' 'start' (TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at add (/app/lib/extension/homeassistant.ts:1399:28)
    at /app/lib/extension/homeassistant.ts:1417:17
    at Array.forEach (<anonymous>)
    at HomeAssistant.discover (/app/lib/extension/homeassistant.ts:1235:33)
    at HomeAssistant.start (/app/lib/extension/homeassistant.ts:110:18)
    at Controller.callExtensions (/app/lib/controller.ts:319:17)
    at Controller.start (/app/lib/controller.ts:153:9)
    at start (/app/index.js:107:5)
    at Timeout.restart [as _onTimeout] (/app/index.js:17:5))

What did you expect to happen?

It works, I mean the group is not exposed to HA, but I would not expect an error in the z2m log. This error does not occur when setting homeassistant: null in devices.yaml.

How to reproduce it (minimal and precise)

Create a group in z2m and add some devices. Open the groups.yaml and add the line homeassistant: null to the group. Reboot z2m. Open logs and observe the error.

Zigbee2MQTT version

1.33.1

Adapter firmware version

20230507

Adapter

Sonoff ZigBee 3.0 Dongle Plus

Debug log

No response

rdeneer avatar Oct 10 '23 13:10 rdeneer

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Apr 08 '24 00:04 github-actions[bot]