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 KNX Light: turn_on with brightness and color_temperature #31184

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

farmio
Copy link
Contributor

@farmio farmio commented Jan 26, 2020

Proposed change

Process both brightness and color_temperature in a turn_on call.

Type of change

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

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@probot-home-assistant
Copy link

Hey there @Julius2342, mind taking a look at this pull request as its been labeled with a integration (knx) you are listed as a codeowner for? Thanks!

@farmio
Copy link
Contributor Author

farmio commented Jan 26, 2020

The failed test is not related to this PR.

process both brightness and color_temperature in a turn_on call.
@@ -269,8 +269,16 @@ def supported_features(self):
update_white_value = ATTR_WHITE_VALUE in kwargs
update_color_temp = ATTR_COLOR_TEMP in kwargs

# always only go one path for turning on (avoid conflicting changes
Copy link
Member

Choose a reason for hiding this comment

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

So now you will go down multiple paths and have conflicting changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the source of the conflicting changes was sending an ON telegram after eg. brightness so the actuators default turn-on-value overwrote the brightness telegram.

We only send an ON telegram if no other light option is updated. (Line 273).

Only problem I could imagine is actuator specific. Some don't turn on when receiving a color-temperature telegram only. They expect either ON or brightness. But I think HA ui doesn't allow to set color-temperature on a turned off light.

@pvizeli pvizeli merged commit 9ff9614 into home-assistant:dev Jan 29, 2020
@lock lock bot locked and limited conversation to collaborators Jan 30, 2020
@farmio farmio deleted the knx-light-ct-fix branch May 23, 2021 05:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed integration: knx small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KNX light can't update both brightness and color temperature in the same call
4 participants