refactor: 全面重构腾讯云人脸识别插件
- 拆分 tencent_cloud_client.py(1311行)为 api_operations.py / image_processor.py / retry.py - 更新 HA 废弃 API: SupportsResponse.OPTIONAL, async_unload_platforms, native_value, 移除 CONNECTION_CLASS - 新增动态人员传感器管理(自动增/删) - 新增 detect_face 服务定义(services.yaml) - 移除 secret_key 持久化存储,增强安全性 - 完善错误映射前缀匹配 + 异常类型安全退避 - 修复 Coordinator 双重人员 ID 跟踪死代码 - 添加 _sanitize_error 脱敏,ImageCache LRU 缓存 - manifest.json 版本 2.1.0 + Pillow 依赖
This commit is contained in:
@@ -84,6 +84,74 @@ face_search:
|
||||
- label: "是"
|
||||
value: "1"
|
||||
|
||||
detect_face:
|
||||
name: 人脸检测
|
||||
description: 检测图片中的人脸位置和尺寸。
|
||||
fields:
|
||||
image_url:
|
||||
name: 图片URL
|
||||
description: 要检测的人脸图片的 URL。
|
||||
example: "https://example.com/image.jpg"
|
||||
selector:
|
||||
text:
|
||||
image_path:
|
||||
name: 图片路径
|
||||
description: 要检测的本地人脸图片路径。
|
||||
example: "/config/www/image.jpg"
|
||||
selector:
|
||||
text:
|
||||
image_file:
|
||||
name: 图片文件
|
||||
description: 要检测的人脸图片文件(Base64编码)。
|
||||
selector:
|
||||
text:
|
||||
camera_entity_id:
|
||||
name: 摄像头实体
|
||||
description: 用于获取图片的摄像头实体ID。
|
||||
example: "camera.front_door"
|
||||
selector:
|
||||
entity:
|
||||
domain: camera
|
||||
config_entry_id:
|
||||
name: 配置项ID
|
||||
description: 使用的配置项ID(多配置时指定)。
|
||||
selector:
|
||||
text:
|
||||
max_face_num:
|
||||
name: 最大人脸数量
|
||||
description: 最多检测的人脸数量。
|
||||
default: 1
|
||||
example: 1
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 10
|
||||
step: 1
|
||||
mode: box
|
||||
min_face_size:
|
||||
name: 最小人脸尺寸
|
||||
description: 最小人脸尺寸(像素)。
|
||||
default: 34
|
||||
example: 34
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 200
|
||||
step: 1
|
||||
mode: box
|
||||
need_rotate_check:
|
||||
name: 旋转检查
|
||||
description: 是否进行旋转检查(0=否,1=是)。
|
||||
default: 1
|
||||
example: 1
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- label: "否"
|
||||
value: "0"
|
||||
- label: "是"
|
||||
value: "1"
|
||||
|
||||
get_face_attributes:
|
||||
name: 获取人脸属性
|
||||
description: 获取图片中人脸的属性信息。
|
||||
|
||||
Reference in New Issue
Block a user