1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add Tuya Video Doorbell fixture (#156103)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
asafhas
2025-11-08 11:22:51 +02:00
committed by GitHub
parent c84c098d2c
commit dc8ddc0dcc
6 changed files with 415 additions and 0 deletions

View File

@@ -207,6 +207,7 @@ DEVICE_MOCKS = [
"sj_tgvtvdoc", # https://github.com/orgs/home-assistant/discussions/482
"sjz_ftbc8rp8ipksdfpv", # https://github.com/orgs/home-assistant/discussions/51
"sp_6bmk1remyscwyx6i", # https://github.com/orgs/home-assistant/discussions/842
"sp_csr2fqitalj5o0tq", # https://github.com/home-assistant/core/pull/156103
"sp_drezasavompxpcgm", # https://github.com/home-assistant/core/issues/149704
"sp_nzauwyj3mcnjnf35", # https://github.com/home-assistant/core/issues/141278
"sp_rjKXWRohlvOTyLBu", # https://github.com/home-assistant/core/issues/149704

View File

@@ -0,0 +1,127 @@
{
"name": "Intercom",
"category": "sp",
"product_id": "csr2fqitalj5o0tq",
"product_name": "Security Camera ",
"online": true,
"sub": false,
"time_zone": "+02:00",
"active_time": "2025-10-31T14:49:40+00:00",
"create_time": "2025-10-31T14:49:40+00:00",
"update_time": "2025-10-31T14:49:40+00:00",
"function": {
"basic_flip": {
"type": "Boolean",
"value": {}
},
"basic_osd": {
"type": "Boolean",
"value": {}
},
"motion_sensitivity": {
"type": "Enum",
"value": {
"range": ["0", "1", "2"]
}
},
"sd_format": {
"type": "Boolean",
"value": {}
},
"motion_switch": {
"type": "Boolean",
"value": {}
},
"device_restart": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"basic_flip": {
"type": "Boolean",
"value": {}
},
"basic_osd": {
"type": "Boolean",
"value": {}
},
"motion_sensitivity": {
"type": "Enum",
"value": {
"range": ["0", "1", "2"]
}
},
"sd_storge": {
"type": "String",
"value": {
"maxlen": 255
}
},
"sd_status": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 5,
"scale": 1,
"step": 1
}
},
"sd_format": {
"type": "Boolean",
"value": {}
},
"movement_detect_pic": {
"type": "Raw",
"value": {}
},
"sd_format_state": {
"type": "Integer",
"value": {
"unit": "",
"min": -20000,
"max": 20000,
"scale": 1,
"step": 1
}
},
"motion_switch": {
"type": "Boolean",
"value": {}
},
"doorbell_active": {
"type": "String",
"value": {
"maxlen": 255
}
},
"doorbell_pic": {
"type": "Raw",
"value": {}
},
"device_restart": {
"type": "Boolean",
"value": {}
},
"alarm_message": {
"type": "String",
"value": {}
}
},
"status": {
"basic_flip": false,
"basic_osd": true,
"motion_sensitivity": 1,
"sd_storge": "0|0|0",
"sd_status": 1,
"sd_format": false,
"movement_detect_pic": "**REDACTED**",
"sd_format_state": 0,
"motion_switch": false,
"doorbell_active": "",
"doorbell_pic": "aHR0cHM6Ly90eS1ldS1zdG9yYWdlMzAtcGljLnMzLmV1LWNlbnRyYWwtMS5hbWF6b25hd3MuY29tL2U0ODYwMy0yMjU2NjYxOC1zempzYjU0ZDE2ZGI0ZTQ3OTAxYS9kZXRlY3QvMTc2MjE5OTIyMS5qcGVnP1gtQW16LVNlY3VyaXR5LVRva2VuPUZ3b0daWEl2WVhkekVLMyUyRiUyRiUyRiUyRiUyRiUyRiUyRiUyRiUyRiUyRndFYURDUmJiZDNWWldORmtsWUliQ0tDQXZCZCUyQnEwY2EzRURkZzdONTJqUDhmWUI3WVNSS0huSDNnRXZDRjh6OHpMSU92bkZrdG1UQWFLVldSNkxsMDlMMTJ6b09wR2ptekwwRGIyR1NRSG1uSmJNZXRhSm9nWlRQeGI4eGdMbTRwVkhidTkyZndib29UVVllMUwycmhNJTJCdiUyQkFtVG9DTVdwWE9sNThXUDVwZDAwSmdIWGlBUzVGWnhndVR5UWNJcmxFeG5JeW4wYzgwa0VRMjlVa3d2VThMRVpDeUtwTFlIRjJlYTElMkYlMkZPaUk2b1hrdVF3TU0lMkZCWHMlMkJYMWVYYWdnJTJGaW1oRUVhJTJCQ1REODUl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WI1NzkyIiwia2V5SWQiOiJkZWZhdWx0IiwiaXYiOiJjN2JiMTk2Mjc1MWRmOThhZWRiM2VjMGU3Mjk4MWVmMCJ9XSwiY21kIjoiaXBjX2Rvb3JiZWxsIiwidHlwZSI6ImltYWdlIn0="
}
}

