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

Buttons for Buzzer and Ionizer, Levels for LED brightness #90

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

garv3
Copy link

@garv3 garv3 commented May 23, 2022

Added support for buzzer and ionizer.
There will now be additional buttons to toggle the buzzer and ionizer on and off on supported devices.
The LED Button will toggle between 0%, 25%, 75% and 100% brightness if the brightness control value is a number.

image

garv3 added 2 commits May 23, 2022 15:07
Added support for Buzzer
Added Ionizer Button
@garv3 garv3 changed the title Update fan-xiaomi.js Buttons for Buzzer and Ionizer May 23, 2022
garv3 added 2 commits May 23, 2022 16:54
Added Brightness to LED Button
Hiding LED brightness for unsupported devices.
@garv3 garv3 changed the title Buttons for Buzzer and Ionizer Buttons for Buzzer and Ionizer, Levels for LED brightness May 23, 2022
@Olegz73
Copy link

Olegz73 commented May 23, 2022

Thanks for you work! But at my dmaker.fan.p9 this card look diferent Снимок
Can you fix it ? i didn't see led brightness and buzzer button.
and my fan don't have ionizer function, need off toggle in setup to off it.
Buttons angle and timer doesn't work at all ((
and can you add a buzzer sound levels ? Standart to loud((
thanks

@garv3
Copy link
Author

garv3 commented May 23, 2022

So first of all this is just a pull request for the project. It is not implemented yet. If you installed or downloaded the release and did not apply the changes in this pull request, you will see neither the buzzer and ionizer buttons nor the LED brightness.

If you already applied the changes:
If your fan does not support ionization, the button will not be shown. Don't worry about that.
Does the buzzer support a volume setting? I do not own your fan so I do not know which features it supports exactly. If you can send me a list of all entities belonging to your fan device including the default names their types and allowed values / ranges, I might be able to figure out how to implement the volume setting for the buzzer.
The buzzer of the Smartmi Standing Fan 3 does not have a buzzer volume setting. It's just a on/of switch. I think this might be the same on you fan. If so, there is no way to change the volume.

@Olegz73
Copy link

Olegz73 commented May 23, 2022

Thank you for the answer.
Model of my fan - Xiaomi Smart Tower Fan (dmaker.fan.p9)
Thanks for the explaination about buzzer, yes my fan have the same buzzer settings , only on\off.
List of all entities:
fan

@garv3
Copy link
Author

garv3 commented May 23, 2022

Okay. So your setup does support the on/off button for the buzzer. LED brightness and ionizer are not supported and will not show in the UI. This means the only difference my changes will make to your card is the buzzer button.
But this will only be available when @ikaruswill has merged this pull request into the project an created a new release. You will then have to update the card through HACS (if you installed it that way) or manually. Alternatively you could use the fan-xiaomi.js from my repo, but if you installed the card through HACS it won't be easy to clear the cache so the changes show.

@Olegz73
Copy link

Olegz73 commented May 23, 2022

thank you. i install this via HACS. Wait when @ikaruswill create a new release.
But now i open fan-xiaomi.js and didn't see model of my fan dmaker.fan.p9 maybe that's the problem?

@garv3
Copy link
Author

garv3 commented May 23, 2022

The model of your fan usually does not need to be mentioned in the config. Only special models need their own config if they do not follow the naming scheme. But this is more of a talk to @ikaruswill. I only intended to add the missing features with this pull request - have not been involveld in this project before.

@Olegz73
Copy link

Olegz73 commented May 23, 2022

ok. thank you again

@garv3
Copy link
Author

garv3 commented May 24, 2022

@ikaruswill Did you have a chance to check the changes? If you have any questions, let me know!

@faquaresma
Copy link

Hi,

This new feature is in the release 2.10 ?

Thanks

Copy link
Owner

@ikaruswill ikaruswill left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for implementing this. I think overall it looks good, though 2 things:

  • We'll probably need to re-implement this after the big refactor to the boilerplate-card.
  • We'll need to revisit the UI/UX sometime since this adds 3 more buttons.

@ikaruswill
Copy link
Owner

On second thought, we might want to merge the refactor in first as it's relatively complex. Adding more features right away will introduce conflicts that will make the transition much harder.

Here's what I suggest:

  • As much as it pains me to say after all your work, let's keep this branch/MR unmerged for the moment
  • Merge in the refactor to boiletplate card #95
  • Release and ensure that it's stable
  • Finally, let's integrate your changes in another MR

How does that sound?

@ikaruswill ikaruswill self-requested a review June 13, 2022 13:41
@garv3
Copy link
Author

garv3 commented Jun 20, 2022

Okay. Let's take this route.

@garv3
Copy link
Author

garv3 commented Aug 21, 2022

So, what about this PR? I am currently using my own forked version of this repo until the features have been implemented. Any ETA?

@ian-craig
Copy link
Collaborator

@garv3 sorry for the delay. I think the boilerplate card refactor @ikaruswill mentioned should be stable enough now and we can go ahead with your change. Could you please merge master and send an update to this PR? I'll try to take a look quickly once that comes through.

There have been quite a few changes, so let me know if you run into any issues and I'll be happy to help.

@ian-craig ian-craig self-requested a review September 21, 2022 23:46
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.

5 participants