Add first pass at Z-Wave light tests (#6483)
* Add first pass at Z-Wave light tests * Remove unused SIGNAL_VALUE * Lint * Update test_init.py
This commit is contained in:
1 parent
ddc260b628
commit
855756cb2a
5 files changed
+155
-21
No files matched your search
@@ -67,7 +67,7 @@ def get_device(node, value, node_config, **kwargs):
|
||||
def brightness_state(value):
|
||||
"""Return the brightness and state."""
|
||||
if value.data > 0:
|
||||
return (value.data / 99) * 255, STATE_ON
|
||||
return round((value.data / 99) * 255, 0), STATE_ON
|
||||
else:
|
||||
return 0, STATE_OFF
|
||||
|
||||
|
||||
Reference in new issue
Block a user