dave-code-ruiz / uhomeuponor

Custom Component to connect Home Assistant with Uhome Uponor Smatrix App
MIT License
19 stars 7 forks source link

I have a problem with set_hvac_mode NotImplementedError , it generate other error with schedy appdaemon addon #11

Closed dave-code-ruiz closed 4 years ago

dave-code-ruiz commented 4 years ago

feb 07 07:00:00 hassbian hass[5570]: 2020-02-07 07:00:00 ERROR (MainThread) [aiohttp.server] Error handling request feb 07 07:00:00 hassbian hass[5570]: Traceback (most recent call last): feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start feb 07 07:00:00 hassbian hass[5570]: resp = await task feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle feb 07 07:00:00 hassbian hass[5570]: resp = await handler(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl feb 07 07:00:00 hassbian hass[5570]: return await handler(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware feb 07 07:00:00 hassbian hass[5570]: return await handler(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware feb 07 07:00:00 hassbian hass[5570]: return await handler(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 135, in auth_middleware feb 07 07:00:00 hassbian hass[5570]: return await handler(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 123, in handle feb 07 07:00:00 hassbian hass[5570]: result = await result feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/api/init.py", line 355, in post feb 07 07:00:00 hassbian hass[5570]: domain, service, data, True, self.context(request) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1226, in async_call feb 07 07:00:00 hassbian hass[5570]: await asyncio.shield(self._execute_service(handler, service_call)) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1251, in _execute_service feb 07 07:00:00 hassbian hass[5570]: await handler.func(service_call) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 198, in handle_service feb 07 07:00:00 hassbian hass[5570]: self._platforms.values(), func, call, required_features feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 356, in entity_service_call feb 07 07:00:00 hassbian hass[5570]: future.result() # pop exception if have feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 384, in _handle_service_platform_call feb 07 07:00:00 hassbian hass[5570]: result = await result feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 422, in async_set_hvac_mode feb 07 07:00:00 hassbian hass[5570]: await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode) feb 07 07:00:00 hassbian hass[5570]: File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run feb 07 07:00:00 hassbian hass[5570]: result = self.fn(*self.args, **self.kwargs) feb 07 07:00:00 hassbian hass[5570]: File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 418, in set_hvac_mode feb 07 07:00:00 hassbian hass[5570]: raise NotImplementedError() feb 07 07:00:00 hassbian hass[5570]: NotImplementedError

LordMike commented 4 years ago

For your change, you should access uhome from the thermostat using self.uponor_client.uhome.

LordMike commented 4 years ago

Remember to remove the # TODO: Support setting hvac_mode line