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

Improve logging to ease troubleshooting #109

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

f18m
Copy link

@f18m f18m commented Feb 8, 2024

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):

$ cd MyHOME/custom_components/myhome
$ grep -rl $'\r' *.py *.json
config_flow.py
const.py
__init__.py
manifest.json

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.

@f18m f18m marked this pull request as draft February 8, 2024 14:23
@f18m f18m changed the title Convert from DOS to Unix line ends Improve logging to ease troubleshooting Feb 8, 2024
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.

None yet

1 participant