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

Return LightEntityFeature(0) zero value in supported_features when there are no effects #826

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/tapo/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, coordinator: TapoDataCoordinator, device: TapoBulb):
self._attr_max_mireds = kelvin_to_mired(self._attr_min_color_temp_kelvin)
self._attr_min_mireds = kelvin_to_mired(self._attr_max_color_temp_kelvin)
self._attr_supported_features = (
LightEntityFeature.EFFECT if self._effects else 0
LightEntityFeature.EFFECT if self._effects else LightEntityFeature(0)
)
self._attr_supported_color_modes = _components_to_color_modes(device)
self._attr_effect_list = list(self._effects.keys()) if self._effects else None
Expand Down