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:
Chris 2020-08-14 05:35:42 -07:00 committed by GitHub
parent 47d1920f8a
commit 5c9f29c43a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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:

View file

@ -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",