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

Frontend url configuration is overwritten by addon entrypoint #682

Open
mik-laj opened this issue Jan 3, 2025 · 0 comments
Open

Frontend url configuration is overwritten by addon entrypoint #682

mik-laj opened this issue Jan 3, 2025 · 0 comments

Comments

@mik-laj
Copy link

mik-laj commented Jan 3, 2025

Description of the issue

Hello,

I would like to have links in Z2M on the device details screen. Similar to what WLED integration provides:
Screenshot 2025-01-03 at 16 16 01 ("VISIT" button)

On the HA side, to do this, we need to set the configuration_url field in MQTT config. It is covered by: https://www.home-assistant.io/integrations/mqtt/
Zigbee2mqtt implements the appropriate code that sets this field.
https://github.com/Koenkk/zigbee2mqtt/blob/902db5ea5b12ddf7053faae32df4b6b4c48f269b/lib/extension/homeassistant.ts#L1962-L1983
This requires the frontend/url config to be set.
Unfortunately, this addon overwrites the entire frontend section configuration.

export ZIGBEE2MQTT_CONFIG_FRONTEND='{"enabled":true,"port": 8099}'

Environment variables have higher priority than the configuration file:
https://github.com/Koenkk/zigbee2mqtt/blob/master/lib/util/settings.ts#L387-L388

And if we configure an entire section, all section options are overwritten.
https://github.com/Koenkk/zigbee2mqtt/blob/902db5ea5b12ddf7053faae32df4b6b4c48f269b/lib/util/settings.ts#L459-L465

It would be great if the extension automatically set the frontend/url value, or at least allowed overriding the value in the configuration file.

Best regards,
Kamil Breguła

Addon version

1.42.0-2

Platform

N/A

Logs of the issue (if applicable)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant