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

FR: 4+ speed fan abilities #14

Closed
kreene1987 opened this issue Jun 21, 2021 · 8 comments
Closed

FR: 4+ speed fan abilities #14

kreene1987 opened this issue Jun 21, 2021 · 8 comments

Comments

@kreene1987
Copy link

I have the Inovelli LZW36 which has a "breeze" mode at percentage 1. I'd like to add a button for there to be 5 total options (4 speeds plus off).

I have heard of even more as well where they have low-medium and medium-high. Would be cool to make it scaleable.

@kquinsland
Copy link

I am a +1 for this. I have a few fans that can run at one of 5 speeds: off, s1, s2, s3, s4.

With the new HA API, the device itself supports any speed from 0-100% and internally maps it to one of the 5 supported speeds/power levels.

A 4th speed button for this component would be appreciated!

@magnetic157
Copy link

+1 for this

@tungmeister
Copy link

tungmeister commented Jul 27, 2021

+1 my bedroom ceiling fan has 6 speed levels so this would be great

@finity69x2
Copy link
Owner

So now you see the problem I run into adding buttons.

I currently offer 3 speed settings.

the original FR here was for 4 speed settings (adding one button)

Now the FR has been bumped up to 5 speeds (adding two buttons). Or is it really 6 speeds not including 0 so adding 3 more buttons?

It becomes increasingly difficult to program multiple additional buttons that also have the ability to be both reversed in order and optionally hidden. And the additional buttons have to make logical sense (med-low, med-hi, med-med-hi, med-hi-hi?)

And as the number of buttons increases the plugin row takes up even more of the real estate on the card, which is extremely limited on mobile devices.

All of this is why I typically only have added support for three (or two) speeds.

TBH, this was never meant as a direct replacement for all of the functionality of the built-in fan control row.

I originally adapted the "fan control entity row" to make a nicer interface for the existing 3 speed fan control row but with the eventual requests for addition of the other plugins that I've made (including this one) my idea was to make them all thematically consistent along with offering a quick way to set some limited number of setpoints (like in the light brightness plugin and now this one with the near infinite number of fan speeds using percentages).

I have really resisted the "hey, can you add another button (or two, three, five, etc buttons)?"

Thoughts?

@kquinsland
Copy link

kquinsland commented Jul 29, 2021

It becomes increasingly difficult to program multiple additional buttons that also have the ability to be both reversed in order and optionally hidden. And the additional buttons have to make logical sense (med-low, med-hi, med-med-hi, med-hi-hi?)

I'm not sure when hiding / reversing the order is important. What's the use case for this?

Thoughts?

Visually, I think you're limited to at most 4 buttons... maybe more if the name is short or the card/column is wide.
I am not a FE dev, so I don't know what faculties the card has to determine it's width / calculate the maximum number of buttons that should be displayed, but if you assume that such code exists, make it dynamic.

Example: I've defined 8 percentages and given them human friendly names:

speeds:
  - name: off
     speed: 0
  - name: really slow
     speed: 10
  - name: slightly faster
     speed: 20
  - name: about the same
     speed: 22
  - name: medium
     speed: 45
  - name: medium and a bit
     speed: 55
  - name: medium and some more
     speed: 65
  - name: almost fast
     speed: 85
  <..etc...>

I would expect off and really slow and slightly faster and about the same to be the names rendered in all cases, but if the screen / card permitted more space, the remaining buttons would be displayed. Yes, i know that the names are not consistent in length and almost all of the example names I gave are comically too long to 'fit' in the little square buttons but my intention was to show that it's up to the user to find names that make sense and look good for their arbitrary preferences / needs. If i were to actually implement this, I would almost certainly use short names or even numbers / emoji numbers like 2️⃣.

This would also allow users to re-arrange the name/percentage tuples based on their needs. In my example above, i need reliable access to off and low speeds so they are the first 4 buttons to render. On some devices with large screens, several more buttons (that are less important to me) could also show up.

