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:
1 parent
fa9866db96
commit
8ab1b41974
4 files changed
+106
-9
No files matched your search
@@ -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."""
|
||||
|
||||
Reference in new issue
Block a user