Closed lassem closed 5 years ago
@lassem seems to fix the issue but introduces a new bug. I cannot turn off thermostats through HA. I am getting:
Log Details (ERROR)
Thu May 09 2019 19:06:37 GMT+0200 (Central European Summer Time)
'FreeAtHomeThermostat' object has no attribute 'thermostat'
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 "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/config/custom_components/freeathome/climate.py", line 144, in async_turn_off
await self.thermostat.turn_off()
AttributeError: 'FreeAtHomeThermostat' object has no attribute 'thermostat'
Woopsie. Should be fixed now. Thanks for the feedback.
@lassem @jheling works for me. Kudos!
Fix for #12