Closed ctschach closed 1 year ago
I avoided doing this intentionally at first to try and make the API more typing friendly and defer some of the legwork to consumers of the library. If this is critical, we could add explicit data types to encode the entire payload for each device and still maintain the type safety when adding something like this.
Okay, got your point...then let's leave this for later....
So I want to use the decoder library in my own application - using it in the documented way:
I do need to call every single value to construct an dict:
Wouldn't it be an option to add a "get_payload" to each of the DeviceData class which will deliver the complete payload with one call? So something like: