zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

[Bug]: Web UX when updating advanced settings for `Last Seen`

Open larrykluger opened this issue 4 months ago • 5 comments

What happened?

Zigbee2mqtt ver 2.6.0

Repro steps:

  1. Open [Settings icon]
  2. Click Advanced
  3. Change Last Seen to ISO_8601_Local
  4. Click Submit at bottom of screen
  5. Result: error/stack trace

Stack trace

TypeError
Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
    at Object.entries (<anonymous>)
    at r (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9630)
    at r (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9692)
    at lUe (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9732)
    at Se.onSettingsSave [as onSubmit] (http://zigbee-gway:8080/assets/index-b5a4d188.js:1:8583)
    at e.<anonymous> (http://zigbee-gway:8080/assets/bootstrap-5.esm-b480a4c5.js:11:47737)
    at lD (http://zigbee-gway:8080/assets/index-4e00f6e9.js:41:9885)
    at SD (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31876)
    at K5 (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31458)
    at K5 (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31368)

What browsers are you seeing the problem on?

Chrome

Relevant stacktrace

**Current url**: http://zigbee-gway:8080/#/settings/settings
**Previous url**: http://zigbee-gway:8080/


**Error type**: TypeError
**Error message**: Cannot convert undefined or null to object



TypeError: Cannot convert undefined or null to object
    at Object.entries (<anonymous>)
    at r (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9630)
    at r (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9692)
    at lUe (http://zigbee-gway:8080/assets/index-4e00f6e9.js:53:9732)
    at Se.onSettingsSave [as onSubmit] (http://zigbee-gway:8080/assets/index-b5a4d188.js:1:8583)
    at e.<anonymous> (http://zigbee-gway:8080/assets/bootstrap-5.esm-b480a4c5.js:11:47737)
    at lD (http://zigbee-gway:8080/assets/index-4e00f6e9.js:41:9885)
    at SD (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31876)
    at K5 (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31458)
    at K5 (http://zigbee-gway:8080/assets/index-4e00f6e9.js:43:31368)

Did you download state.json.zip?

I will attach state.json.zip

larrykluger avatar Aug 14 '25 06:08 larrykluger

Update Last Seen via configuration.yaml

To work-around the bug, the setting can be updated via configuration.yaml:

advanced:
  log_level: info
  last_seen: ISO_8601_local

After updating configuration.yaml, I restarted zigbee2mqtt. The settings/advanced page showed the new setting.

Added I manually edited configuration.yaml on the Zigbee2mqtt server itself. The configuration.yaml file is stored in the data directory. On my RaspberryPi linux server (not using docker), it is in directory /opt/zigbee2mqtt/data

larrykluger avatar Aug 14 '25 06:08 larrykluger

Thanks for the work-around @larrykluger ! The issue you have observed is present for the entire "Advanced" page on settings, per what I have noticed in the GH Issues. Let's hope for a fix.

Where have you managed to edit configuration.yaml ? In Settings > Addons > Z2M > Configuration > 3 dots on "Options" > Edit in YAML ?

tudorsmt avatar Aug 27 '25 18:08 tudorsmt

I manually edited configuration.yaml on the Zigbee2mqtt server itself. The configuration.yaml file is stored in the data directory. On my RaspberryPi linux server (not using docker), it is in directory /opt/zigbee2mqtt/data

I don't have the Addons menus in my Settings page...

I determined the right capitalization and yaml setting name by spelunking the source. Let me know if there's a setting where you can't figure out the right yaml equivalent.

larrykluger avatar Aug 28 '25 13:08 larrykluger

I found it! In HAOS (Home Assistant OS) it's located at /homeassistant/zigbee2mqtt/configuration.yaml . I managed to edit it with the "File Editor" addon for Home Assistant.

tudorsmt avatar Aug 28 '25 15:08 tudorsmt

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 18 '25 01:12 stale[bot]