[Bug]: Web UX when updating advanced settings for `Last Seen`
What happened?
Zigbee2mqtt ver 2.6.0
Repro steps:
- Open [Settings icon]
- Click
Advanced - Change
Last SeentoISO_8601_Local - Click
Submitat bottom of screen - 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
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
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 ?
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.
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.
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.