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 yyj extraction hood device support #487

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

JobDoesburg
Copy link

@JobDoesburg JobDoesburg commented Aug 1, 2024

Add support for an extraction hood device (air purifier + lightbulb).

Also changed the rotation speed property to properly display a 0% to 100% range (with larger steps), instead of 0% to 4% in case of 5 steps.

@0x5e
Copy link
Owner

0x5e commented Aug 13, 2024

thanks @JobDoesburg ! change range cause 2 problem, one is during the plugin upgrade, cache issue, second is I forgot why I'm doing this, must have a reason...

@JobDoesburg
Copy link
Author

The reason for the changed rotation speed is to properly reflect the current status in homekit. Without the change I propose, a fan can be running at "4%" which would be the max speed, and each step is 1%. That looks weird in homekit. It is more intuitive to have the max speed be 100%, the lowest speed (off) be 0% and have intermediate steps. That is what the "step" property is for.

Do you have a suggestion for fixing the cache issue on upgrade? What is exactly the problem?

@0x5e
Copy link
Owner

0x5e commented Aug 17, 2024

Yes I agree with you, minstep=1 looks weird...
Correct me if I was wrong, I already set the unit to 'speed' instead of '%'. so in homekit, speed level will be shown as "1 speed", "2 speed", "3 speed", not "1%", "2%", "3%".
Another problem is, there's another fan device they have 3 steps, 5 steps, 6 steps or even 26 steps. most of them can't be devided by 100.
For the 26 step fan, 0, 3%, 6%, 9%, ... to 78%. There's a issue said he set the speed to 13/26, and expected to see 50% but not ... #44
For the cache issue #174 I didn't find out how to fix it by code.

@0x5e
Copy link
Owner

0x5e commented Aug 17, 2024

The jjy part is good for me, I suggest we split the rotation speed code into another pr is that okay? Anyway thanks for the help :)

@JobDoesburg
Copy link
Author

Correct me if I was wrong, I already set the unit to 'speed' instead of '%'. so in homekit, speed level will be shown as "1 speed", "2 speed", "3 speed", not "1%", "2%", "3%".

Hmm, also not entirely sure about this, but I remember HomeKit not displaying this properly everywhere (which would probably be a bug on Apple's side)

The jjy part is good for me, I suggest we split the rotation speed code into another pr is that okay?

Definitely!

@0x5e 0x5e merged commit db51db3 into 0x5e:develop_1.7.0 Aug 21, 2024
8 checks passed
@0x5e
Copy link
Owner

0x5e commented Aug 21, 2024

Thanks again!

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.

2 participants