Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z2M fails to start with "device...must be string" when playing with "Settings/Home Assistent Name" #26229

Open
sbolten opened this issue Feb 7, 2025 · 0 comments
Labels
problem Something isn't working

Comments

@sbolten
Copy link

sbolten commented Feb 7, 2025

What happened?

Added a "Home Assistent Name" through "Device --> Settings --> Home Assistent Name"
Removed the name through "Device --> Settings --> Home Assistent Name" (emptied the field)
Restart of Z2M fails with an error

[09:57:48] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
READ THIS CAREFULLY
Refusing to start because configuration is not valid, found the following errors:

Looking at the configuration.yaml I found the following for this device:

'0x3410f4fffee1354c':
friendly_name: switch_3
description: Studio Bad
optimistic: true
retain: true
homeassistant:
name: null

The crucial part is obviously the "name:null"

Replacing this with "homeassistant: {}" or some valid string (not null) solves the problem

What did you expect to happen?

Z2M restarting without errors even though I fiddled around with the Home Assistant Name

How to reproduce it (minimal and precise)

See "What happened"

Field I changed:
Image

Config before change:
Image

Changed the value of the field:
Image

Config after change:
Image

Removed string from field again:
Image

Config after removing the string:
Image

Restarting and error log of Z2M:
Image
Image

Editing the config back to its original situation (removing "name: null") solved the issue:

Zigbee2MQTT version

2.1.1-1

Adapter firmware version

20230507

Adapter

Sonoff_Zigbee_3.0_USB_Dongle_Plus

Setup

Add-on HAOS

Debug log

No response

@sbolten sbolten added the problem Something isn't working label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant