Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If AC off turning on throws error KeyError: '@AC_MAIN_OPERATION_ALL_ON_W' #45

Closed
petarvucetin opened this issue Feb 8, 2020 · 1 comment

Comments

@petarvucetin
Copy link

petarvucetin commented Feb 8, 2020

Thank you for making this happen. I tried few things to see if I can fix it. I tried wideq from your repo but I must be doing something wrong.

I am running HASS in ubuntu VM.

If AC is off turning it on from HASS gives this error:

 File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1226, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1251, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 198, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 356, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 384, in _handle_service_platform_call
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 422, in async_set_hvac_mode
    await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthinq/climate.py", line 199, in set_hvac_mode
    self._ac.set_on(True)
  File "/usr/local/lib/python3.7/site-packages/wideq/ac.py", line 231, in set_on
    op_value = self.model.enum_value('Operation', op.value)
  File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 350, in enum_value
    return options_inv[name]
KeyError: '@AC_MAIN_OPERATION_ALL_ON_W'

Any suggestions?

@sampsyo
Copy link
Owner

sampsyo commented Feb 8, 2020

That's odd! Looks like this is an incompatibility with your model and the wideq library, no the Home Assistant integration. Can you please open an issue there with some details—especially the output of example.py mon for your model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants