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

Error in 5.12.0a when compliling without USE_HOME_ASSISTANT #1889

Closed
jhlweb opened this issue Feb 12, 2018 · 5 comments
Closed

Error in 5.12.0a when compliling without USE_HOME_ASSISTANT #1889

jhlweb opened this issue Feb 12, 2018 · 5 comments

Comments

@jhlweb
Copy link

jhlweb commented Feb 12, 2018

When compiling 5.12.0a without defining USE_HOME_ASSISTANT in the user_config.h i get this error:

....Sonoff-Tasmota-5.12.0a\sonoff\settings.ino: In function 'void SettingsDefaultSet2()':
settings:433: error: 'HOME_ASSISTANT_DISCOVERY_ENABLE' was not declared in this scope
   Settings.flag.hass_discovery = HOME_ASSISTANT_DISCOVERY_ENABLE;

Should this be in a #ifdef statement?

@ascillato
Copy link
Contributor

If you do not want to use Home Assistant, your configuration on user_config.h should be:

// -- MQTT - Home Assistant Discovery -------------
//#define USE_HOME_ASSISTANT                       // Enable Home Assistant Discovery Support (+1k4 code)
  #define HOME_ASSISTANT_DISCOVERY_PREFIX "homeassistant"  // Home Assistant discovery prefix
  #define HOME_ASSISTANT_DISCOVERY_ENABLE 0      // [SetOption19] Home Assistant Discovery (0 = Disable, 1 = Enable)

That error is shown when you comment the line:
// #define HOME_ASSISTANT_DISCOVERY_ENABLE 0 // [SetOption19] Home Assistant Discovery (0 = Disable, 1 = Enable)

And yes, you are right. It should be inside an #ifdef statement

@sammyke007
Copy link

I can confirm this. Only comment "#define USE_HOME_ASSISTANT "!

@ascillato
Copy link
Contributor

@jhlweb if it works for you, please close this issue. Thanks

@jhlweb
Copy link
Author

jhlweb commented Feb 16, 2018

Yes it works by only commenting '//#define USE_HOME_ASSISTANT'.
But then the comment should make it clear that by commenting the USE_HOME_ASSISTANT is enough.

@ascillato
Copy link
Contributor

PR #1937

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

3 participants