cameraxixi:
alias: Take_a_picture_xixi
sequence:
# This is Home Assistant Script Syntax
- service: camera.snapshot
data_template:
entity_id: camera.ezviz_xixi
filename: !secret XIXI_LOCAL_FILE
- delay:
seconds: 2
- service: notify.mobile_app_iphone_xr_2
data:
message: >
点击查看摄像头内容
title: '抓拍'
data:
attachment:
url: !secret XIXI_INTERNET_FILE
content-type: jpg
hide-thumbnail: false
XIXI_LOCAL_FILE: '/home/homeassistant/www/keting_camera_001.jpg'
XIXI_INTERNET_FILE: 'https://yourhost:8123/local/keting_camera_001.jpg'
XIXI_INTERNET_FILE里的域名是我自己的公网域名,
|