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

Problem initialising the dehumidifieir - ValueError: None is not in list #43

Open
Dean-Moor opened this issue May 16, 2021 · 1 comment
Labels
question Further information is requested

Comments

@Dean-Moor
Copy link

Problem initialising the dehumidifieir.
I am getting the following in the HA Core log at initial startup of the component;

ERROR (MainThread) [homeassistant.components.climate] Error while setting up goldair_climate platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 239, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 478, in _async_add_entity
    original_icon=entity.icon,
  File "/config/custom_components/goldair_climate/dehumidifier/climate.py", line 88, in icon
    if self.tank_full_or_missing:
  File "/config/custom_components/goldair_climate/dehumidifier/climate.py", line 279, in tank_full_or_missing
    GoldairTuyaDevice.get_key_for_value(ERROR_CODE_TO_DPS_CODE, error)
  File "/config/custom_components/goldair_climate/device.py", line 252, in get_key_for_value
    return keys[values.index(value)] or fallback
ValueError: None is not in list

After this has appeared a few times, subsequent refereshes seem to be failing with;
[custom_components.goldair_climate.device] Failed to refresh device state for <deviceName>.

Any advice or pointers would be greatly appreaciated.
Thanks

@nicole-ashley
Copy link
Owner

Thanks for your report! It looks like your dehumidifier is returning an error code that this integration isn't expecting, and I haven't programmed it to gracefully fall back to a generic error (my bad!). To help me fix this, would you mind providing the following:

  1. Your model of dehumidifier
  2. Any error or alert states your dehumidifer may currently be in (a photo of the display and a screenshot of the Goldair app would be handy)
  3. Some debug logs to help me see what the underlying error code is (add this to your configuration.yaml and then restart to enable debug logging):
logger:
  default: warning
  logs:
    custom_components.goldair_climate: debug

With all of that information I should be able to take a stab at fixing this.

@nicole-ashley nicole-ashley added the question Further information is requested label May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants