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

[BUG] MQTT "Base Topic" change breaks HomeAssistant's AutoDiscovery #2119

Open
KaktusXY opened this issue Nov 22, 2024 · 0 comments
Open

[BUG] MQTT "Base Topic" change breaks HomeAssistant's AutoDiscovery #2119

KaktusXY opened this issue Nov 22, 2024 · 0 comments

Comments

@KaktusXY
Copy link

Describe the bug

When the "MQTT Base Topic" setting in OpenMQTTGateway (OMG) is changed to include additional layers (e.g. from the default home/ to home/devices/), the Home Assistant MQTT discovery messages do not update to reflect the new topic structure correctly. The stat_t in the discovery message remains tied to the default structure, even though the base topic has changed.

To Reproduce

  1. Change the "MQTT Base Topic" in OMG to include a different number of layers than the default (e.g. home/devices/).
  2. Enable Home Assistant auto-discovery.
  3. The MQTT devices appear in Home Assistant but with an unknown status, and the value stat_t of the HA AutoDiscovery message is not updated to reflect the new base topic.

Expected behavior

The stat_t value in the Home Assistant MQTT discovery messages should update to include the new topic structure, such as including the additional layers when the "MQTT Base Topic" is changed.

Environment:

  • Version: "v1.8.0"
  • Environment: "lilygo-rtl_433"

Default behavior

  • MQTT Base Topic: home/

Auto-discovery Topic: homeassistant/sensor/[DEVICE]/config :

{
  "stat_t": "+/+/RTL_433toMQTT/[DEVICE]/0",
  ...
}

Current behavior (after changing to home/devices/)

  • MQTT Base Topic: home/devices/

Auto-discovery Topic: homeassistant/sensor/[DEVICE]/config:

{
  "stat_t": "+/+/RTL_433toMQTT/[DEVICE]/0",
  ...
}

Expected behavior (after changing to home/devices/)

  • MQTT Base Topic: home/devices/

Auto-discovery Topic: homeassistant/sensor/[DEVICE]/config:

{
  "stat_t": "+/+/+/RTL_433toMQTT/[DEVICE]/0",
  ...
}
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