I’ve created a camera entity with the push platform
camera:
- platform: push
name: "Camera"
webhook_id: cam-connect
I’m trying to use a post request in python to send a jpg to the web hook and update the camera entity accordingly. No matter what way I’ve tried sending the data, encoding it differently it always errors.
I get 'Webhook call without POST parameter ’ if I try and send it as files or if I use the curl from the docs curl -X POST -F "image=@%f" http://my.hass.server.com:8123/api/webhook/my_custom_webhook_id
I get
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 129, in async_handle_webhook
response = await webhook["handler"](hass, webhook_id, request)
File "/usr/src/homeassistant/homeassistant/components/push/camera.py", line 90, in handle_webhook
data[camera.image_field].file.read(), data[camera.image_field].filename
AttributeError: 'str' object has no attribute 'file'
when I send it as ‘data’ .
Has anyone managed to correctly format a post request for this?
Thanks