Add support for dimmable bond lights (#38203)

* Add support for dimmable lights

* Fix formatting

* Add supported features test on Bond Light

* Add more tests to bond light and fixes comments

* Fix rebase conflict resolution

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
This commit is contained in:
Marcio Granzotto RodriguesandChris Talkington authored and GitHub committed 2020-07-29 20:01:59 -05:00
1 parent fa9866db96
commit 8ab1b41974
4 files changed
+106 -9

No files matched your search

+5
View File
@@ -60,6 +60,11 @@ class BondDevice:
]
)
def supports_set_brightness(self) -> bool:
"""Return True if this device supports setting a light brightness."""
actions: List[str] = self._attrs["actions"]
return bool([action for action in actions if action in [Action.SET_BRIGHTNESS]])
class BondHub:
"""Hub device representing Bond Bridge."""