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

Off button not working #29

Closed
steveothesane opened this issue Apr 30, 2022 · 2 comments
Closed

Off button not working #29

steveothesane opened this issue Apr 30, 2022 · 2 comments

Comments

@steveothesane
Copy link

I have a Tuya ceiling fan controller that now uses percentages, I'm assuming, since the entity uses a slider with four positions and the button card wouldn't work any more. So I tried the percent card and everything works as expected except I can't turn it off with the off button. Tell me what you need to see from the logs and I'll provide it to you. Any help would be appreciated. Thank you.

@zhushp
Copy link
Contributor

zhushp commented May 17, 2022

Same here for my Xiaomi fan, the issue is at the setPercentage function here:

this.hass.callService('fan', 'turn_off', param);
param.percentage = this._offSP;
this.hass.callService('fan', 'set_percentage', param);

It turns off the fan, then send another set_percentage to 0 signal which would turn on the fan again. Removing the 2nd and 3rd line above makes it work. Created a PR #30 for the same.

@finity69x2
Copy link
Owner

I merged the PR.

Hopefully I don't get a flood of "hey this used to work...!" issues now.

:)

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

No branches or pull requests

3 participants