FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add supported check to light transition module by sdb9696 · Pull Request #971 · python-kasa/python-kasa · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 10 additions & 0 deletions kasa/smart/modules/lighttransition.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,13 @@ def query(self) -> dict:
return {}
else:
return {self.QUERY_GETTER_NAME: None}

async def _check_supported(self):
Comment thread
sdb9696 marked this conversation as resolved.
"""Additional check to see if the module is supported by the device.

Parent devices that report components of children such as ks240 will not have
the brightness value is sysinfo.
"""
# Look in _device.sys_info here because self.data is either sys_info or
# get_preset_rules depending on whether it's a child device or not.
return "brightness" in self._device.sys_info

Back | FazBrowse Home | New Git URL