mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Merge remote-tracking branch 'origin/master' into dev
* origin/master: Fix issue in Timer thread caused by variable name. Fix issue with some bulbs missing 'xy' attribute.
This commit is contained in:
commit
b5a3a72b51
@ -780,7 +780,7 @@ class Timer(threading.Thread):
|
||||
self.daemon = True
|
||||
self.hass = hass
|
||||
self.interval = interval or TIMER_INTERVAL
|
||||
self._stop = threading.Event()
|
||||
self._stop_event = threading.Event()
|
||||
|
||||
# We want to be able to fire every time a minute starts (seconds=0).
|
||||
# We want this so other modules can use that to make sure they fire
|
||||
@ -794,7 +794,7 @@ class Timer(threading.Thread):
|
||||
""" Start the timer. """
|
||||
|
||||
self.hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP,
|
||||
lambda event: self._stop.set())
|
||||
lambda event: self._stop_event.set())
|
||||
|
||||
_LOGGER.info("Timer:starting")
|
||||
|
||||
@ -803,7 +803,7 @@ class Timer(threading.Thread):
|
||||
calc_now = dt.datetime.now
|
||||
interval = self.interval
|
||||
|
||||
while not self._stop.isSet():
|
||||
while not self._stop_event.isSet():
|
||||
now = calc_now()
|
||||
|
||||
# First check checks if we are not on a second matching the
|
||||
|
@ -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