View File

@@ -267,6 +267,59 @@
'state': 'recording',
})
# ---
# name: test_platform_setup_and_discovery[camera.intercom-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'camera',
'entity_category': None,
'entity_id': 'camera.intercom',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': 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.qt0o5jlatiqf2rscps',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[camera.intercom-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'access_token': '1',
'brand': 'Tuya',
'entity_picture': '/api/camera_proxy/camera.intercom?token=1',
'friendly_name': 'Intercom',
'model_name': 'Security Camera ',
'supported_features': <CameraEntityFeature: 2>,
}),
'context': <ANY>,
'entity_id': 'camera.intercom',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'idle',
})
# ---
# name: test_platform_setup_and_discovery[camera.mirilla_puerta-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -6137,6 +6137,37 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[qt0o5jlatiqf2rscps]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'tuya',
'qt0o5jlatiqf2rscps',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'Security Camera ',
'model_id': 'csr2fqitalj5o0tq',
'name': 'Intercom',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[queafegmhhmtivdxjd]
DeviceRegistryEntrySnapshot({
'area_id': None,

View File

@@ -2888,6 +2888,65 @@
'state': 'last',
})
# ---
# name: test_platform_setup_and_discovery[select.intercom_motion_detection_sensitivity-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'0',
'1',
'2',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.intercom_motion_detection_sensitivity',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Motion detection sensitivity',
'platform': 'tuya',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'motion_sensitivity',
'unique_id': 'tuya.qt0o5jlatiqf2rscpsmotion_sensitivity',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[select.intercom_motion_detection_sensitivity-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Intercom Motion detection sensitivity',
'options': list([
'0',
'1',
'2',
]),
}),
'context': <ANY>,
'entity_id': 'select.intercom_motion_detection_sensitivity',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_platform_setup_and_discovery[select.ion1000pro_countdown-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -4790,6 +4790,150 @@
'state': 'on',
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_flip-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.intercom_flip',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Flip',
'platform': 'tuya',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'flip',
'unique_id': 'tuya.qt0o5jlatiqf2rscpsbasic_flip',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_flip-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Intercom Flip',
}),
'context': <ANY>,
'entity_id': 'switch.intercom_flip',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_motion_alarm-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.intercom_motion_alarm',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Motion alarm',
'platform': 'tuya',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'motion_alarm',
'unique_id': 'tuya.qt0o5jlatiqf2rscpsmotion_switch',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_motion_alarm-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Intercom Motion alarm',
}),
'context': <ANY>,
'entity_id': 'switch.intercom_motion_alarm',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_time_watermark-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.intercom_time_watermark',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Time watermark',
'platform': 'tuya',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'time_watermark',
'unique_id': 'tuya.qt0o5jlatiqf2rscpsbasic_osd',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[switch.intercom_time_watermark-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Intercom Time watermark',
}),
'context': <ANY>,
'entity_id': 'switch.intercom_time_watermark',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_platform_setup_and_discovery[switch.interruptor_switch_1-entry]
EntityRegistryEntrySnapshot({
'aliases': set({