Just upgraded looks fine but i was using @wkd8176 component before so:
A question, the fan mode not appearing in the frontend is that an error fetching the available modes or they just not show up but we can use service calls to change them?
edit: doing a service call doesn’t work to set the fan mode, triggers this trace in the log
2019-07-21 12:56:13 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139813287375592]
Traceback (most recent call last):
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 374, in async_set_fan_mode
await self.hass.async_add_executor_job(self.set_fan_mode, fan_mode)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass_storage/apps/virtualenvs/homeassistant/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 370, in set_fan_mode
raise NotImplementedError()
NotImplementedError
I don’t know what went wrong when i cloned the repo, but looking at the code in cc i realised there weren’t any fan modes in there, but the github repo show them there, i must accidentally deleted or i really don’t know. So i did it again this it worked fine. If the fan is an intermediate state between LOW and MID or MID and HIGH, like this ‘AC_MAIN_WIND_STRENGTH_LOW_MID_W’ then it won’t setup.
So I added this to FAN_MODES
FAN_MODES = {
'LOW' : c_const.FAN_LOW,
'LOW_MID' : 'low-mid',
'MID' : c_const.FAN_MEDIUM, # Custom modes are supported but these
'MID_HIGH' : 'mid-high',
'HIGH' : c_const.FAN_HIGH, # are fine for now.
}
Is there are better way to this? for future maintenance i mean