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

Add dehumidifier function #112

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Add dehumidifier function #112

merged 2 commits into from
Jul 15, 2024

Conversation

JyunWei-Su
Copy link
Contributor

@JyunWei-Su JyunWei-Su commented Jul 11, 2024

Add the following dehumidifier function:

  • Fan operation mode select (duplicated, removed)
  • Fan direction select
  • Set humidity select (duplicated, removed)
  • Power control switch (duplicated, removed)
  • Buzzer control switch
  • NanoeX control switch

@osk2 osk2 added the enhancement New feature or request label Jul 13, 2024
@osk2 osk2 self-assigned this Jul 13, 2024
@osk2
Copy link
Owner

osk2 commented Jul 13, 2024

Thank you, @JyunWei-Su

I have two questions:

  1. Since the humidifier entity already includes power control and operation mode, do we really need separate entities for these functions?
  2. Regarding the humidity select entity, should we change the operation mode to manual humidity setting before sending the command?

@JyunWei-Su
Copy link
Contributor Author

JyunWei-Su commented Jul 13, 2024

  1. When I checked the logs, I found that my humidifier entity did not load correctly. I am not sure if this is caused by another bug, so I added two control entities (power control and operation mode) separately.
2024-07-13 14:47:53.237 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry *** for humidifier
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 801, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/humidifier/__init__.py", line 126, in async_unload_entry
    return await component.async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 202, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
  1. Regarding the humidity select entity, should we change the operation mode to manual humidity setting before sending the command?
    No, the operation mode will be automatically changed if the humidity select entity value has changed (and the command is sent).

Note: my dehumidifier model is F-Y20JH
Core version: 2024.7.2
Supervisor version: 2024.06.2
panasonic smart app version based on 2.8.1

@JyunWei-Su
Copy link
Contributor Author

JyunWei-Su commented Jul 13, 2024

Hi @osk2 ,
I have fixed the humidifier.py so that it works well. #110
According to your previous suggestion, I think we DON'T need to separate entities for three functions (fan operation mode select, set humidity select, and power). I have removed the duplicated entities.

@osk2 osk2 merged commit 8aec97a into osk2:master Jul 15, 2024
5 checks passed
@osk2
Copy link
Owner

osk2 commented Jul 15, 2024

I'm going to merge this PR and do some testing.
Since I am busy with other things, this could take a while before we can release the new version.

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

Successfully merging this pull request may close these issues.

2 participants