python-kasa 0.7.0.2__tar.gz → 0.7.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/CHANGELOG.md +129 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/PKG-INFO +1 -1
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/autooff.py +0 -6
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/batterysensor.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/cloud.py +8 -2
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/devicemodule.py +7 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/firmware.py +9 -3
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/frostprotection.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/humiditysensor.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/lightpreset.py +1 -1
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/lighttransition.py +1 -1
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/reportmode.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/temperaturesensor.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/smartdevice.py +26 -4
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/smartmodule.py +21 -1
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smartprotocol.py +4 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_smartdevice.py +83 -11
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_smartprotocol.py +16 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/pyproject.toml +1 -1
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/LICENSE +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/README.md +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/aestransport.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/cli.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/credentials.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/device.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/device_factory.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/device_type.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/deviceconfig.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/discover.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/emeterstatus.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/exceptions.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/feature.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/httpclient.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/energy.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/fan.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/led.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/light.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/lighteffect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/interfaces/lightpreset.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/effects.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotbulb.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotdevice.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotdimmer.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotlightstrip.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotmodule.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotplug.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/iotstrip.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/ambientlight.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/antitheft.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/cloud.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/countdown.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/emeter.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/led.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/light.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/lighteffect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/lightpreset.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/motion.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/rulemodule.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/schedule.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/time.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iot/modules/usage.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/iotprotocol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/json.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/klaptransport.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/module.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/modulemapping.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/modulemapping.pyi +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/protocol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/py.typed +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/effects.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/alarm.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/brightness.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/childdevice.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/color.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/colortemperature.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/contactsensor.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/energy.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/fan.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/led.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/light.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/lighteffect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/lightstripeffect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/temperaturecontrol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/time.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/modules/waterleaksensor.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/smart/smartchilddevice.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/conftest.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/device_fixtures.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/discovery_fixtures.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fakeprotocol_iot.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fakeprotocol_smart.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtureinfo.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/features/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/features/test_brightness.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/features/test_colortemp.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_autooff.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_contact.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_fan.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_firmware.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_humidity.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_light_effect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_temperature.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/smart/modules/test_waterleak.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_aestransport.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_bulb.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_childdevice.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_cli.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_common_modules.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_device.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_device_factory.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_device_type.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_deviceconfig.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_dimmer.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_discovery.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_emeter.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_feature.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_httpclient.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_iotdevice.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_klapprotocol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_lightstrip.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_plug.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_protocol.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_readme_examples.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_strip.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/tests/test_usage.py +0 -0
- {python_kasa-0.7.0.2 → python_kasa-0.7.0.3}/kasa/xortransport.py +0 -0
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.0.3](https://github.com/python-kasa/python-kasa/tree/0.7.0.3) (2024-07-04)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.2...0.7.0.3)
|
|
6
|
+
|
|
7
|
+
Critical bugfix for issue #1033 with ks225 and S505D light preset module errors.
|
|
8
|
+
Partially fixes light preset module errors with L920 and L930.
|
|
9
|
+
|
|
10
|
+
**Fixed bugs:**
|
|
11
|
+
|
|
12
|
+
Handle module errors more robustly and add query params to light preset and transition [\#1043](https://github.com/python-kasa/python-kasa/pull/1043)
|
|
13
|
+
|
|
3
14
|
## [0.7.0.2](https://github.com/python-kasa/python-kasa/tree/0.7.0.2) (2024-07-01)
|
|
4
15
|
|
|
5
16
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.1...0.7.0.2)
|
|
@@ -71,6 +82,7 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
71
82
|
|
|
72
83
|
**Implemented enhancements:**
|
|
73
84
|
|
|
85
|
+
- Radiator support \(KE100\) [\#422](https://github.com/python-kasa/python-kasa/issues/422)
|
|
74
86
|
- Cleanup cli output [\#1000](https://github.com/python-kasa/python-kasa/pull/1000) (@rytilahti)
|
|
75
87
|
- Update mode, time, rssi and report\_interval feature names/units [\#995](https://github.com/python-kasa/python-kasa/pull/995) (@sdb9696)
|
|
76
88
|
- Add timezone to on\_since attributes [\#978](https://github.com/python-kasa/python-kasa/pull/978) (@sdb9696)
|
|
@@ -133,6 +145,15 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
133
145
|
|
|
134
146
|
**Fixed bugs:**
|
|
135
147
|
|
|
148
|
+
- TAPO P100 \(hw 1.0.0, sw 1.1.3\) EU plug with 0.6.2.1 Kasa results JSON\_DECODE\_FAIL\_ERROR [\#819](https://github.com/python-kasa/python-kasa/issues/819)
|
|
149
|
+
- Cannot add Tapo Plug P110 to Home Assistant 2024.2.3 - Error in debug mode [\#797](https://github.com/python-kasa/python-kasa/issues/797)
|
|
150
|
+
- KS240 gets discovered but will not authenticate [\#749](https://github.com/python-kasa/python-kasa/issues/749)
|
|
151
|
+
- Individual commands do not work on discovered devices [\#71](https://github.com/python-kasa/python-kasa/issues/71)
|
|
152
|
+
- SMART.TAPOHUB does not work with 0.7.0 dev2 [\#958](https://github.com/python-kasa/python-kasa/issues/958)
|
|
153
|
+
- Fix --help on subcommands [\#885](https://github.com/python-kasa/python-kasa/issues/885)
|
|
154
|
+
- "Unclosed client session" Trying to set brightness on Tapo Bulb [\#828](https://github.com/python-kasa/python-kasa/issues/828)
|
|
155
|
+
- Error when trying to discover new Tapo P110 plug [\#818](https://github.com/python-kasa/python-kasa/issues/818)
|
|
156
|
+
- Individual errors cause failing the whole query [\#616](https://github.com/python-kasa/python-kasa/issues/616)
|
|
136
157
|
- Fix smart led status to report rule status [\#1002](https://github.com/python-kasa/python-kasa/pull/1002) (@sdb9696)
|
|
137
158
|
- Demote device\_time back to debug [\#1001](https://github.com/python-kasa/python-kasa/pull/1001) (@rytilahti)
|
|
138
159
|
- Add supported check to light transition module [\#971](https://github.com/python-kasa/python-kasa/pull/971) (@sdb9696)
|
|
@@ -188,6 +209,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
188
209
|
|
|
189
210
|
**Documentation updates:**
|
|
190
211
|
|
|
212
|
+
- Document device features [\#755](https://github.com/python-kasa/python-kasa/issues/755)
|
|
213
|
+
- Clean up the README [\#979](https://github.com/python-kasa/python-kasa/issues/979)
|
|
191
214
|
- Cleanup README to use the new cli format [\#999](https://github.com/python-kasa/python-kasa/pull/999) (@rytilahti)
|
|
192
215
|
- Add 0.7 api changes section to docs [\#996](https://github.com/python-kasa/python-kasa/pull/996) (@sdb9696)
|
|
193
216
|
- Update docs with more howto examples [\#968](https://github.com/python-kasa/python-kasa/pull/968) (@sdb9696)
|
|
@@ -278,6 +301,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
278
301
|
|
|
279
302
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.1...0.6.2)
|
|
280
303
|
|
|
304
|
+
Release highlights:
|
|
305
|
+
* Support for tapo power strips (P300)
|
|
306
|
+
* Performance improvements and bug fixes
|
|
307
|
+
|
|
281
308
|
**Implemented enhancements:**
|
|
282
309
|
|
|
283
310
|
- Implement alias set for tapodevice [\#721](https://github.com/python-kasa/python-kasa/pull/721) (@rytilahti)
|
|
@@ -314,6 +341,11 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
314
341
|
|
|
315
342
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.0.1...0.6.1)
|
|
316
343
|
|
|
344
|
+
Release highlights:
|
|
345
|
+
* Support for tapo wall switches
|
|
346
|
+
* Support for unprovisioned devices
|
|
347
|
+
* Performance and stability improvements
|
|
348
|
+
|
|
317
349
|
**Implemented enhancements:**
|
|
318
350
|
|
|
319
351
|
- Add support for tapo wall switches \(S500D\) [\#704](https://github.com/python-kasa/python-kasa/pull/704) (@bdraco)
|
|
@@ -365,6 +397,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
365
397
|
|
|
366
398
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.0...0.6.0.1)
|
|
367
399
|
|
|
400
|
+
A patch release to improve the protocol handling.
|
|
401
|
+
|
|
368
402
|
**Fixed bugs:**
|
|
369
403
|
|
|
370
404
|
- Fix httpclient exceptions on read and improve error info [\#655](https://github.com/python-kasa/python-kasa/pull/655) (@sdb9696)
|
|
@@ -382,6 +416,19 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
382
416
|
|
|
383
417
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.4...0.6.0)
|
|
384
418
|
|
|
419
|
+
This major brings major changes to the library by adding support for devices that require authentication for communications, all of this being possible thanks to the great work by @sdb9696!
|
|
420
|
+
|
|
421
|
+
This release adds support to a large range of previously unsupported devices, including:
|
|
422
|
+
|
|
423
|
+
* Newer kasa-branded devices, including Matter-enabled devices like KP125M
|
|
424
|
+
* Newer hardware/firmware versions on some models, like EP25, that suddenly changed the used protocol
|
|
425
|
+
* Tapo-branded devices like plugs (P110), light bulbs (KL530), LED strips (L900, L920), and wall switches (KS205, KS225)
|
|
426
|
+
* UK variant of HS110, which was the first device using the new protocol
|
|
427
|
+
|
|
428
|
+
If your device that is not currently listed as supported is working, please consider contributing a test fixture file.
|
|
429
|
+
|
|
430
|
+
Special thanks goes to @SimonWilkinson who created the initial PR for the new communication protocol!
|
|
431
|
+
|
|
385
432
|
**Breaking changes:**
|
|
386
433
|
|
|
387
434
|
- Add DeviceConfig to allow specifying configuration parameters [\#569](https://github.com/python-kasa/python-kasa/pull/569) (@sdb9696)
|
|
@@ -389,6 +436,9 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
389
436
|
|
|
390
437
|
**Implemented enhancements:**
|
|
391
438
|
|
|
439
|
+
- Support for KS225\(US\) Light Dimmer and KS205\(US\) Light Switch [\#589](https://github.com/python-kasa/python-kasa/issues/589)
|
|
440
|
+
- Set timeout using command line parameters [\#310](https://github.com/python-kasa/python-kasa/issues/310)
|
|
441
|
+
- Implement the new protocol \(HTTP over 80/tcp, 20002/udp for discovery\) [\#115](https://github.com/python-kasa/python-kasa/issues/115)
|
|
392
442
|
- Get child emeters with CLI [\#623](https://github.com/python-kasa/python-kasa/pull/623) (@Obbay2)
|
|
393
443
|
- Avoid linear search for emeter realtime and emeter\_today [\#622](https://github.com/python-kasa/python-kasa/pull/622) (@bdraco)
|
|
394
444
|
- Add update-credentials command [\#620](https://github.com/python-kasa/python-kasa/pull/620) (@rytilahti)
|
|
@@ -415,6 +465,7 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
415
465
|
|
|
416
466
|
**Fixed bugs:**
|
|
417
467
|
|
|
468
|
+
- dump\_devinfo crashes when credentials are not given [\#591](https://github.com/python-kasa/python-kasa/issues/591)
|
|
418
469
|
- Fix connection indeterminate state on cancellation [\#636](https://github.com/python-kasa/python-kasa/pull/636) (@bdraco)
|
|
419
470
|
- Check the ct range for color temp support [\#619](https://github.com/python-kasa/python-kasa/pull/619) (@rytilahti)
|
|
420
471
|
- Fix cli discover bug with None username/password [\#615](https://github.com/python-kasa/python-kasa/pull/615) (@sdb9696)
|
|
@@ -423,6 +474,7 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
423
474
|
|
|
424
475
|
**Documentation updates:**
|
|
425
476
|
|
|
477
|
+
- Update the documentation for 0.6 release [\#600](https://github.com/python-kasa/python-kasa/issues/600)
|
|
426
478
|
- Update docs for newer devices and DeviceConfig [\#614](https://github.com/python-kasa/python-kasa/pull/614) (@sdb9696)
|
|
427
479
|
- Update readme with clearer instructions, tapo support [\#571](https://github.com/python-kasa/python-kasa/pull/571) (@rytilahti)
|
|
428
480
|
- Add some more external links to README [\#541](https://github.com/python-kasa/python-kasa/pull/541) (@rytilahti)
|
|
@@ -469,6 +521,15 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
469
521
|
|
|
470
522
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.3...0.5.4)
|
|
471
523
|
|
|
524
|
+
The highlights of this maintenance release:
|
|
525
|
+
|
|
526
|
+
* Support to the alternative discovery protocol and foundational work to support other communication protocols, thanks to @sdb9696.
|
|
527
|
+
* Reliability improvements by avoiding overflowing device buffers, thanks to @cobryan05.
|
|
528
|
+
* Optimizations for downstream device accesses, thanks to @bdraco.
|
|
529
|
+
* Support for both pydantic v1 and v2.
|
|
530
|
+
|
|
531
|
+
As always, see the full changelog for details.
|
|
532
|
+
|
|
472
533
|
**Implemented enhancements:**
|
|
473
534
|
|
|
474
535
|
- Add a connect\_single method to Discover to avoid the need for UDP [\#528](https://github.com/python-kasa/python-kasa/pull/528) (@bdraco)
|
|
@@ -507,6 +568,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
507
568
|
|
|
508
569
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.2...0.5.3)
|
|
509
570
|
|
|
571
|
+
This release adds support for defining the device port and introduces dependency on async-timeout which improves timeout handling.
|
|
572
|
+
|
|
510
573
|
**Implemented enhancements:**
|
|
511
574
|
|
|
512
575
|
- Make device port configurable [\#471](https://github.com/python-kasa/python-kasa/pull/471) (@karpach)
|
|
@@ -524,6 +587,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
524
587
|
|
|
525
588
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.1...0.5.2)
|
|
526
589
|
|
|
590
|
+
Besides some small improvements, this release:
|
|
591
|
+
* Adds optional dependency for for `orjson` and `kasa-crypt` to speed-up protocol handling by an order of magnitude.
|
|
592
|
+
* Drops Python 3.7 support as it is no longer maintained.
|
|
593
|
+
|
|
527
594
|
**Breaking changes:**
|
|
528
595
|
|
|
529
596
|
- Drop python 3.7 support [\#455](https://github.com/python-kasa/python-kasa/pull/455) (@rytilahti)
|
|
@@ -537,6 +604,9 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
537
604
|
|
|
538
605
|
**Fixed bugs:**
|
|
539
606
|
|
|
607
|
+
- Request for KP405 Support - Dimmable Plug [\#469](https://github.com/python-kasa/python-kasa/issues/469)
|
|
608
|
+
- Issue printing device in on\_discovered: pydantic.error\_wrappers.ValidationError: 3 validation errors for SmartBulbPreset [\#439](https://github.com/python-kasa/python-kasa/issues/439)
|
|
609
|
+
- Possible firmware issue with KL125 \(1.0.7 Build 211009 Rel.172044\) [\#345](https://github.com/python-kasa/python-kasa/issues/345)
|
|
540
610
|
- Exclude querying certain modules for KL125\(US\) which cause crashes [\#451](https://github.com/python-kasa/python-kasa/pull/451) (@brianthedavis)
|
|
541
611
|
- Return result objects for cli discover and implicit 'state' [\#446](https://github.com/python-kasa/python-kasa/pull/446) (@rytilahti)
|
|
542
612
|
- Allow effect presets seen on light strips [\#440](https://github.com/python-kasa/python-kasa/pull/440) (@rytilahti)
|
|
@@ -553,6 +623,13 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
553
623
|
|
|
554
624
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.0...0.5.1)
|
|
555
625
|
|
|
626
|
+
This minor release contains mostly small UX fine-tuning and documentation improvements alongside with bug fixes:
|
|
627
|
+
* Improved console tool (JSON output, colorized output if rich is installed)
|
|
628
|
+
* Pretty, colorized console output, if `rich` is installed
|
|
629
|
+
* Support for configuring bulb presets
|
|
630
|
+
* Usage data is now reported in the expected format
|
|
631
|
+
* Dependency pinning is relaxed to give downstreams more control
|
|
632
|
+
|
|
556
633
|
**Breaking changes:**
|
|
557
634
|
|
|
558
635
|
- Implement changing the bulb turn-on behavior [\#381](https://github.com/python-kasa/python-kasa/pull/381) (@rytilahti)
|
|
@@ -569,11 +646,16 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
569
646
|
|
|
570
647
|
**Fixed bugs:**
|
|
571
648
|
|
|
649
|
+
- cli.py usage year and month options do not output data as expected [\#373](https://github.com/python-kasa/python-kasa/issues/373)
|
|
650
|
+
- cli.py usage --year command passes year argument incorrectly [\#371](https://github.com/python-kasa/python-kasa/issues/371)
|
|
651
|
+
- KP303 reporting as device off [\#319](https://github.com/python-kasa/python-kasa/issues/319)
|
|
652
|
+
- HS210 not updating the state correctly [\#193](https://github.com/python-kasa/python-kasa/issues/193)
|
|
572
653
|
- Fix year emeter for cli by using kwarg for year parameter [\#372](https://github.com/python-kasa/python-kasa/pull/372) (@rytilahti)
|
|
573
654
|
- Return usage.get\_{monthstat,daystat} in expected format [\#394](https://github.com/python-kasa/python-kasa/pull/394) (@jules43)
|
|
574
655
|
|
|
575
656
|
**Documentation updates:**
|
|
576
657
|
|
|
658
|
+
- Update misleading docs about supported devices \(was: add support for EP25 plug\) [\#367](https://github.com/python-kasa/python-kasa/issues/367)
|
|
577
659
|
- Minor fixes to smartbulb docs [\#431](https://github.com/python-kasa/python-kasa/pull/431) (@rytilahti)
|
|
578
660
|
- Add a note that transition is not supported by all devices [\#398](https://github.com/python-kasa/python-kasa/pull/398) (@rytilahti)
|
|
579
661
|
- fix more outdated CLI examples, remove EP40 from bulb list [\#383](https://github.com/python-kasa/python-kasa/pull/383) (@HankB)
|
|
@@ -583,6 +665,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
583
665
|
- Update README to add missing models and fix a link [\#351](https://github.com/python-kasa/python-kasa/pull/351) (@rytilahti)
|
|
584
666
|
- Add KP125 test fixture and support note. [\#350](https://github.com/python-kasa/python-kasa/pull/350) (@jalseth)
|
|
585
667
|
|
|
668
|
+
**Closed issues:**
|
|
669
|
+
|
|
670
|
+
- Add support for setting default behaviors for a soft or hard power on of the bulb [\#365](https://github.com/python-kasa/python-kasa/issues/365)
|
|
671
|
+
|
|
586
672
|
**Merged pull requests:**
|
|
587
673
|
|
|
588
674
|
- Some release preparation janitoring [\#432](https://github.com/python-kasa/python-kasa/pull/432) (@rytilahti)
|
|
@@ -605,18 +691,43 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
605
691
|
|
|
606
692
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.4.3...0.5.0)
|
|
607
693
|
|
|
694
|
+
This is the first release of 0.5 series which includes converting the code base towards more modular approach where device-exposed modules (e.g., emeter, antitheft, or schedule) are implemented in their separate python modules to decouple them from the device-specific classes.
|
|
695
|
+
|
|
696
|
+
There should be no API breaking changes, but some previous issues hint that there may be as information from all supported modules are now requested during each update cycle (depending on the device type):
|
|
697
|
+
* Basic system info
|
|
698
|
+
* Emeter
|
|
699
|
+
* Time - properties (like `on_since`) use now time from the device for calculation to avoid jitter caused by different time between the host and the device
|
|
700
|
+
* Usage statistics - similar interface to emeter, but reports on-time statistics instead of energy consumption (new)
|
|
701
|
+
* Countdown (new)
|
|
702
|
+
* Antitheft (new)
|
|
703
|
+
* Schedule (new)
|
|
704
|
+
* Motion - for configuring motion settings on some dimmers (new)
|
|
705
|
+
* Ambientlight - for configuring brightness limits when motion sensor actuates on some dimmers (new)
|
|
706
|
+
* Cloud - information about cloud connectivity (new)
|
|
707
|
+
|
|
708
|
+
For developers, the new functionalities are currently only exposed through the implementation modules accessible through `modules` property.
|
|
709
|
+
Pull requests improving the functionality of modules as well as adding better interfaces to device classes are welcome!
|
|
710
|
+
|
|
608
711
|
**Breaking changes:**
|
|
609
712
|
|
|
610
713
|
- Drop deprecated, type-specific options in favor of --type [\#336](https://github.com/python-kasa/python-kasa/pull/336) (@rytilahti)
|
|
611
714
|
- Convert the codebase to be more modular [\#299](https://github.com/python-kasa/python-kasa/pull/299) (@rytilahti)
|
|
612
715
|
|
|
716
|
+
**Implemented enhancements:**
|
|
717
|
+
|
|
718
|
+
- Improve HS220 support [\#44](https://github.com/python-kasa/python-kasa/issues/44)
|
|
719
|
+
|
|
613
720
|
**Fixed bugs:**
|
|
614
721
|
|
|
722
|
+
- Skip running discovery on --help on subcommands [\#122](https://github.com/python-kasa/python-kasa/issues/122)
|
|
615
723
|
- Avoid retrying open\_connection on unrecoverable errors [\#340](https://github.com/python-kasa/python-kasa/pull/340) (@bdraco)
|
|
616
724
|
- Avoid discovery on --help [\#335](https://github.com/python-kasa/python-kasa/pull/335) (@rytilahti)
|
|
617
725
|
|
|
618
726
|
**Documentation updates:**
|
|
619
727
|
|
|
728
|
+
- Trying to poll device every 5 seconds but getting asyncio errors [\#316](https://github.com/python-kasa/python-kasa/issues/316)
|
|
729
|
+
- Docs: Smart Strip - Emeter feature Note [\#257](https://github.com/python-kasa/python-kasa/issues/257)
|
|
730
|
+
- Documentation addition: Smartplug access to internet ntp server pool. [\#129](https://github.com/python-kasa/python-kasa/issues/129)
|
|
620
731
|
- Export modules & make sphinx happy [\#334](https://github.com/python-kasa/python-kasa/pull/334) (@rytilahti)
|
|
621
732
|
- Various documentation updates [\#333](https://github.com/python-kasa/python-kasa/pull/333) (@rytilahti)
|
|
622
733
|
|
|
@@ -630,6 +741,7 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
630
741
|
|
|
631
742
|
**Fixed bugs:**
|
|
632
743
|
|
|
744
|
+
- Divide by zero when HS300 powerstrip is discovered [\#292](https://github.com/python-kasa/python-kasa/issues/292)
|
|
633
745
|
- Ensure bulb state is restored when turning back on [\#330](https://github.com/python-kasa/python-kasa/pull/330) (@bdraco)
|
|
634
746
|
|
|
635
747
|
**Merged pull requests:**
|
|
@@ -650,6 +762,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
650
762
|
|
|
651
763
|
**Fixed bugs:**
|
|
652
764
|
|
|
765
|
+
- TypeError: \_\_init\_\_\(\) got an unexpected keyword argument 'package\_name' [\#311](https://github.com/python-kasa/python-kasa/issues/311)
|
|
766
|
+
- RuntimeError: Event loop is closed on WSL [\#294](https://github.com/python-kasa/python-kasa/issues/294)
|
|
653
767
|
- Don't crash on devices not reporting features [\#317](https://github.com/python-kasa/python-kasa/pull/317) (@rytilahti)
|
|
654
768
|
|
|
655
769
|
**Merged pull requests:**
|
|
@@ -685,6 +799,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
685
799
|
|
|
686
800
|
**Fixed bugs:**
|
|
687
801
|
|
|
802
|
+
- Discovery on WSL results in OSError: \[Errno 22\] Invalid argument [\#246](https://github.com/python-kasa/python-kasa/issues/246)
|
|
803
|
+
- New firmware for HS103 blocking local access? [\#42](https://github.com/python-kasa/python-kasa/issues/42)
|
|
688
804
|
- Pin mistune to \<2.0.0 to fix doc builds [\#270](https://github.com/python-kasa/python-kasa/pull/270) (@rytilahti)
|
|
689
805
|
- Catch exceptions raised on unknown devices during discovery [\#240](https://github.com/python-kasa/python-kasa/pull/240) (@rytilahti)
|
|
690
806
|
|
|
@@ -704,6 +820,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
704
820
|
|
|
705
821
|
**Implemented enhancements:**
|
|
706
822
|
|
|
823
|
+
- KL430 support [\#67](https://github.com/python-kasa/python-kasa/issues/67)
|
|
824
|
+
- Improve retry logic for discovery, messaging \(was: Handle empty responses\) [\#38](https://github.com/python-kasa/python-kasa/issues/38)
|
|
707
825
|
- Fix lock being unexpectedly reset on close [\#218](https://github.com/python-kasa/python-kasa/pull/218) (@bdraco)
|
|
708
826
|
- Avoid calling pformat unless debug logging is enabled [\#217](https://github.com/python-kasa/python-kasa/pull/217) (@bdraco)
|
|
709
827
|
- Keep connection open and lock to prevent duplicate requests [\#213](https://github.com/python-kasa/python-kasa/pull/213) (@bdraco)
|
|
@@ -720,6 +838,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
720
838
|
|
|
721
839
|
**Fixed bugs:**
|
|
722
840
|
|
|
841
|
+
- KL430: Throw error for Device specific information [\#189](https://github.com/python-kasa/python-kasa/issues/189)
|
|
842
|
+
- `Unable to find a value for 'current'` error when attempting to query KL125 bulb emeter [\#142](https://github.com/python-kasa/python-kasa/issues/142)
|
|
843
|
+
- `Unknown color temperature range` error when attempting to query KL125 bulb state [\#141](https://github.com/python-kasa/python-kasa/issues/141)
|
|
844
|
+
- HS300 Children plugs have emeter [\#64](https://github.com/python-kasa/python-kasa/issues/64)
|
|
723
845
|
- dump\_devinfo: handle latitude/longitude keys properly [\#175](https://github.com/python-kasa/python-kasa/pull/175) (@rytilahti)
|
|
724
846
|
- Simplify discovery query, refactor dump-devinfo [\#147](https://github.com/python-kasa/python-kasa/pull/147) (@rytilahti)
|
|
725
847
|
- Return None instead of raising an exception on missing, valid emeter keys [\#146](https://github.com/python-kasa/python-kasa/pull/146) (@rytilahti)
|
|
@@ -728,6 +850,9 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
728
850
|
|
|
729
851
|
**Documentation updates:**
|
|
730
852
|
|
|
853
|
+
- Discover does not support specifying network interface [\#167](https://github.com/python-kasa/python-kasa/issues/167)
|
|
854
|
+
- Add ability to control individual sockets on KP400 [\#121](https://github.com/python-kasa/python-kasa/issues/121)
|
|
855
|
+
- Improve poetry usage documentation [\#60](https://github.com/python-kasa/python-kasa/issues/60)
|
|
731
856
|
- Improve cli documentation for bulbs and power strips [\#123](https://github.com/python-kasa/python-kasa/pull/123) (@rytilahti)
|
|
732
857
|
|
|
733
858
|
**Merged pull requests:**
|
|
@@ -773,6 +898,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
773
898
|
|
|
774
899
|
- Add commands to control the wifi settings [\#45](https://github.com/python-kasa/python-kasa/pull/45) (@rytilahti)
|
|
775
900
|
|
|
901
|
+
**Fixed bugs:**
|
|
902
|
+
|
|
903
|
+
- HSV cli command not working [\#43](https://github.com/python-kasa/python-kasa/issues/43)
|
|
904
|
+
|
|
776
905
|
**Merged pull requests:**
|
|
777
906
|
|
|
778
907
|
- Add retries to protocol queries [\#65](https://github.com/python-kasa/python-kasa/pull/65) (@rytilahti)
|
|
@@ -19,12 +19,6 @@ class AutoOff(SmartModule):
|
|
|
19
19
|
|
|
20
20
|
def _initialize_features(self):
|
|
21
21
|
"""Initialize features after the initial update."""
|
|
22
|
-
if not isinstance(self.data, dict):
|
|
23
|
-
_LOGGER.warning(
|
|
24
|
-
"No data available for module, skipping %s: %s", self, self.data
|
|
25
|
-
)
|
|
26
|
-
return
|
|
27
|
-
|
|
28
22
|
self._add_feature(
|
|
29
23
|
Feature(
|
|
30
24
|
self._device,
|
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
-
from ...exceptions import SmartErrorCode
|
|
8
7
|
from ...feature import Feature
|
|
9
8
|
from ..smartmodule import SmartModule
|
|
10
9
|
|
|
@@ -18,6 +17,13 @@ class Cloud(SmartModule):
|
|
|
18
17
|
QUERY_GETTER_NAME = "get_connect_cloud_state"
|
|
19
18
|
REQUIRED_COMPONENT = "cloud_connect"
|
|
20
19
|
|
|
20
|
+
def _post_update_hook(self):
|
|
21
|
+
"""Perform actions after a device update.
|
|
22
|
+
|
|
23
|
+
Overrides the default behaviour to disable a module if the query returns
|
|
24
|
+
an error because the logic here is to treat that as not connected.
|
|
25
|
+
"""
|
|
26
|
+
|
|
21
27
|
def __init__(self, device: SmartDevice, module: str):
|
|
22
28
|
super().__init__(device, module)
|
|
23
29
|
|
|
@@ -37,6 +43,6 @@ class Cloud(SmartModule):
|
|
|
37
43
|
@property
|
|
38
44
|
def is_connected(self):
|
|
39
45
|
"""Return True if device is connected to the cloud."""
|
|
40
|
-
if
|
|
46
|
+
if self._has_data_error():
|
|
41
47
|
return False
|
|
42
48
|
return self.data["status"] == 0
|
|
@@ -10,6 +10,13 @@ class DeviceModule(SmartModule):
|
|
|
10
10
|
|
|
11
11
|
REQUIRED_COMPONENT = "device"
|
|
12
12
|
|
|
13
|
+
def _post_update_hook(self):
|
|
14
|
+
"""Perform actions after a device update.
|
|
15
|
+
|
|
16
|
+
Overrides the default behaviour to disable a module if the query returns
|
|
17
|
+
an error because this module is critical.
|
|
18
|
+
"""
|
|
19
|
+
|
|
13
20
|
def query(self) -> dict:
|
|
14
21
|
"""Query to execute during the update cycle."""
|
|
15
22
|
query = {
|
|
@@ -13,7 +13,6 @@ from typing import TYPE_CHECKING, Any, Callable, Optional
|
|
|
13
13
|
from async_timeout import timeout as asyncio_timeout
|
|
14
14
|
from pydantic.v1 import BaseModel, Field, validator
|
|
15
15
|
|
|
16
|
-
from ...exceptions import SmartErrorCode
|
|
17
16
|
from ...feature import Feature
|
|
18
17
|
from ..smartmodule import SmartModule
|
|
19
18
|
|
|
@@ -123,6 +122,13 @@ class Firmware(SmartModule):
|
|
|
123
122
|
req["get_auto_update_info"] = None
|
|
124
123
|
return req
|
|
125
124
|
|
|
125
|
+
def _post_update_hook(self):
|
|
126
|
+
"""Perform actions after a device update.
|
|
127
|
+
|
|
128
|
+
Overrides the default behaviour to disable a module if the query returns
|
|
129
|
+
an error because some of the module still functions.
|
|
130
|
+
"""
|
|
131
|
+
|
|
126
132
|
@property
|
|
127
133
|
def current_firmware(self) -> str:
|
|
128
134
|
"""Return the current firmware version."""
|
|
@@ -136,11 +142,11 @@ class Firmware(SmartModule):
|
|
|
136
142
|
@property
|
|
137
143
|
def firmware_update_info(self):
|
|
138
144
|
"""Return latest firmware information."""
|
|
139
|
-
|
|
140
|
-
if not self._device.is_cloud_connected or isinstance(fw, SmartErrorCode):
|
|
145
|
+
if not self._device.is_cloud_connected or self._has_data_error():
|
|
141
146
|
# Error in response, probably disconnected from the cloud.
|
|
142
147
|
return UpdateInfo(type=0, need_to_upgrade=False)
|
|
143
148
|
|
|
149
|
+
fw = self.data.get("get_latest_fw") or self.data
|
|
144
150
|
return UpdateInfo.parse_obj(fw)
|
|
145
151
|
|
|
146
152
|
@property
|
|
@@ -14,6 +14,10 @@ class FrostProtection(SmartModule):
|
|
|
14
14
|
REQUIRED_COMPONENT = "frost_protection"
|
|
15
15
|
QUERY_GETTER_NAME = "get_frost_protection"
|
|
16
16
|
|
|
17
|
+
def query(self) -> dict:
|
|
18
|
+
"""Query to execute during the update cycle."""
|
|
19
|
+
return {}
|
|
20
|
+
|
|
17
21
|
@property
|
|
18
22
|
def enabled(self) -> bool:
|
|
19
23
|
"""Return True if frost protection is on."""
|
|
@@ -140,7 +140,7 @@ class LightPreset(SmartModule, LightPresetInterface):
|
|
|
140
140
|
"""Query to execute during the update cycle."""
|
|
141
141
|
if self._state_in_sysinfo: # Child lights can have states in the child info
|
|
142
142
|
return {}
|
|
143
|
-
return {self.QUERY_GETTER_NAME:
|
|
143
|
+
return {self.QUERY_GETTER_NAME: {"start_index": 0}}
|
|
144
144
|
|
|
145
145
|
async def _check_supported(self):
|
|
146
146
|
"""Additional check to see if the module is supported by the device.
|
|
@@ -230,7 +230,7 @@ class LightTransition(SmartModule):
|
|
|
230
230
|
if self._state_in_sysinfo:
|
|
231
231
|
return {}
|
|
232
232
|
else:
|
|
233
|
-
return {self.QUERY_GETTER_NAME:
|
|
233
|
+
return {self.QUERY_GETTER_NAME: {}}
|
|
234
234
|
|
|
235
235
|
async def _check_supported(self):
|
|
236
236
|
"""Additional check to see if the module is supported by the device."""
|
|
@@ -177,11 +177,20 @@ class SmartDevice(Device):
|
|
|
177
177
|
self._children[info["device_id"]]._update_internal_state(info)
|
|
178
178
|
|
|
179
179
|
# Call handle update for modules that want to update internal data
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
errors = []
|
|
181
|
+
for module_name, module in self._modules.items():
|
|
182
|
+
if not self._handle_module_post_update_hook(module):
|
|
183
|
+
errors.append(module_name)
|
|
184
|
+
for error in errors:
|
|
185
|
+
self._modules.pop(error)
|
|
186
|
+
|
|
182
187
|
for child in self._children.values():
|
|
183
|
-
|
|
184
|
-
|
|
188
|
+
errors = []
|
|
189
|
+
for child_module_name, child_module in child._modules.items():
|
|
190
|
+
if not self._handle_module_post_update_hook(child_module):
|
|
191
|
+
errors.append(child_module_name)
|
|
192
|
+
for error in errors:
|
|
193
|
+
child._modules.pop(error)
|
|
185
194
|
|
|
186
195
|
# We can first initialize the features after the first update.
|
|
187
196
|
# We make here an assumption that every device has at least a single feature.
|
|
@@ -190,6 +199,19 @@ class SmartDevice(Device):
|
|
|
190
199
|
|
|
191
200
|
_LOGGER.debug("Got an update: %s", self._last_update)
|
|
192
201
|
|
|
202
|
+
def _handle_module_post_update_hook(self, module: SmartModule) -> bool:
|
|
203
|
+
try:
|
|
204
|
+
module._post_update_hook()
|
|
205
|
+
return True
|
|
206
|
+
except Exception as ex:
|
|
207
|
+
_LOGGER.error(
|
|
208
|
+
"Error processing %s for device %s, module will be unavailable: %s",
|
|
209
|
+
module.name,
|
|
210
|
+
self.host,
|
|
211
|
+
ex,
|
|
212
|
+
)
|
|
213
|
+
return False
|
|
214
|
+
|
|
193
215
|
async def _initialize_modules(self):
|
|
194
216
|
"""Initialize modules based on component negotiation response."""
|
|
195
217
|
from .smartmodule import SmartModule
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
-
from ..exceptions import KasaException
|
|
8
|
+
from ..exceptions import DeviceError, KasaException, SmartErrorCode
|
|
9
9
|
from ..module import Module
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
@@ -41,6 +41,14 @@ class SmartModule(Module):
|
|
|
41
41
|
"""Name of the module."""
|
|
42
42
|
return getattr(self, "NAME", self.__class__.__name__)
|
|
43
43
|
|
|
44
|
+
def _post_update_hook(self): # noqa: B027
|
|
45
|
+
"""Perform actions after a device update.
|
|
46
|
+
|
|
47
|
+
Any modules overriding this should ensure that self.data is
|
|
48
|
+
accessed unless the module should remain active despite errors.
|
|
49
|
+
"""
|
|
50
|
+
assert self.data # noqa: S101
|
|
51
|
+
|
|
44
52
|
def query(self) -> dict:
|
|
45
53
|
"""Query to execute during the update cycle.
|
|
46
54
|
|
|
@@ -87,6 +95,11 @@ class SmartModule(Module):
|
|
|
87
95
|
|
|
88
96
|
filtered_data = {k: v for k, v in dev._last_update.items() if k in q_keys}
|
|
89
97
|
|
|
98
|
+
for data_item in filtered_data:
|
|
99
|
+
if isinstance(filtered_data[data_item], SmartErrorCode):
|
|
100
|
+
raise DeviceError(
|
|
101
|
+
f"{data_item} for {self.name}", error_code=filtered_data[data_item]
|
|
102
|
+
)
|
|
90
103
|
if len(filtered_data) == 1:
|
|
91
104
|
return next(iter(filtered_data.values()))
|
|
92
105
|
|
|
@@ -110,3 +123,10 @@ class SmartModule(Module):
|
|
|
110
123
|
color_temp_range but only supports one value.
|
|
111
124
|
"""
|
|
112
125
|
return True
|
|
126
|
+
|
|
127
|
+
def _has_data_error(self) -> bool:
|
|
128
|
+
try:
|
|
129
|
+
assert self.data # noqa: S101
|
|
130
|
+
return False
|
|
131
|
+
except DeviceError:
|
|
132
|
+
return True
|
|
@@ -416,6 +416,10 @@ class _ChildProtocolWrapper(SmartProtocol):
|
|
|
416
416
|
return smart_method, smart_params
|
|
417
417
|
|
|
418
418
|
async def query(self, request: str | dict, retry_count: int = 3) -> dict:
|
|
419
|
+
"""Wrap request inside control_child envelope."""
|
|
420
|
+
return await self._query(request, retry_count)
|
|
421
|
+
|
|
422
|
+
async def _query(self, request: str | dict, retry_count: int = 3) -> dict:
|
|
419
423
|
"""Wrap request inside control_child envelope."""
|
|
420
424
|
method, params = self._get_method_and_params_for_request(request)
|
|
421
425
|
request_data = {
|