Make default duration 1/10th of a second for ZHA light calls (#38739)

* default duration to 1/10th of a second
* update test
This commit is contained in:
David F. Mulcahey 2020-08-10 17:40:07 -04:00 committed by GitHub
parent cf72ade093
commit 844b3f8d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ class BaseLight(LogMixin, light.LightEntity):
async def async_turn_on(self, **kwargs): async def async_turn_on(self, **kwargs):
"""Turn the entity on.""" """Turn the entity on."""
transition = kwargs.get(light.ATTR_TRANSITION) 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) brightness = kwargs.get(light.ATTR_BRIGHTNESS)
effect = kwargs.get(light.ATTR_EFFECT) effect = kwargs.get(light.ATTR_EFFECT)
flash = kwargs.get(light.ATTR_FLASH) flash = kwargs.get(light.ATTR_FLASH)

View File

@ -403,7 +403,7 @@ async def async_test_level_on_off_from_hass(
4, 4,
(zigpy.types.uint8_t, zigpy.types.uint16_t), (zigpy.types.uint8_t, zigpy.types.uint16_t),
10, 10,
0, 1,
expect_reply=True, expect_reply=True,
manufacturer=None, manufacturer=None,
tsn=None, tsn=None,