Improve logging to ease troubleshooting #109
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @anotherjulien,
Thanks for this HA custom component, it's really useful.
I found some trouble in setting it up (although now it works well for me).
To find out what was wrong I introduce a few logging statements in the code.
So here it is a PR which I think will help newcomers to use/troubleshoot trivial issues:
Changelog:
About the EOLs: I noticed that some files in this repository use Windows-style EOLs (\r\n) while most of the rest is using Linux-style EOLs (\n):
Having inconsistent EOL encoding is confusing editors, specially on embedded systems.
So I think it would be good to stay consistent (most of people use the default git setting 'core.autocrlf' set to false which means that git will not do any EOL conversion on the fly at checkout/commit time)
Final point: as I developed these changes using the dev-container of HA (https://developers.home-assistant.io/docs/development_environment/) when I saved the source code it has been reformatted using "ruff" utility... that's why in the diff you see so many long lines broken into shorter lines.
I hope this is not a problem.