You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an approach for determining if a dataclass field is supported (#740)
* feat: Add an approach for determining if a dataclass field is supported
This consists of multiple concepts:
- DeviceFeaturesTrait defines a method `is_field_supported` which will tell you if an optional field on a RoborockBase class type is supported or not
- The RoborockBase field defins a metadata attribute for a product schea code which is used to check the field against some other source
- We could substitue in other values in DeviceFeatures or status in the future as needed.
This adds 6 fields that are straight forward to add.
* chore: update test descrition
* chore: simplify supported_schema_codes
* chore: update pydoc for DeviceFeaturesTrait
* chore: Update to use StrEnum
* chore: add function to create field metadata
0 commit comments