Feature Request: Add status fields to StatusField enum
Background
In the Home Assistant integration for Roborock, we currently check device capabilities for several status-derived sensors using various custom properties, traits, or check functions (e.g., checking if wash_towel_mode or is_support_water_mode is enabled).
To make these capability checks clean and uniform, we propose adding the corresponding fields from StatusV2 to the StatusField enum, allowing them to be checked directly using api.device_features.is_field_supported(StatusV2, StatusField.FIELD_NAME).
Proposed StatusField Additions
We would like to add the following fields (defined in StatusV2) to the StatusField enum in roborock/data/v1/v1_containers.py:
| StatusField Candidate |
StatusV2 Dataclass Field |
Current check proxy in Home Assistant |
WATER_BOX_CARRIAGE_STATUS |
water_box_carriage_status |
api.device_features.is_support_water_mode |
WATER_BOX_STATUS |
water_box_status |
api.device_features.is_support_water_mode |
WATER_SHORTAGE_STATUS |
water_shortage_status |
api.device_features.is_support_water_mode |
DIRTY_WATER_BOX_STATUS |
dirty_water_box_status |
api.wash_towel_mode is not None |
CLEAR_WATER_BOX_STATUS |
clear_water_box_status |
api.wash_towel_mode is not None |
CLEAN_FLUID_STATUS |
clean_fluid_status |
api.wash_towel_mode is not None & api.device_features.is_clean_fluid_delivery_supported |
CLEAN_PERCENT |
clean_percent |
api.device_features.is_support_clean_estimate |
DOCK_ERROR_STATUS |
dock_error_status |
api.dust_collection_mode is not None |
RDT / DRYING_TIME_REMAINING |
rdt |
api.device_features.is_supported_drying |
By adding these fields to the enum and mapping them to their corresponding device features, dps protocols, IDs, or other internal checks, we can simplify entity registration and capability checking across the Home Assistant integration.
Feature Request: Add status fields to
StatusFieldenumBackground
In the Home Assistant integration for Roborock, we currently check device capabilities for several status-derived sensors using various custom properties, traits, or check functions (e.g., checking if
wash_towel_modeoris_support_water_modeis enabled).To make these capability checks clean and uniform, we propose adding the corresponding fields from
StatusV2to theStatusFieldenum, allowing them to be checked directly usingapi.device_features.is_field_supported(StatusV2, StatusField.FIELD_NAME).Proposed
StatusFieldAdditionsWe would like to add the following fields (defined in
StatusV2) to theStatusFieldenum inroborock/data/v1/v1_containers.py:StatusV2Dataclass FieldWATER_BOX_CARRIAGE_STATUSwater_box_carriage_statusapi.device_features.is_support_water_modeWATER_BOX_STATUSwater_box_statusapi.device_features.is_support_water_modeWATER_SHORTAGE_STATUSwater_shortage_statusapi.device_features.is_support_water_modeDIRTY_WATER_BOX_STATUSdirty_water_box_statusapi.wash_towel_mode is not NoneCLEAR_WATER_BOX_STATUSclear_water_box_statusapi.wash_towel_mode is not NoneCLEAN_FLUID_STATUSclean_fluid_statusapi.wash_towel_mode is not None&api.device_features.is_clean_fluid_delivery_supportedCLEAN_PERCENTclean_percentapi.device_features.is_support_clean_estimateDOCK_ERROR_STATUSdock_error_statusapi.dust_collection_mode is not NoneRDT/DRYING_TIME_REMAININGrdtapi.device_features.is_supported_dryingBy adding these fields to the enum and mapping them to their corresponding device features, dps protocols, IDs, or other internal checks, we can simplify entity registration and capability checking across the Home Assistant integration.