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 support for setting fan direction #417

Closed
wants to merge 6 commits into from
Closed

Add support for setting fan direction #417

wants to merge 6 commits into from

Conversation

denismilanovic
Copy link

My recently purchased Arlec 130cm White 4 Blade Grid Connect Smart DC Ceiling Fan runs great on LocalTuya. Both the fan and the HA fan component support changing the direction that the fan spins, and this simple change in LocalTuya has allowed me to control the fan direction in HA.

@denismilanovic denismilanovic changed the title Add support for setting fan direction. Add support for setting fan direction Mar 25, 2021
Copy link
Collaborator

@postlund postlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typing issue, looks good otherwise!

custom_components/localtuya/fan.py Outdated Show resolved Hide resolved
@postlund
Copy link
Collaborator

postlund commented Apr 1, 2021

Right, not sure which version of python that adds support for that. I guess we should go withOptional[str] in that case.

@denismilanovic
Copy link
Author

Just updated the type to 'str | None' and added the future annotation. I figure it's better to match the signature used in core's fan component.

@denismilanovic
Copy link
Author

Hi @postlund , just wondering whether anything else is needed on this one. I think it should be good to go at this stage.

@denismilanovic
Copy link
Author

This can be abandoned once #542 is merged in instead.

@denismilanovic
Copy link
Author

Abandoning since #542 is now merged and supports this functionality.

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

Successfully merging this pull request may close these issues.

None yet

2 participants