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

Availability topic doesn't change with data topic #234

Closed
f-hnt opened this issue Feb 16, 2024 · 2 comments
Closed

Availability topic doesn't change with data topic #234

f-hnt opened this issue Feb 16, 2024 · 2 comments

Comments

@f-hnt
Copy link

f-hnt commented Feb 16, 2024

Availability topic doesn't change with data topic and stays at the default "aha".

By setting the data topic in the setup section with:
mqtt.setDataPrefix("DataTopic");
the availability of the device is being reported in "aha" topic. States, data, etc. are correctly reported in "DataTopic"

Is this a normal behavior?
I expected after changing the data data topic, the MQTT structure to be like that:

Data:
DataTopic/UniqueID/switch1/....

Availability:
DataTopic/UniqueID/avty_t

@dawidchyrzynski
Copy link
Owner

Hi @f-hnt,

The setDataPrefix method must be called before enableSharedAvailability. Please let me know if it solves your problem.

@f-hnt
Copy link
Author

f-hnt commented May 19, 2024

It worked. Thank you a lot :)

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

2 participants