Skip to content

Conversation

joostlek
Copy link
Contributor

Okay so this is an interesting one.

In this PR I am adding mashumaro to make sure we type all the device data we get. The big benefit is that this is typed, which means we can accidentally request data from a device it doesn't have. We become a bit more wary about what data we receive and what data we have, instead of just receiving it and passing it through.

The downside of this, is that we now need explicit support for every device we want to use. But the benefit that will have is that we will have more real life test data when adding a new device, so we ensure that the API still works as expected.

This extra abstraction layer helps us to iron out little details switchbot put in their API, like the 00000000 or the same deviceId as hubDeviceId.

I think before we can release this we need to make sure we collect all the devices we currently support. And I will work on a home Assistant proof of concept to show the full picture

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.

1 participant