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

Check for attribute existence for HS220 support #21309

Merged
merged 2 commits into from Feb 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/tplink/light.py
Expand Up @@ -222,11 +222,11 @@ def get_features(self):

if self.smartbulb.is_dimmable:
self._supported_features += SUPPORT_BRIGHTNESS
if self.smartbulb.is_variable_color_temp:
if getattr(self.smartbulb, 'is_variable_color_temp', False):
self._supported_features += SUPPORT_COLOR_TEMP
self._min_mireds = kelvin_to_mired(
self.smartbulb.valid_temperature_range[1])
self._max_mireds = kelvin_to_mired(
self.smartbulb.valid_temperature_range[0])
if self.smartbulb.is_color:
if getattr(self.smartbulb, 'is_color', False):
self._supported_features += SUPPORT_COLOR