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

Fix brightness_pct in light device turn_on action #5201

Merged
merged 1 commit into from
Mar 14, 2020
Merged

Conversation

frenck
Copy link
Member

@frenck frenck commented Mar 14, 2020

Proposed change

When creating a device automation in the frontend, the frontend UI, that turns on a light, and sets a brightness; The brightness and brightness_pct properties are mixed up.

The UI input allows a user to select a value using a slider that reaches from 0-100, while the brightness property is used, which has a range from 0-255.

2 way to fix this:

  • Adjust the range
  • Use pct version of the property

From a user UI perspective, the percentage makes more sense, so I opted to the latter.

PS: I have no clue how the translation works on our frontend and how to make this nicely translated (although I have the feeling this piece isn't translated at all?). Whatever the case, currently it shows brightness_pct in the interface, which is, of course, not that nice.

PR on the core repository addressing this: home-assistant/core#32787

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@frenck frenck marked this pull request as ready for review March 14, 2020 00:51
@balloob balloob added this to the 0.107 milestone Mar 14, 2020
@balloob balloob merged commit 17f3299 into dev Mar 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the frenck-2020-0295 branch March 14, 2020 04:58
@bramkragten bramkragten mentioned this pull request Mar 16, 2020
@lock lock bot locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants