nyxnyx / xmeye

XMEye Cameras Custom Component for Home Assistant
GNU General Public License v3.0
30 stars 17 forks source link

TypeError: object method can't be used in 'await' expression #2

Open dapuzz opened 4 years ago

dapuzz commented 4 years ago

Hi Nyxnyx, I set up successfully your custom component and I get all camera entities but I see this error in homeassistant.log.

2020-05-03 15:48:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 492, in get
    return await self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 509, in handle
    image = await camera.async_camera_image()
  File "/home/asd/.homeassistant/custom_components/xmeye/camera.py", line 120, in async_camera_image
    return await image.result
TypeError: object method can't be used in 'await' expression

HA Version 107.6 Thank you

felpsnew commented 8 months ago

Hi Nyxnyx, I set up successfully your custom component and I get all camera entities but I see this error in homeassistant.log.

2020-05-03 15:48:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 492, in get
    return await self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 509, in handle
    image = await camera.async_camera_image()
  File "/home/asd/.homeassistant/custom_components/xmeye/camera.py", line 120, in async_camera_image
    return await image.result
TypeError: object method can't be used in 'await' expression

HA Version 107.6 Thank you

How did you configure it?