Fix ozw dimming transition (#38850)
* Handle float from light component * Test with float Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
47d1920f8a
commit
5c9f29c43a
2 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,7 @@ class ZwaveLight(ZWaveDeviceEntity, LightEntity):
|
|||
|
||||
else:
|
||||
# transition specified by user
|
||||
new_value = max(0, min(7620, kwargs[ATTR_TRANSITION]))
|
||||
new_value = int(max(0, min(7620, kwargs[ATTR_TRANSITION])))
|
||||
if ozw_version < (1, 6, 1205):
|
||||
transition = kwargs[ATTR_TRANSITION]
|
||||
if transition <= 127:
|
||||
|
|
|
@ -85,7 +85,7 @@ async def test_light(hass, light_data, light_msg, light_rgb_msg, sent_messages):
|
|||
assert state.state == "off"
|
||||
|
||||
# Test turn on without brightness
|
||||
new_transition = 127
|
||||
new_transition = 127.0
|
||||
await hass.services.async_call(
|
||||
"light",
|
||||
"turn_on",
|
||||
|
|
Loading…
Add table
Reference in a new issue