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

Calculate fan speed step count #2818

Merged
merged 3 commits into from Aug 30, 2022

Conversation

wjtje
Copy link
Contributor

@wjtje wjtje commented Aug 25, 2022

Summary

This PR changes the number of steps shown on the detail page of a fan entity because the default number of nine steps wouldn't work for fan entities with some percentage step size. This new function will calculate an optimal number of steps based on the percentage step size of the fan with a maximum of nine steps.

Screenshots

Before:
Screenshot_20220825_115230_android

After:
image

Before:
Screenshot_20220825_115444_android

After:
image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

This fixes #2815

@homeassistant
Copy link
Contributor

Hi @wjtje,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copy link
Member

@jpelgrom jpelgrom left a comment

Choose a reason for hiding this comment

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

Thanks for the bug report and fix! Tested it with different values and looks good to me.

Just one minor suggestion, now that you pointed out the incorrect log message in another function ;)

Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
@JBassett JBassett merged commit 0148c65 into home-assistant:master Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wear: Cannot slow down fan with less than 10 posible states
4 participants