Persist hive light brightness for color change (#38677)

when changing the color for a hive light, keep the brightness at the
previous level.

Co-authored-by: Adam Charlton <ad5665@live.co.uk>

Co-authored-by: Adam Charlton <ad5665@live.co.uk>
This commit is contained in:
Alex Ward 2020-08-09 21:15:25 +01:00 committed by GitHub
parent 3761942b82
commit feb36c3efc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ class HiveDeviceLight(HiveEntity, LightEntity):
get_new_color = kwargs.get(ATTR_HS_COLOR)
hue = int(get_new_color[0])
saturation = int(get_new_color[1])
new_color = (hue, saturation, 100)
new_color = (hue, saturation, self.brightness)
self.session.light.turn_on(
self.node_id,