Skip to content

Make MQTT topic prefix configurable #197

Description

@dlt-

I have two EDA units in same HA system, and noticed that the prefix is hardcoded as "eda"

Would be very useful to be able to change the prefix to something else, and to be able to run several instances without copying, search-replacing etc :-)

Activity

  1. Jalle19 commented on Oct 7, 2026

    @Jalle19
    Owner

    I was wondering when someone would open an issue about this 😄

  2. changed the title [-]Custom mqtt topic prefix[/-] [+]Make MQTT topic prefix configurable[/+] on Oct 11, 2026
  3. Jalle19 commented on Oct 11, 2026

    @Jalle19
    Owner

    Can you try #201? Use -P to adjust the prefix. Defaults to eda like before.

  4. dlt- commented on Oct 12, 2026

    @dlt-
    Author

    npm build run crashes in similar way as does pull requests test:
    https://github.com/Jalle19/eda-modbus-bridge/actions/runs/38163863069/job/114542222542?pr=201
    I tried with freshly cloned
    git clone https://github.com/Jalle19/eda-modbus-bridge/ -b mqtt-prefix

    also tried to merge that pr to main branch, same result

  5. Jalle19 commented on Oct 13, 2026

    @Jalle19
    Owner

    Thought I had fixed the tests. I guess this needs a bit more work.

  6. Jalle19 commented on Oct 13, 2026

    @Jalle19
    Owner

    @dlt- please try again now with the latest version of the branch

  7. dlt- commented on Oct 14, 2026

    @dlt-
    Author

    Works partially (mqtt topic is correct), but mqtt discovery breaks when duplicate entries are present between devices

    See below, this gets ignored by HA as it already has same unique_id (and possibly default_entity_id, object_id) from another instance running with different topic.

    Maybe we should replace "eda" with custom prefix in these three fields as well..?

    {
        "platform": "mqtt",
        "availability_topic": "enerventpelican/status",
        "device": {
            "identifiers": "enervent-pelican-ec",
            "name": "Enervent Pelican eco EDW/MDW - CG",
            "sw_version": 1.41,
            "model": "Pelican eco EDW/MDW - CG",
            "manufacturer": "Enervent"
        },
        "unique_id": "eda-select-temperatureControlMode",
        "name": "Temperature control mode",
        "default_entity_id": "select.eda_select_temperatureControlMode",
        "object_id": "eda_Select_temperatureControlMode",
        "options": [
            "Supply control",
            "Exhaust control",
            "Room control"
        ],
        "state_topic": "enerventpelican/settings/temperatureControlMode",
        "command_topic": "enerventpelican/settings/temperatureControlMode/set",
        "command_template": "{{ this.attributes.options.index(value) + 1 }}",
        "value_template": "{{ this.attributes.options[(value | int) - 1] }}"
    }
    
    
  8. Jalle19 commented on Oct 15, 2026

    @Jalle19
    Owner

    Good catch, didn't think of that. Let's tie the IDs to the MQTT prefix.

  9. Jalle19 commented on Oct 29, 2026

    @Jalle19
    Owner

    @dlt- #207 should do the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions