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

fan slider issues with gradient and non-gradient #36

Open
ktownsend-personal opened this issue Oct 3, 2022 · 2 comments
Open

fan slider issues with gradient and non-gradient #36

ktownsend-personal opened this issue Oct 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ktownsend-personal
Copy link

I noticed my fan entity is not defaulting to gradient like it does for other entity types. That is an inconsistent look, so I set it to use gradient. Unfortunately in this mode the slider is broken and toggles the fan off no matter where I try to click to drag the slider. I haven't looked at the code, but my first thought is maybe the logic path is different when there are discrete positions for the slider (off/low/medium/high) and something is broken in that path.

I also noticed that the default slider for my fan, although it works as expected for controlling the speed, hides the spinning fan icon when it is at the highest speed. At each speed position the fan icon color changes closer to the slider color.

@ktownsend-personal ktownsend-personal added the bug Something isn't working label Oct 3, 2022
@rohankapoorcom
Copy link
Member

Can you share some details about the attributes of your fan when it's running? You can get there from Home Assistant --> Developer Tools --> States and then searching for the fan entity in the Filter entities box.

Here are two examples of my fans which are working as expected:

This one is a 3 speed fan (33, 67, 100%)
image
image

This one is a single speed fan (bathroom fan)
image
image

My guess is that your fan isn't setting the percentage attribute the same way mine is so different attributes may need to be checked.

@ktownsend-personal
Copy link
Author

Just got back from a trip and did some more troubleshooting. I confirmed the following:

  • without slider property in config the slider works, but it becomes opaque at max speed and hides the icon
  • with slider property in config, but only background: gradient defined, the slider does not work at all and touching the control just toggles the fan on and off
  • with slider property in config with both background and direction properties defined it works as you said.

I wouldn't have thought to try having both background and direction properties defined, since I assumed direction was an override for the default behavior, but apparently it breaks without it. I only tried it because I spotted your "minimum config" example in your README.md, and I don't know if that existed when I originally had the trouble.

If it's possible, it would be handy to have some kind of default direction when not specified so that it still functions. It would also be nice to have the opacity work appropriately when slider property is not defined for a fan. For example, it works as expected for light entity type when slider property isn't defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants