Hello! I am trying to perform an automation that I sent by HTML5 and by TELEGRAM the last capture my camera has made. In part it works fine, HTML5 sends me the image well, but TELEGRAM doesn’t. I get the following error in the log console.
Can't send file with kwargs: {'data': {'url': 'https://url.ui.nabu.casa/local/images/camara/salon_18_46.jpg', 'file': '/local/images/camara/salon_18_46.jpg'}}
*18:46 components/telegram_bot/__init__.py (ERROR)*
Can't load data. No data found in params!
*18:46 components/telegram_bot/__init__.py (WARNING)*
Este es mi código:
- id: '999999999'
alias: Última captura salón
trigger:
- event_data:
event_type: created
event_type: folder_watcher
platform: event
condition: []
action:
- data:
message: He detectado movimiento en el salón a las {{ now().hour }}:{{ now().minute }}, te adjunto una foto.
service: notify.telegram
- data_template:
data:
url: https://url.ui.nabu.casa/local/images/camara/{{ trigger.event.data.file }}
file: /local/images/camara/{{ trigger.event.data.file }}
service: telegram_bot.send_photo
- data_template:
data:
icon: /local/images/icons/camera_alert.png
image: https://url.ui.nabu.casa/local/images/camara/{{ trigger.event.data.file }}
url: https://url.ui.nabu.casa/local/images/camara/{{ trigger.event.data.file }}
message: He detectado movimiento en el salón a las {{ now().strftime("%H:%M:%S") }}, te la foto.
title: Foto sensor movimiento salón
service: notify.html5_notificaciones
muchas gracias!