From e10468fe0f5ceccb6f1bb4766314afe621c3c8f2 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Tue, 11 Dec 2018 13:48:25 +0100 Subject: [PATCH] yeelight bedside: fix set_name and set_color_temp --- miio/yeelight.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/miio/yeelight.py b/miio/yeelight.py index b9a82e19b..cb2658ab0 100644 --- a/miio/yeelight.py +++ b/miio/yeelight.py @@ -199,7 +199,8 @@ def set_color_temp(self, level, transition=500): if transition > 0: return self.send("set_ct_abx", [level, "smooth", transition]) else: - return self.send("set_ct_abx", [level]) + # Bedside lamp requires transition + return self.send("set_ct_abx", [level, "sudden", 0]) @command( click.argument("rgb", default=[255] * 3, type=click.Tuple([int, int, int])), @@ -234,8 +235,8 @@ def set_save_state_on_change(self, enable: bool) -> bool: return self.send("set_ps", ["cfg_save_state", str(int(enable))]) @command( - click.argument("name", type=bool), - default_output=format_output("Setting name to {enable}") + click.argument("name", type=str), + default_output=format_output("Setting name to {name}") ) def set_name(self, name: str) -> bool: """Set an internal name for the bulb."""