-
Notifications
You must be signed in to change notification settings - Fork 686
Description
Description of the issue
When configuring Zigbee2MQTT via the Home Assistant addon options UI:
- The editor rewrites the YAML and removes or misplaces the
adapter: emberline. - It also mis-indents keys, placing
adapterunderserial:instead of at the top level.
This causes Zigbee2MQTT to start without the correct adapter setting, leading to errors such as:
zh:adapter:discovery: Unable to match USB adapter: ember
port: /dev/serial/by-id/...
zh:ember:uart:ash: ======== ASH stopped ========
Error: No such file or directory, cannot open port
Steps to reproduce
- Open the Zigbee2MQTT addon options in Home Assistant.
- Enter values for:
serial:
__port: /dev/ttyUSB0
__baudrate: 115200
__rtscts: true
adapter: ember
Click Save.
The editor strips empty lines and moves adapter: ember inside serial: instead of keeping it at the top level.
Restart Zigbee2MQTT → startup fails with ASH errors.
Expected behavior
The addon should:
Preserve adapter: ember as a top-level key in the YAML.
Avoid altering indentation of valid keys.
Additional context
Editing /config/zigbee2mqtt/configuration.yaml directly via File Editor works correctly. The bug only occurs when using the addon options UI.
(Side note: I entered "port: /dev/ttyUSB0" in the port section, and the YAML doubled the port: into
port: port: /dev/ttyUSB0. I assume was a change or some documentation is off, even in videos, where it is entered exacly the way I did.)
Addon version
2.6.3-1
Platform
Home Assistant OS 12.3
Zigbee2MQTT addon (2.6.3-1)
Sonoff Dongle Plus MG24, flashed with EmberZNet 8.0.2 Coordinator firmware
or
SMLIGHT SLZB-07, flashed with the SMLIGHT online Flasher (newest stable 4.0.x)
Logs of the issue (if applicable)
This is the correct indentation:
serial:
__port: /dev/ttyUSB0
__baudrate: 115200
__rtscts: true
adapter: ember
but it generates:
serial:
__port: /dev/ttyUSB0
__adapter: ember
__baudrate: 115200
__rtscts: true