mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Bugfixes HomeKit covers, lights (#13689)
* covers -> current_position attribute * lights -> hue and saturation attribute
This commit is contained in:
parent
301077ded9
commit
f263a931f7
@ -63,12 +63,9 @@ class WindowCovering(HomeAccessory):
|
||||
return
|
||||
|
||||
current_position = new_state.attributes.get(ATTR_CURRENT_POSITION)
|
||||
if current_position is None:
|
||||
return
|
||||
|
||||
self.current_position = int(current_position)
|
||||
if isinstance(current_position, int):
|
||||
self.current_position = current_position
|
||||
self.char_current_position.set_value(self.current_position)
|
||||
|
||||
if self.homekit_target is None or \
|
||||
abs(self.current_position - self.homekit_target) < 6:
|
||||
self.char_target_position.set_value(self.current_position)
|
||||
|
@ -146,7 +146,9 @@ class Light(HomeAccessory):
|
||||
hue, saturation = new_state.attributes.get(
|
||||
ATTR_HS_COLOR, (None, None))
|
||||
if not self._flag[RGB_COLOR] and (
|
||||
hue != self._hue or saturation != self._saturation):
|
||||
hue != self._hue or saturation != self._saturation) and \
|
||||
isinstance(hue, (int, float)) and \
|
||||
isinstance(saturation, (int, float)):
|
||||
self.char_hue.set_value(hue, should_callback=False)
|
||||
self.char_saturation.set_value(saturation,
|
||||
should_callback=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user