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:
Paulus Schoutsen authored and Pascal Vizeli committed 2017-03-09 14:35:04 +01:00
1 parent ddc260b628
commit 855756cb2a
5 files changed
+155 -21

No files matched your search

+1 -1
View File
@@ -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