diff --git a/kasa/smart/modules/__init__.py b/kasa/smart/modules/__init__.py index 9ce94da7..02c3b86a 100644 --- a/kasa/smart/modules/__init__.py +++ b/kasa/smart/modules/__init__.py @@ -4,6 +4,7 @@ from .childdevicemodule import ChildDeviceModule from .cloudmodule import CloudModule from .devicemodule import DeviceModule from .energymodule import EnergyModule +from .firmware import Firmware from .ledmodule import LedModule from .lighttransitionmodule import LightTransitionModule from .timemodule import TimeModule diff --git a/kasa/tests/fakeprotocol_smart.py b/kasa/tests/fakeprotocol_smart.py index 4c9b034b..54fc8647 100644 --- a/kasa/tests/fakeprotocol_smart.py +++ b/kasa/tests/fakeprotocol_smart.py @@ -46,7 +46,7 @@ class FakeSmartTransport(BaseTransport): FIXTURE_MISSING_MAP = { "get_wireless_scan_info": ("wireless", {"ap_list": [], "wep_supported": False}), - "get_auto_off_config": ("auto_off", {'delay_min': 10, 'enable': False}), + "get_auto_off_config": ("auto_off", {"delay_min": 10, "enable": False}), "get_led_info": ( "led", { @@ -63,6 +63,23 @@ class FakeSmartTransport(BaseTransport): ), "get_connect_cloud_state": ("cloud_connect", {"status": 1}), "get_on_off_gradually_info": ("on_off_gradually", {"enable": True}), + "get_latest_fw": ( + "firmware", + { + "fw_size": 0, + "fw_ver": "1.0.5 Build 230801 Rel.095702", + "hw_id": "", + "need_to_upgrade": False, + "oem_id": "", + "release_date": "", + "release_note": "", + "type": 0, + }, + ), + "get_auto_update_info": ( + "firmware", + {"enable": True, "random_range": 120, "time": 180}, + ), } async def send(self, request: str):