mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
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
@ -172,7 +172,7 @@ class ZwaveLight(ZWaveDeviceEntity, LightEntity):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
# transition specified by user
|
# 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):
|
if ozw_version < (1, 6, 1205):
|
||||||
transition = kwargs[ATTR_TRANSITION]
|
transition = kwargs[ATTR_TRANSITION]
|
||||||
if transition <= 127:
|
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"
|
assert state.state == "off"
|
||||||
|
|
||||||
# Test turn on without brightness
|
# Test turn on without brightness
|
||||||
new_transition = 127
|
new_transition = 127.0
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
"light",
|
"light",
|
||||||
"turn_on",
|
"turn_on",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user