-
Notifications
You must be signed in to change notification settings - Fork 53
feat: extending device status by device model #51
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
|
@Lash-L I invited you as a colaborator so I can add you as reviewer in future changes. Could you review this one? |
Lash-L
left a comment
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.
I think this all looks good except my one typing comment.
Perhaps it makes sense to make Another dataclass called ModelStatus or something that the others inherit from, and it has all of the possibilities set to None. So you don't have to super repeat all of the non existent attributes for each one.
What would this ModelStatus looks like? |
I realized I was wrong. Status already has these enums as None, so they don't need to be redeclared as None as they are inherited as None from Status. |
The only way I can think of is creating a mixing for each model status |
|
Sorry I think I wasn't very clear. I think how you have it is actually fine. The base Status class already has 'fan_power' for instance, and it is set to None. The specific S6PureStatus for example, just has to set the type of 'fan_power' Then since the base Status class already has 'mop_mode' and it is None, S6PureStatus will also make it None. I think the approach you have now is completely fine unless I am missing something |
|
I wanted to make these fields required. But I think I'll just let it be optional for now |
No description provided.