-
Notifications
You must be signed in to change notification settings - Fork 51
feat: improve B01 support #449
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
Conversation
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.
Generally looks fine, just a question
roborock/containers.py
Outdated
@dataclass | ||
class RoborockBase: | ||
_ignore_keys = [] # type: ignore | ||
_registry: ClassVar[dict[str, type["RoborockBase"]]] = {} |
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.
what is this needed for?
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.
It's part of the fix to get roborockbase working on objects not in containers.py
Open to other solutions as well
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.
What does it do and how does it work?
I think just removing from __future__ import annotations
from that file will make things work.
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.
Believe you are correct. Annotations must have been there before and this fixed it while it was. This works without registry now though so I deleted it
I think the next step is to make a B1Channel that does the decoding and handles things for the device? I would like your opinion, as B01 does not have response matching.