From 8cabec7ac114ef8a0a6e20862ab41de05d4da1d7 Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Thu, 3 May 2018 23:28:03 +0200 Subject: [PATCH] Fix ZWave light brightness (#14261) * Fix ZWave light brightness * The brightness should always be an integer * Changed to round --- homeassistant/components/light/zwave.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index 286ce73f1ed..04216780c80 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -61,7 +61,7 @@ def get_device(node, values, node_config, **kwargs): def brightness_state(value): """Return the brightness and state.""" if value.data > 0: - return round((value.data / 99) * 255, 0), STATE_ON + return round((value.data / 99) * 255), STATE_ON return 0, STATE_OFF