diff --git a/homeassistant/components/image_processing/openalpr_cloud.py b/homeassistant/components/image_processing/openalpr_cloud.py index 2fdc3d72f2e..dbf36dcd86e 100644 --- a/homeassistant/components/image_processing/openalpr_cloud.py +++ b/homeassistant/components/image_processing/openalpr_cloud.py @@ -109,12 +109,14 @@ class OpenAlprCloudEntity(ImageProcessingAlprEntity): websession = async_get_clientsession(self.hass) params = self._params.copy() - params['image_bytes'] = str(b64encode(image), 'utf-8') + body = { + 'image_bytes': str(b64encode(image), 'utf-8') + } try: with async_timeout.timeout(self.timeout, loop=self.hass.loop): request = yield from websession.post( - OPENALPR_API_URL, params=params + OPENALPR_API_URL, params=params, data=body ) data = yield from request.json() diff --git a/tests/components/image_processing/test_openalpr_cloud.py b/tests/components/image_processing/test_openalpr_cloud.py index 40945f932c6..e840bce54f7 100644 --- a/tests/components/image_processing/test_openalpr_cloud.py +++ b/tests/components/image_processing/test_openalpr_cloud.py @@ -149,8 +149,7 @@ class TestOpenAlprCloud(object): 'secret_key': "sk_abcxyz123456", 'tasks': "plate", 'return_image': 0, - 'country': 'eu', - 'image_bytes': "aW1hZ2U=" + 'country': 'eu' } def teardown_method(self):