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

HomeAssistant discovery topic reversed #4468

Closed
lanefu opened this issue Nov 27, 2018 · 2 comments
Closed

HomeAssistant discovery topic reversed #4468

lanefu opened this issue Nov 27, 2018 · 2 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@lanefu
Copy link

lanefu commented Nov 27, 2018

despite all my other mqtt settings being %prefix%/%topic% HomeAssistant discovery is publishing the command topic as %topic%/%prefix%

I think the logic from here needs to be inverted or removed.

https://github.com/arendst/Sonoff-Tasmota/blame/development/sonoff/xdrv_12_home_assistant.ino#L431

I tried testing a build with that code commented out then homeassistant autodiscovery worked as expected. I didn't want to submit a PR because I didn't understand the intent of that code block.

@emontnemery any thoughts?

@emontnemery
Copy link
Contributor

It's intentional that Hass autodiscovery overrides the preset topic with %prefix%/%topic% However, I forgot to save settings and resubcribe when topic was changed.

I'll try to submit a fix in a couple of days.

@ascillato2 ascillato2 added the enhancement Type - Enhancement that will be worked on label Nov 27, 2018
@emontnemery
Copy link
Contributor

@lanefu #4471 should solve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests

3 participants