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

VeSync Integration fails to initialize Superior 6000S Humidifier #137783

Closed
keatontaylor opened this issue Feb 8, 2025 · 4 comments
Closed

VeSync Integration fails to initialize Superior 6000S Humidifier #137783

keatontaylor opened this issue Feb 8, 2025 · 4 comments

Comments

@keatontaylor
Copy link
Contributor

The problem

Home Assistant 2025.2.0+ now supports VeSync humidifiers. However, my Superior 6000S does not appear to be working correctly after updating to the latest version of Home Assistant.

The Humidifier does show up as a new device, but the humidifier controls themselves are greyed out and report that the device is no longer being provided by the integration.

What version of Home Assistant Core has the issue?

2025.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

vesync

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vesync/

Diagnostics information

2025-02-07 21:15:16.457 ERROR (MainThread) [homeassistant.components.humidifier] Error adding entity humidifier.humidifier for domain humidifier with platform vesync
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 609, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 928, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1384, in add_to_platform_finish
    self.async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
    self._async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
    self.__async_calculate_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1087, in __async_calculate_state
    if state_attributes := self.state_attributes:
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/humidifier/__init__.py", line 199, in state_attributes
    if self.target_humidity is not None:
       ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/vesync/humidifier.py", line 140, in target_humidity
    return self.device.auto_humidity
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/pyvesync/vesyncfan.py", line 2881, in auto_humidity
    return self.config['target_humidity']
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'target_humidity'

2025-02-07 21:15:17.374 ERROR (MainThread) [homeassistant.components.sensor] vesync: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 738, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 601, in async_update
    await self.coordinator.async_request_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 275, in async_request_refresh
    await self._debounced_refresh.async_call()
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 114, in async_call
    await task
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 356, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _async_refresh
    self.async_update_listeners()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_update_listeners
    update_callback()
    ~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 559, in _handle_coordinator_update
    self.async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
    self._async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
    self.__async_calculate_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1087, in __async_calculate_state
    if state_attributes := self.state_attributes:
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/humidifier/__init__.py", line 199, in state_attributes
    if self.target_humidity is not None:
       ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/vesync/humidifier.py", line 140, in target_humidity
    return self.device.auto_humidity
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/pyvesync/vesyncfan.py", line 2881, in auto_humidity
    return self.config['target_humidity']
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'target_humidity'

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Feb 8, 2025

Hey there @markperdue, @webdjoe, @TheGardenMonkey, @cdnninja, @iprak, mind taking a look at this issue as it has been labeled with an integration (vesync) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vesync can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vesync Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vesync documentation
vesync source
(message by IssueLinks)

@iprak
Copy link
Contributor

iprak commented Feb 8, 2025

The humidifier support was only verified on Classic200S, Classic300S.

It seems that pyvesync attempts to return self.config['target_humidity'] for Superior 6000S but it doesn't have that value.

This issue however has been addressed in pyvesync library webdjoe/pyvesync@380b3e3. We just need to wait on a new release of the library and then consume it.

@cdnninja
Copy link
Contributor

Lets track this in #129120 as it covers the same issue and device.

@home-assistant close

@cdnninja
Copy link
Contributor

@home-assistant close

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

No branches or pull requests

3 participants