mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Fix issue with some bulbs missing 'xy' attribute.
Philips Lux bulbs (as well as other dimmable bulbs that work with the Hue hub) do not have an 'xy' attribute.
This commit is contained in:
parent
7a8f6500e2
commit
c3155651e4
@ -159,7 +159,8 @@ class HueLight(ToggleDevice):
|
||||
|
||||
if self.is_on:
|
||||
attr[ATTR_BRIGHTNESS] = self.info['state']['bri']
|
||||
attr[ATTR_XY_COLOR] = self.info['state']['xy']
|
||||
if 'xy' in self.info['state']:
|
||||
attr[ATTR_XY_COLOR] = self.info['state']['xy']
|
||||
|
||||
return attr
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user