Hello,
I have this issue with my telegram bot, I’m able to send text messages but if I try to send e pic I got this errors:
2017-06-01 22:57:50 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1015, in _event_to_service_call
yield from service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/telegram_bot/__init__.py", line 223, in async_send_telegram_message
_render_template_attr(kwargs, ATTR_MESSAGE)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/telegram_bot/__init__.py", line 218, in _render_template_attr
attribute_templ.hass = hass
AttributeError: 'str' object has no attribute 'hass'
this is the configuration of the automation:
- alias: Motion Detected
initial_state: True
hide_entity: False
trigger:
platform: state
to: "on"
entity_id: binary_sensor.telecamera_salone_pir_alarm
condition:
condition: and
conditions:
- condition: state
entity_id: group.all_devices
state: 'not_home'
action:
- service: notify.telegram
data:
title: Send IpCam image
message: Motion Detected.
data:
photo:
- url: http://192.168.1.10:80/Streaming/picture
username: !secret ipcam_user
password: !secret ipcam_password
- delay:
seconds: 1
- service: notify.telegram
data:
title: Send IpCam image
message: Motion Detected.
data:
photo:
- url: http://192.168.1.10:80/Streaming/picture
username: !secret ipcam_user
password: !secret ipcam_password
this is the configuration of telegram:
notify:
- name: telegram
platform: telegram
chat_id: 217522237
telegram_bot:
platform: polling
api_key: 321122213:AAG3zLi4-1n2lTxMiAwPS5i55KFew7Hi1CQ
allowed_chat_ids:
- 217522237
Please can you help me?
Thanks.