biker91620 / ha-cozytouch

Cozytouch support for Home Assistant
GNU General Public License v2.0
16 stars 22 forks source link

Hassbian - Problem installation ha-cozytouch #4

Closed ninjax95 closed 5 years ago

ninjax95 commented 5 years ago

Hello and thank you for sharing, I try to install the cozytouch component on home assistant. I typed the command, the cozypy directory is in /srv/homeassistant/lib/python3.5/site-packages/ but when I run home assistant, I find in the logs: 2019-03-29 14:48:09 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform cozytouch Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for return fut.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/cozytouch/sensor.py", line 30, in setup_platform from cozypy.client import CozytouchClient File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/client.py", line 7, in from cozypy.handlers import SetupHandler File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/handlers.py", line 37 place: CozytouchPlace = self.find_place(heater["placeOID"]) ^ SyntaxError: invalid syntax 2019-03-29 14:48:09 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform cozytouch Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for return fut.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/cozytouch/binary_sensor.py", line 28, in setup_platform from cozypy.client import CozytouchClient File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/client.py", line 7, in from cozypy.handlers import SetupHandler File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/handlers.py", line 37 place: CozytouchPlace = self.find_place(heater["placeOID"]) ^ SyntaxError: invalid syntax 2019-03-29 14:48:09 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform cozytouch Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for return fut.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 34, in setup_platform from cozypy.client import CozytouchClient File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/client.py", line 7, in from cozypy.handlers import SetupHandler File "/srv/homeassistant/lib/python3.5/site-packages/cozypy/handlers.py", line 37 place: CozytouchPlace = self.__find_place(heater["placeOID"]) ^ SyntaxError: invalid syntax

Thanks for you help

I am on 0.90.2 HASSBIAN

biker91620 commented 5 years ago

Hi You are using python3.5 that does not support syntax for annotating variables. The only way is to upgrade python from 3.5to 3.6.