Skip to content

Commit

Permalink
Make default duration 1/10th of a second for ZHA light calls (#38739)
Browse files Browse the repository at this point in the history
* default duration to 1/10th of a second
* update test
  • Loading branch information
dmulcahey authored and frenck committed Aug 12, 2020
1 parent 6717e67 commit 4861753
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/zha/light.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/zha/test_light.py
Expand Up @@ -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,
Expand Down

0 comments on commit 4861753

Please sign in to comment.