mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 13:27:09 +00:00
LIFX: assume default features for unknown products (#8553)
This makes the detection work for prototypes as well.
This commit is contained in:
parent
9cc3e7e47b
commit
8a42e1551a
@ -159,12 +159,18 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user