-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Fix tuya light supported color modes #149793
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
Conversation
|
Hey there @tuya, @zlinoliver, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with Tuya light supported color modes where lights that don't actually support color were incorrectly showing WHITE as a supported color mode. The fix ensures that if a light supports WHITE mode but not actual color capabilities, the WHITE mode is removed from the supported color modes.
- Fixes incorrect color mode support detection for Tuya lights
- Adds logic to remove WHITE color mode when color is not actually supported
- Includes new test fixture and snapshots for a solar flood light device
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/tuya/light.py | Adds logic to filter out WHITE color mode when color is not supported |
| tests/components/tuya/init.py | Adds test configuration for new solar flood light device |
| tests/components/tuya/fixtures/tyndj_pyakuuoc.json | New test fixture for solar flood light device |
| tests/components/tuya/snapshots/test_light.ambr | Updated test snapshots showing brightness-only color mode |
| tests/components/tuya/snapshots/test_sensor.ambr | Updated test snapshots for battery sensors |
| tests/components/tuya/snapshots/test_switch.ambr | Updated test snapshots for energy saving switch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @epenet 👍
Proposed change
Linked to #149704
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: