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

Fix for compilation errors when HA_AUTODISCOVERY is commented out #834

Closed
wants to merge 5 commits into from

Conversation

greenoem
Copy link
Contributor

What

This PR fixes MQTT build errors when autodiscovery is disabled and mqtt is enabled as per issue #831
Needs proper testing from someone who has HA/MQTT enabled

Why

Build fails when #define HA_AUTODISCOVERY is commented out (disabled) in USER_SETTINGS.h

How

ifdefs changed to incorporate missing function definitions

@amarofarinha
Copy link
Collaborator

LGTM.
the pre-commit check i failing.. please read https://github.com/dalathegreat/Battery-Emulator/blob/205605dc4588ed47c3353c9106f13359241dbd93/CONTRIBUTING.md for running locally the pre-commit first

Copy link
Collaborator

@amarofarinha amarofarinha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@greenoem
Copy link
Contributor Author

LGTM. the pre-commit check i failing.. please read https://github.com/dalathegreat/Battery-Emulator/blob/205605dc4588ed47c3353c9106f13359241dbd93/CONTRIBUTING.md for running locally the pre-commit first

Thanks, sorry I missed the pre-commit requirement - do you want me to delete the PR, run pre-commit and resubmit?

@amarofarinha
Copy link
Collaborator

the PR, run pre-commit and resubmit?

you just have to run the pre commiit and commit the changes

@greenoem
Copy link
Contributor Author

the PR, run pre-commit and resubmit?

you just have to run the pre commiit and commit the changes

Thanks, still getting used to VSCode and built in source control - think I'll go back to CLI in future! Have now run pre-commit and committed changes.

@dalathegreat
Copy link
Owner

The pre-commit still fails. Try:

If you are seeing this message in CI, reproduce locally with: pre-commit run --all-files.

@greenoem
Copy link
Contributor Author

The pre-commit still fails. Try:

If you are seeing this message in CI, reproduce locally with: pre-commit run --all-files.

pre-commit now all set up locally, runs with result "clang-format ............ Passed" (first time it ran it made corrections). However simply can't get VSCode (or now manual git cli) to amend the commit with the updated file. Any pointers?

@greenoem greenoem closed this Jan 31, 2025
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

Successfully merging this pull request may close these issues.

3 participants