-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: get a family #73
Conversation
robertbeal
commented
Jun 17, 2024
- Get a family (which is made up of members, devices and some other props)
- Map the API response into a Family class
|
||
self.members = [ | ||
Member( | ||
createdAt=datetime.fromisoformat(member["createdAt"].rstrip("Z")), |
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.
Well this is simpler than my current approach to both data and dataclass!
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.
Thank you for adding this!
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.
Only note is that to consume this I think something should be added to yoto_manager to store the data and manage it.
Other item is that using the replace approach which I think it does today this can't be used by home assistant as the memory object will change on refresh, vs updating current variables. Maybe not important though since this data doesn't change often
I added the method to yoto manager and init so I can merge. Thanks for adding this method! |