Skip to content

Commit

Permalink
Minor Wink fixes (#14468)
Browse files Browse the repository at this point in the history
* Updated Wink light supported feature to reflect what features a given light support.

* Fix typo in wink climate
  • Loading branch information
William Scanlon authored and fabaff committed May 15, 2018
1 parent 11c57f9 commit 710533a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/climate/wink.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def heat_on(self):
@property
def cool_on(self):
"""Return whether or not the heat is actually heating."""
return self.wink.heat_on()
return self.wink.cool_on()

@property
def current_operation(self):
Expand Down
11 changes: 8 additions & 3 deletions homeassistant/components/light/wink.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

DEPENDENCIES = ['wink']

SUPPORT_WINK = SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP | SUPPORT_COLOR


def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Wink lights."""
Expand Down Expand Up @@ -78,7 +76,14 @@ def color_temp(self):
@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_WINK
supports = SUPPORT_BRIGHTNESS
if self.wink.supports_temperature():
supports = supports | SUPPORT_COLOR_TEMP
if self.wink.supports_xy_color():
supports = supports | SUPPORT_COLOR
elif self.wink.supports_hue_saturation():
supports = supports | SUPPORT_COLOR
return supports

def turn_on(self, **kwargs):
"""Turn the switch on."""
Expand Down

0 comments on commit 710533a

Please sign in to comment.