Turn light off if brightness is 0 (#22400)

* Turn light off if brightness is 0

* Lint

* Review comments

* Lint

* Fixup, add tests

* Fix trådfri light + test
This commit is contained in:
emontnemery authored and Paulus Schoutsen committed 2019-03-30 21:04:32 -07:00
1 parent f6e9dd4832
commit 4d1633807c
4 files changed
+72 -14

No files matched your search

+3 -11
View File
@@ -35,20 +35,12 @@ TURN_ON_TEST_CASES = [
'brightness': 100
}
],
# Brightness == 0
# Brightness == 1
[
{'can_set_dimmer': True},
{'brightness': 0},
{'brightness': 1},
{
'brightness': 0
}
],
# Brightness < 0
[
{'can_set_dimmer': True},
{'brightness': -1},
{
'brightness': 0
'brightness': 1
}
],
# Brightness > 254