J3n50m4t / Home-Assistant-DreamScreen-Service

Home Assistant Service for sending commands to a Wifi enabled DreamScreen
MIT License
31 stars 15 forks source link

Coroutine not iterable when sending to dream screen #16

Closed J3n50m4t closed 5 years ago

J3n50m4t commented 5 years ago

HA Version: 0.92.2 Hassio on rpi 3.

Dreamscreen just stopped working few weeks ago. Just realized today, it didn't switch on and off. The strange part is, in the states view the dreamscreen updates, I just can't switch modes, sources and brightness etc.

'coroutine' object is not iterable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1138, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1160, in _execute_service
    await handler.func(service_call)
  File "/config/custom_components/dreamscreen/__init__.py", line 101, in async_handle_dreamscreen_services
    for entity in target_entities:
TypeError: 'coroutine' object is not iterable
JasonEMartin commented 5 years ago

Hi, I believe the issue is to do with Python 3.7. Rolling back to an earlier version of Home Assistant, 0.80.1 which uses 3.6 has for me, restored functionality.

J3n50m4t commented 5 years ago

Fixed it - tested on latest HA Version 0.93.1