PLZ help me… i can’t solve this problem for a week…
i donlt know what;s the problem… wrong code? what;s wrong code?
plz help me…
each configuration.yaml, automations.yaml and scripts.yaml.
my device is ESP32-cam and i add esphome. nodename is espcam1
i want to save snapshot file in my /config/www/images/
this is error log
homeassistant:
# HA접속시 표시되는 이름
name: LAB
#whitelist_external_dirs:
#- /config/www/images
# Example configuration.yaml entry
camera:
- platform: local_file
name: cam1
file_path: /config/www/images/cam_snapshot.jpg
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config: #이거 없애면 큰일난다. 404 에러 바로 뜬다.
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Text to speech
tts:
- platform: google_translate
#group: !include groups.yaml
#automation: !include automations.yaml
#script: !include scripts.yaml
#scene: !include scenes.yaml
configration.yaml
- alias: last motion time
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.motion
from: 'off'
to: 'on'
action:
- service: input_datetime.set_datetime
data_template:
entity_id: input_datetime.last_motion_time
time: '{{ (as_timestamp(now()) | timestamp_custom("%H:%M:%S", true)) }}'
- service: script.snapshot_cam1
#- service: camera.snapshot
#data:
#entity_id: camera.espcam1
#filename: /config/www/images/espcam1_{{ now().strftime("%Y%m%d-%H%M%S")}}
automations.yaml
snapshot_cam1:
sequence:
- condition: state
entity_id: camera.espcam1
state: 'idle'
- service: camera.snapshot
data:
entity_id: camera.espcam1
filename: /config/www/images/cam_snapshot.jpg
- delay: 5
- service: camera.snapshot
data_template:
entity_id: camera.espcam1
filename: /config/www/images/cam_snapshot_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
scripts.yaml
plz help me thank a lot