Skip to content

Commit 79587b6

Browse files
author
Harry Coureau
committed
fix: name models without obstacle photos
1 parent ad306f9 commit 79587b6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎roborock/devices/traits/v1/device_features.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
from roborock.devices.traits.v1 import common
1010
from roborock.roborock_typing import RoborockCommand
1111

12+
# Qrevo 2 Pro uses single-line laser obstacle sensing without an RGB camera.
13+
_MODELS_WITHOUT_OBSTACLE_PHOTOS = frozenset({"roborock.vacuum.a294"})
14+
1215
# Cache of metadata for each trait class
1316
_metadata_cache: dict[type[RoborockBase], dict[str, dict[str, Any]]] = {}
1417

@@ -72,7 +75,7 @@ def __init__(self, product: HomeDataProduct, device_cache: DeviceCache) -> None:
7275
@property
7376
def is_obstacle_photo_download_supported(self) -> bool:
7477
"""Return whether obstacle-photo downloads are supported for trait discovery."""
75-
return self.is_ai_recognition_obstacle_supported and self._product.model != "roborock.vacuum.a294"
78+
return self.is_ai_recognition_obstacle_supported and self._product.model not in _MODELS_WITHOUT_OBSTACLE_PHOTOS
7679

7780
def is_field_supported(self, cls: type[RoborockBase], field_name: FieldNameBase) -> bool:
7881
"""Determines if the specified field is supported by this device.

0 commit comments

Comments
 (0)