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

[NASA] Can not disable swing modes for AC (neither horizontal nor vertical) #187

Closed
laszloh opened this issue Oct 11, 2024 · 1 comment · Fixed by #193
Closed

[NASA] Can not disable swing modes for AC (neither horizontal nor vertical) #187

laszloh opened this issue Oct 11, 2024 · 1 comment · Fixed by #193

Comments

@laszloh
Copy link
Contributor

laszloh commented Oct 11, 2024

Since the PR #169 horizontal_swing can not be disabled by yaml. The device capabilities do not have any effect any more:

      capabilities: 
        vertical_swing: true
        horizontal_swing: false

result:
image


The problem arises from the change in init.py line 286:

        if capabilities.get(CONF_CAPABILITIES_VERTICAL_SWING):
            cg.add(var_dev.set_supports_vertical_swing(True))

        if capabilities.get(CONF_CAPABILITIES_HORIZONTAL_SWING):
            cg.add(var_dev.set_supports_horizontal_swing(True))

With this change, set_supports_xxxxx_swing is only called when the CONF_CAPABILITIES_xxxxx is True. If the capability is false, set_supports_xxxx_swing is never called.

Following the code, supports_xxxxx_swing_ can now only be true since the initialization value in samsung_ac_device.h is also true (see line 481 in samsung_ac_device.h).

A solution would be to set the initialization values for supports_horizontal_swing_ and supports_vertical_swing_ to false.

@omerfaruk-aran
Copy link
Owner

Hello,

We have prepared a PR to resolve issue #187 regarding the handling of horizontal and vertical swing control. The fix ensures that both true and false values are properly passed from the YAML configuration.

You can find the related PR here.

We've tested the solution, and it works as expected. Please see the attached image from the test results:

image

Thank you for your patience, and feel free to test it on your setup!

Best regards,

lanwin added a commit that referenced this issue Oct 21, 2024
Fix: Resolve issues #152, #187, #188 and #192 - Handle both true/false values for swing control and update preset configuration flexibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants