From cb82707a5ba353fbf8855c544f6a298444fd0418 Mon Sep 17 00:00:00 2001 From: David Mulcahey Date: Mon, 10 Aug 2020 16:51:29 -0400 Subject: [PATCH 1/2] default duration to 1/10th of a second --- homeassistant/components/zha/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zha/light.py b/homeassistant/components/zha/light.py index 51b0633ecf2c3b..ff080562190556 100644 --- a/homeassistant/components/zha/light.py +++ b/homeassistant/components/zha/light.py @@ -192,7 +192,7 @@ def supported_features(self): async def async_turn_on(self, **kwargs): """Turn the entity on.""" transition = kwargs.get(light.ATTR_TRANSITION) - duration = transition * 10 if transition else 0 + duration = transition * 10 if transition else 1 brightness = kwargs.get(light.ATTR_BRIGHTNESS) effect = kwargs.get(light.ATTR_EFFECT) flash = kwargs.get(light.ATTR_FLASH) From a8769aa6f56ce2fe3cbd1239921a477574cb4dcd Mon Sep 17 00:00:00 2001 From: David Mulcahey Date: Mon, 10 Aug 2020 17:16:34 -0400 Subject: [PATCH 2/2] update test --- tests/components/zha/test_light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/components/zha/test_light.py b/tests/components/zha/test_light.py index 6b94354ed594de..bd340445527a91 100644 --- a/tests/components/zha/test_light.py +++ b/tests/components/zha/test_light.py @@ -403,7 +403,7 @@ async def async_test_level_on_off_from_hass( 4, (zigpy.types.uint8_t, zigpy.types.uint16_t), 10, - 0, + 1, expect_reply=True, manufacturer=None, tsn=None,