配置

通过Picture-Element-Card整合相机卡片:
- Amcrest - Home Assistant (home-assistant.io)
- 更好的相机卡与家庭助理 (thomascfoulds.com)

示例配置:

type: picture-elements
entity: camera.lakehouse
camera_image: camera.lakehouse
camera_view: live # or auto for snapshot view
elements:
- type: icon
icon: "mdi:arrow-up"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 25px
bottom: 50px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: up
- type: icon
icon: "mdi:arrow-down"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 25px
bottom: 0px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: down
- type: icon
icon: "mdi:arrow-left"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 50px
bottom: 25px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: left
- type: icon
icon: "mdi:arrow-right"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 0px
bottom: 25px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: right
- type: icon
icon: "mdi:arrow-top-left"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 50px
bottom: 50px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: left_up
- type: icon
icon: "mdi:arrow-top-right"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 0px
bottom: 50px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: right_up
- type: icon
icon: "mdi:arrow-bottom-left"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 50px
bottom: 0px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: left_down
- type: icon
icon: "mdi:arrow-bottom-right"
style:
background: "rgba(255, 255, 255, 0.25)"
right: 0px
bottom: 0px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: right_down
- type: icon
icon: "mdi:magnify"
style:
background: "rgba(255, 255, 255, 0.25)"
bottom: 25px
right: 25px
tap_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: zoom_in
hold_action:
action: call-service
service: amcrest.ptz_control
data:
entity_id: camera.lakehouse
movement: zoom_out