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

feat: get a family #73

Merged
merged 6 commits into from
Jun 23, 2024
Merged

feat: get a family #73

merged 6 commits into from
Jun 23, 2024

Conversation

robertbeal
Copy link
Contributor

  • Get a family (which is made up of members, devices and some other props)
  • Map the API response into a Family class

@robertbeal robertbeal changed the title Get a family feat: get a family Jun 17, 2024

self.members = [
Member(
createdAt=datetime.fromisoformat(member["createdAt"].rstrip("Z")),
Copy link
Owner

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!

Copy link
Owner

@cdnninja cdnninja left a 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!

Copy link
Owner

@cdnninja cdnninja left a 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

@cdnninja
Copy link
Owner

I added the method to yoto manager and init so I can merge. Thanks for adding this method!

@cdnninja cdnninja merged commit fc57488 into cdnninja:master Jun 23, 2024
3 checks passed
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.

2 participants