mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 11:43:34 +00:00
da441bc697
Also updates CI pypy versions to be 3.9 and 3.10 which are the currently [supported versions](https://www.pypy.org/posts/2024/01/pypy-v7315-release.html). Otherwise latest cryptography doesn't ship with pypy3.8 wheels and is unable to build on windows. Also updates the `codecov-action` to v4 which fixed some intermittent uploading errors.
23 lines
541 B
Python
23 lines
541 B
Python
"""Implementation of device module."""
|
|
|
|
from typing import Dict
|
|
|
|
from ..smartmodule import SmartModule
|
|
|
|
|
|
class DeviceModule(SmartModule):
|
|
"""Implementation of device module."""
|
|
|
|
REQUIRED_COMPONENT = "device"
|
|
|
|
def query(self) -> Dict:
|
|
"""Query to execute during the update cycle."""
|
|
query = {
|
|
"get_device_info": None,
|
|
}
|
|
# Device usage is not available on older firmware versions
|
|
if self.supported_version >= 2:
|
|
query["get_device_usage"] = None
|
|
|
|
return query
|