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