mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +00:00
Fix ZWave light brightness (#14261)
* Fix ZWave light brightness * The brightness should always be an integer * Changed to round
This commit is contained in:
parent
15e75b07d8
commit
8cabec7ac1
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user