Or just ignore everybody wining and remind us all that pull requests are welcome :D.

@finity69x2
Copy link
Owner

finity69x2 commented Jul 30, 2021

What's the use case for this?

It was a FR request a long time back in one of my original button rows (I can't remember which one) so I made it an option so as to not break people setups.

But now I use that option too, since I think having off on the left as opposed to the right fits better to match the built-in HA toggle scheme.

Visually, I think you're limited to at most 4 buttons...

right. That's where my thinking on this ended up as well.

I don't know what faculties the card has to determine it's width

the plugin has the options to select the height and width of the buttons but then again you run into that visual limit of real estate for the buttons if they are too wide or the limitation on using useful names for each button if they are too narrow.

it really does come up against a hard usefulness limit at some point

if you assume that such code exists, make it dynamic.

that's also another issue...I'm not a real developer either so my technical abilities are also limited.

I originally forked the first button row from someone else because I wanted more control over the look of the plugin.

Then others started using it and made requests for other thematically equivalent button row plugins and it was usually easy enough to figure out how to adapt the original to the new requests. So, now I have this whole suite of different plugins. Which is actually pretty cool! :)

But again, my technical abilities are kind of limited.

Or just ignore everybody wining and remind us all that pull requests are welcome :D.

Pull requests are always welcome! :)

I also could suggest that since the setpoints are selectable that you could use two button rows and use one row for low speeds and one row for high speeds. I haven't tried it but I think that would work. The only limitation on that would be that because of the way the button display works if you selected a setpoint that is at the high end the last button on the lower setpoints would be active and the lower button on the high setpoint row would be on if the setpoint is in the low button row range. (it's hard to explain but try it and you'll see what I mean)

That would give the ability for 2 speeds (using the "is two speed" option), 3 speeds (using no options), 4 speeds (using two rows with the two speed option), 5 speeds (using two rows with the two speed option on one and none on the other), or 6 speeds (using two rows with two options) and not run up against any of the limitations noted above.

and lastly, I hate to guide people away from here but there are other button options in which the entire card can be nothing but buttons with different functions.

Mine just offers an easier option to get buttons for a quick access to the desired limited setpoints you want to use along with being flexible enough to make them all look the way you want without being overly complicated.

@kquinsland
Copy link

But now I use that option too, since I think having off on the left as opposed to the right fits better to match the built-in HA toggle scheme.

Makes sense. Thanks for enlightening me :)

the plugin has the options to select the height and width of the buttons but then again you run into that visual limit of real estate

Right, i was referring to the actual width of the card. E.G. When the card w/ the fan row is displayed on my phone, the width is X but when that same card is displayed on a 50 inch 4K monitor, the width is many multiples of X. What is "almost cluttered" on my phone is "really sparse" on the desktop.

it really does come up against a hard usefulness limit at some point

Yeah, if you do a thought experiment about a fan that has 100 distinct speeds, do you really need 100 buttons? What about only 25 buttons? Even 10 buttons might be more than is reasonable in most cases. Or, if you really do need 25 distinct buttons, maybe a dropdown or numerical input is better for you?

that's also another issue...I'm not a real developer either so my technical abilities are also limited.

That makes your contribution to Home Assistant / LoveLace that much more impressive. Thank you again for contributing this!

and lastly, I hate to guide people away from here but there are other button options in which the entire card can be nothing but buttons with different functions.

That might be the better choice for people that need 5+ buttons for a fan.

@finity69x2
Copy link
Owner

I have considered just creating a 5 speed button plugin (not including off) with the option of hiding the middle button. So that would give the options of 2, 3, 4 or 5 speeds. But that would definitely be my limit.

But then I would need to create an equivalent one for each of the "multi-option" control plugins (cover position, light brightness, fan mode, fan percent, maybe another that I'm forgetting).

It would mean maintaining 4 or 5 more plugins but it would honestly be the easiest way to add more buttons without disrupting the existing stuff at all.

I'll get back to you...

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

5 participants