Hello,
I am trying to send a photo to my telegram group configuration as follow:
Running Docker version supervised on Debian server:
Version core-2021.1.5
Version supervisor-2021.01.7
configuration.yaml
whitelist_external_dirs:
- /config/pics
- /tmp/snapshots
# TELEGRAM
telegram_bot:
- platform: polling
api_key: {removed}
allowed_chat_ids:
- {removed}
# TELEGRAM group
notify:
- platform: telegram
name: notifygrp
chat_id: {removed}
picture is located
bash-5.0# ls
community lastsnap.jpg snapshots
bash-5.0# pwd
/config/www
and
bash-5.0# ls
lastsnap.jpg
bash-5.0# pwd
/tmp/snapshots
this is the automation:
alias: Motion detected
description: ''
trigger:
- type: motion
platform: device
device_id: cbc562c863bac9dae8df28057d3b5e06
entity_id: binary_sensor.cam_motion
domain: binary_sensor
condition: []
action:
- service: telegram_bot.send_message
data:
message: '{{now().strftime("%d.%m.%Y-%H:%M")}}'
- service: telegram_bot.send_photo
data:
data:
file: /tmp/snapshots/lastsnap.jpg
- service: telegram_bot.send_photo
data:
data:
file: /config/www/lastsnap.jpg
mode: single
the message with the date gets delivered but the pictures don’t and I get in the log the following:
2021-02-01 19:12:32 WARNING (SyncWorker_0) [homeassistant.components.telegram_bot] Can't load data. No data found in params!
2021-02-01 19:12:32 ERROR (SyncWorker_0) [homeassistant.components.telegram_bot] Can't send file with kwargs: {'data': {'file': '/tmp/snapshots/lastsnap.jpg'}}
2021-02-01 19:12:32 WARNING (SyncWorker_1) [homeassistant.components.telegram_bot] Can't load data. No data found in params!
2021-02-01 19:12:32 ERROR (SyncWorker_1) [homeassistant.components.telegram_bot] Can't send file with kwargs: {'data': {'file': '/config/www/lastsnap.jpg'}}
Any advice?
Th