-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use attrs for classes #177
Conversation
a1cbcc9
to
08c4ca7
Compare
@tetienne can you please resolve conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement! Some minor remarks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge if you rebase and fix the two small spelling mistakes.
@tetienne could you perhaps fix the typing of Command (https://github.com/iMicknl/python-tahoma-api/blob/e370e772f659c772587667952b193bf3adf60658/pyhoma/models.py#L184-L192) as well? We pass a list ([]) and we type it as a string... |
08c4ca7
to
915862c
Compare
184b5b9
to
61a2c2a
Compare
@iMicknl I fixed the typing, and the stupid English mistakes I did :D |
attrs is dataclass on steroids. I use it to enforce our classes typing and to automatically generate str, repr and slots.
I have ofuscated some ids by default.
Exemple of output when logging devices, events and history:
It would be really helpful to log event within HA.
Tested with HA: