-
Notifications
You must be signed in to change notification settings - Fork 490
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
New scaling utilities #1444
Comments
make-all
added a commit
that referenced
this issue
Feb 11, 2024
HA 2024.1 introduced some new functions for scaling percentages and light brightness. Using these should give standardised behaviour compared with other integrations. User visible changes: - lights that do not allow brightness to be set all the way down to 1% will now adjust their range to use the full range available in HA. - fan speeds scale to integers. This mostly affects the speeds reported by 3 speed and 6 speed fans Developer visible changes: - it is no longer neccesary to specify scale mappings for light brightness or fan speed. Since these have a fixed range in HA, they are automatically scaled into that range. - TuyaDpsConfig.range now returns a (min, max) tuple compatible with the HA scaling functions instead of a dict with min and max items. Issue #1444
make-all
added a commit
that referenced
this issue
Feb 11, 2024
make-all
added a commit
that referenced
this issue
Feb 12, 2024
- Avoid names starting with numbers, as they may have problems in some obscure places - use branding in product name - use light effect for mode instead of a separate select entity - remove scale from brightness as it is no longer needed (#1444)
make-all
removed
unreleased
Will be in next release
maintenance
Changes to keep up with HA development
labels
Feb 18, 2024
timlaing
pushed a commit
to timlaing/tuya-local
that referenced
this issue
Aug 8, 2024
HA 2024.1 introduced some new functions for scaling percentages and light brightness. Using these should give standardised behaviour compared with other integrations. User visible changes: - lights that do not allow brightness to be set all the way down to 1% will now adjust their range to use the full range available in HA. - fan speeds scale to integers. This mostly affects the speeds reported by 3 speed and 6 speed fans Developer visible changes: - it is no longer neccesary to specify scale mappings for light brightness or fan speed. Since these have a fixed range in HA, they are automatically scaled into that range. - TuyaDpsConfig.range now returns a (min, max) tuple compatible with the HA scaling functions instead of a dict with min and max items. Issue make-all#1444
timlaing
pushed a commit
to timlaing/tuya-local
that referenced
this issue
Aug 8, 2024
from Discussion make-all#1465 also docs for make-all#1623 / make-all#1606 and a lint fix related to the make-all#1444 changes.
timlaing
pushed a commit
to timlaing/tuya-local
that referenced
this issue
Aug 8, 2024
- Avoid names starting with numbers, as they may have problems in some obscure places - use branding in product name - use light effect for mode instead of a separate select entity - remove scale from brightness as it is no longer needed (make-all#1444)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On December 5, HA developers announced new scaling utilities for light brightness. These are based on some already existing utilities for fan speed. Using these utilities would ensure consistency with other integrations in the way we are scaling device native ranges into Home Assistant ranges. In particular, many lights only allow dimming down to 1% or 10% even if the granularity of the control would allow them to go further. Currently we will force the numbers back into range (recently the error was suppressed for these cases to avoid annoying popups), which can cause UI oddities, but it looks like these scaling utilities will handle this better.
https://developers.home-assistant.io/blog/2023/12/05/scaling-utils
Due to the timing, this is probably only going to be available in HA 2024.1, so this needs to be kept for later implementation.
The text was updated successfully, but these errors were encountered: