From 844b3f8d233a79d80e6b50afe86662c306509486 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Mon, 10 Aug 2020 17:40:07 -0400 Subject: [PATCH] Make default duration 1/10th of a second for ZHA light calls (#38739) * default duration to 1/10th of a second * update test --- homeassistant/components/zha/light.py | 2 +- tests/components/zha/test_light.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/zha/light.py b/homeassistant/components/zha/light.py index 51b0633ecf2..ff080562190 100644 --- a/homeassistant/components/zha/light.py +++ b/homeassistant/components/zha/light.py @@ -192,7 +192,7 @@ class BaseLight(LogMixin, light.LightEntity): 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) diff --git a/tests/components/zha/test_light.py b/tests/components/zha/test_light.py index 6b94354ed59..bd340445527 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,