mirror of
https://github.com/home-assistant/core.git
synced 2026-12-04 04:41:30 -04:00
Add support for Tuya cdsxj camera category (#189888)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
epenet
parent
b0a3f85be7
commit
910d2691d0
@@ -30,6 +30,7 @@ class TuyaCameraEntityDescription(TuyaEntityDescription, CameraEntityDescription
|
||||
|
||||
|
||||
CAMERAS: dict[DeviceCategory, TuyaCameraEntityDescription] = {
|
||||
DeviceCategory.CDSXJ: TuyaCameraEntityDescription(key=""),
|
||||
DeviceCategory.DGHSXJ: TuyaCameraEntityDescription(key=""),
|
||||
DeviceCategory.SP: TuyaCameraEntityDescription(key=""),
|
||||
}
|
||||
|
||||
@@ -474,6 +474,11 @@ class DeviceCategory(StrEnum):
|
||||
"""Single Phase power meter (undocumented)"""
|
||||
BZYD = "bzyd"
|
||||
"""White noise machine (undocumented)"""
|
||||
CDSXJ = "cdsxj"
|
||||
"""Security camera (undocumented)
|
||||
|
||||
see https://github.com/home-assistant/core/issues/177197
|
||||
"""
|
||||
CWJWQ = "cwjwq"
|
||||
"""Smart Odor Eliminator-Pro (undocumented)
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "Front Gate Camera",
|
||||
"category": "cdsxj",
|
||||
"product_id": "vvslhf6u7qesficz",
|
||||
"product_name": "NVS-IPC-I5",
|
||||
"online": true,
|
||||
"sub": false,
|
||||
"time_zone": "+02:00",
|
||||
"active_time": "2025-06-22T19:56:39+00:00",
|
||||
"create_time": "2025-06-22T19:56:39+00:00",
|
||||
"update_time": "2025-06-22T19:56:39+00:00",
|
||||
"function": {},
|
||||
"local_strategy": {},
|
||||
"status_range": {},
|
||||
"status": {},
|
||||
"set_up": true,
|
||||
"support_local": true,
|
||||
"quirk": null,
|
||||
"warnings": null
|
||||
}
|
||||
@@ -331,6 +331,61 @@
|
||||
'state': 'idle',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[camera.front_gate_camera-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': None,
|
||||
'device_class': None,
|
||||
'device_id': <DeviceEntry identifiers=[('tuya', 'zcifseq7u6fhlsvvjxsdc')]>,
|
||||
'disabled_by': None,
|
||||
'domain': 'camera',
|
||||
'entity_category': None,
|
||||
'entity_id': 'camera.front_gate_camera',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': <CameraEntityFeature: 2>,
|
||||
'translation_key': None,
|
||||
'unique_id': 'tuya.zcifseq7u6fhlsvvjxsdc',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[camera.front_gate_camera-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<CameraEntityStateAttribute.ACCESS_TOKEN: 'access_token'>: '1',
|
||||
<CameraEntityStateAttribute.BRAND: 'brand'>: 'Tuya',
|
||||
<EntityStateAttribute.ENTITY_PICTURE: 'entity_picture'>: '/api/camera_proxy/camera.front_gate_camera?token=1',
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Front Gate Camera',
|
||||
<CameraEntityStateAttribute.MODEL_NAME: 'model_name'>: 'NVS-IPC-I5',
|
||||
<EntityStateAttribute.SUPPORTED_FEATURES: 'supported_features'>: <CameraEntityFeature: 2>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'camera.front_gate_camera',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'idle',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[camera.garage_camera-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
@@ -10989,6 +10989,36 @@
|
||||
'via_device_id': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_device_registry[zcifseq7u6fhlsvvjxsdc]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': None,
|
||||
'configuration_url': None,
|
||||
'connections': set({
|
||||
}),
|
||||
'disabled_by': None,
|
||||
'entry_type': None,
|
||||
'hw_version': None,
|
||||
'id': <ANY>,
|
||||
'identifiers': set({
|
||||
tuple(
|
||||
'tuya',
|
||||
'zcifseq7u6fhlsvvjxsdc',
|
||||
),
|
||||
}),
|
||||
'labels': set({
|
||||
}),
|
||||
'manufacturer': 'Tuya',
|
||||
'model': 'NVS-IPC-I5',
|
||||
'model_id': 'vvslhf6u7qesficz',
|
||||
'name': 'Front Gate Camera',
|
||||
'name_by_user': None,
|
||||
'serial_number': None,
|
||||
'sw_version': None,
|
||||
'via_device_id': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_device_registry[zf8vgiwoa07jwegtjd]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
|
||||
Reference in New Issue
Block a user