Skip to content

Commit

Permalink
LIFX: assume default features for unknown products (#8553)
Browse files Browse the repository at this point in the history
This makes the detection work for prototypes as well.
  • Loading branch information
amelchio authored and balloob committed Jul 24, 2017
1 parent d7da90a commit fb6bdfa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions homeassistant/components/light/lifx.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,18 @@ def cleanup(event):

def lifxwhite(device):
"""Return whether this is a white-only bulb."""
return not aiolifx().products.features_map[device.product]["color"]
features = aiolifx().products.features_map.get(device.product, None)
if features:
return not features["color"]
return False


def lifxmultizone(device):
"""Return whether this is a multizone bulb/strip."""
return aiolifx().products.features_map[device.product]["multizone"]
features = aiolifx().products.features_map.get(device.product, None)
if features:
return features["multizone"]
return False


def find_hsbk(**kwargs):
Expand Down

0 comments on commit fb6bdfa

Please sign in to comment.