Skip to content

障碍照片 ​

地图障碍物照片可通过 Current Map 实体摄像头代理显示。

已选择的障碍物已选择的障碍物已选择的障碍物
面板已选择的障碍物面板已选择的障碍物

预览由 Dreame 吸尘器卡片

提供

/api/camera_map_obstacle_proxy/{entity_id}?token={access_token}&index={obstacle_index}&crop={is_cropped}&file={download_file}

  • entity_id:当前地图实体的ID(camera.{vacuum_name}_map)
  • access_token:摄像头实体访问令牌(可从 camera.{vacuum_name}_map 实体属性获取)
  • obstacle_index(可选,默认值 = 1):障碍物的索引(可从 camera.{vacuum_name}_map 实体属性获取)
  • is_cropped(可选,默认值 = 1):应用程序将障碍物照片裁剪以防止在某些设备上显示边框。此参数可设置为 0 以渲染原始障碍物图像。
  • download_file(可选,默认值 = 0):可设置为 1 以下载障碍物图片

提示

如果请求的障碍物不存在,则返回 404。

示例:

text
http://local.homeassistant/api/camera_map_obstacle_proxy/camera.vacuum_map?token=5df93cfcf8ecc23fa17b233ca938cc52f41e2b17a46ca291865be3f9ba64d89b&index=2&crop=1

仪表板示例

要查看如何使用此端点的示例,请参阅自定义卡片模板页面上的 障碍物卡。

历史地图的障碍物照片 ​

历史地图的地图障碍物照片可通过 Current Map 实体摄像头代理显示。

/api/camera_map_obstacle_history_proxy/{entity_id}?token={access_token}&history_index={history_index}&cruising={is_cruising_history}&index={obstacle_index}&crop={is_cropped}&file={download_file}

  • entity_id:当前地图实体的ID(camera.{vacuum_name}_map)
  • access_token:摄像头实体访问令牌(可从 camera.{vacuum_name}_map 实体属性获取)
  • history_index(可选,默认 = 1):历史条目的索引,从1到25(可从 sensor.{vacuum_name}_cleaning_history 实体属性获取)
  • is_cruising_history(可选,默认 = 0):可以设置为1以获取巡航历史,而不是清洁历史(仅在具备巡航功能的设备上)
  • obstacle_index(可选,默认值 = 1):障碍物的索引(可从 camera.{vacuum_name}_map 实体属性获取)
  • is_cropped(可选,默认值 = 1):应用程序将障碍物照片裁剪以防止在某些设备上显示边框。此参数可设置为 0 以渲染原始障碍物图像。
  • download_file(可选,默认值 = 0):可设置为 1 以下载障碍物图片

提示

如果请求的历史地图或障碍物不存在,则返回 404。

示例:

text
http://local.homeassistant/api/camera_map_obstacle_history_proxy/camera.vacuum_map?token=5df93cfcf8ecc23fa17b233ca938cc52f41e2b17a46ca291865be3f9ba64d89b&history_index=2&index=3