python-kasa 0.7.3__tar.gz → 0.7.5__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.3 → python_kasa-0.7.5}/CHANGELOG.md +141 -75
- {python_kasa-0.7.3 → python_kasa-0.7.5}/PKG-INFO +2 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/dump_devinfo.py +2 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/parse_pcap_klap.py +35 -12
- python_kasa-0.7.5/kasa/cachedzoneinfo.py +28 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/device.py +13 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/device.py +22 -3
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/device_factory.py +2 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/discover.py +2 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotbulb.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotdevice.py +25 -10
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotstrip.py +12 -5
- python_kasa-0.7.5/kasa/iot/iottimezone.py +156 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/ambientlight.py +3 -3
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/cloud.py +3 -3
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/emeter.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/light.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/lightpreset.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/time.py +16 -5
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/klaptransport.py +0 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/module.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/cloud.py +3 -9
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/color.py +3 -8
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/contactsensor.py +3 -8
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/devicemodule.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/fan.py +4 -10
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/humiditysensor.py +4 -9
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/light.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/lighteffect.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/lightpreset.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/lighttransition.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/reportmode.py +3 -8
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/temperaturesensor.py +7 -10
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/time.py +28 -14
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/waterleaksensor.py +4 -8
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/smartchilddevice.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/smartdevice.py +23 -11
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/smartmodule.py +3 -3
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/conftest.py +40 -5
- python_kasa-0.7.5/kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json +93 -0
- python_kasa-0.7.5/kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json +96 -0
- python_kasa-0.7.5/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.9.0.json +511 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_bulb.py +2 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_cli.py +16 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_common_modules.py +2 -2
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_device.py +36 -4
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_discovery.py +8 -6
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_feature.py +10 -4
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_klapprotocol.py +1 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_protocol.py +7 -1
- {python_kasa-0.7.3 → python_kasa-0.7.5}/pyproject.toml +9 -3
- {python_kasa-0.7.3 → python_kasa-0.7.5}/.gitignore +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/LICENSE +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/README.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/README.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/bench/benchmark.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/bench/utils/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/bench/utils/data.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/bench/utils/original.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/create_module_fixtures.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/generate_supported.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/helpers/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/helpers/smartrequests.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/parse_pcap.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/devtools/perftest.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/Makefile +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/make.bat +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/SUPPORTED.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/_static/copybutton.js +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/cli.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/codeinfo.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/conf.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/contribute.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/deprecated.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/connect.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/device.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/discover.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/energy.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/feature.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/light.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/module.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides/strip.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/guides.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/index.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/library.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/reference.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartbulb.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartdevice.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartdimmer.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartlightstrip.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartplug.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/smartstrip.rst +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/topics.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/source/tutorial.md +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/docs/tutorial.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/aestransport.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/__main__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/common.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/discover.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/feature.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/lazygroup.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/light.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/main.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/schedule.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/time.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/usage.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/cli/wifi.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/credentials.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/device_type.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/deviceconfig.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/emeterstatus.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/exceptions.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/feature.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/httpclient.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/energy.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/fan.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/led.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/light.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/lighteffect.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/interfaces/lightpreset.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/effects.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotdimmer.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotlightstrip.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotmodule.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/iotplug.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/antitheft.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/countdown.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/led.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/lighteffect.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/motion.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/rulemodule.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/schedule.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iot/modules/usage.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/iotprotocol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/json.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/modulemapping.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/modulemapping.pyi +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/protocol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/py.typed +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/effects.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/alarm.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/autooff.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/batterysensor.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/brightness.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/childdevice.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/colortemperature.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/energy.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/firmware.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/frostprotection.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/led.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/lightstripeffect.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/motionsensor.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smart/modules/temperaturecontrol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/smartprotocol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/device_fixtures.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/discovery_fixtures.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fakeprotocol_iot.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fakeprotocol_smart.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtureinfo.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T100(EU)_1.0_1.12.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/features/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/features/test_brightness.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/features/test_colortemp.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_autooff.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_contact.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_fan.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_firmware.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_humidity.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_light_effect.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_motionsensor.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_temperature.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_waterleak.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_aestransport.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_childdevice.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_device_factory.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_device_type.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_deviceconfig.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_dimmer.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_emeter.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_httpclient.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_iotdevice.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_lightstrip.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_plug.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_readme_examples.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_smartdevice.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_smartprotocol.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_strip.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/tests/test_usage.py +0 -0
- {python_kasa-0.7.3 → python_kasa-0.7.5}/kasa/xortransport.py +0 -0
|
@@ -1,12 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.5](https://github.com/python-kasa/python-kasa/tree/0.7.5) (2024-10-08)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.4...0.7.5)
|
|
6
|
+
|
|
7
|
+
**Release summary:**
|
|
8
|
+
|
|
9
|
+
- Fix for KP303 on Firmware 1.0.6
|
|
10
|
+
- Fix for `on_since` value jitter
|
|
11
|
+
- Various maintenance items
|
|
12
|
+
|
|
13
|
+
**Breaking changes:**
|
|
14
|
+
|
|
15
|
+
- Make iot time timezone aware [\#1147](https://github.com/python-kasa/python-kasa/pull/1147) (@sdb9696)
|
|
16
|
+
|
|
17
|
+
**Fixed bugs:**
|
|
18
|
+
|
|
19
|
+
- Use tzinfo in time constructor instead of astime for iot devices [\#1158](https://github.com/python-kasa/python-kasa/pull/1158) (@sdb9696)
|
|
20
|
+
- Send empty dictionary instead of null for iot queries [\#1145](https://github.com/python-kasa/python-kasa/pull/1145) (@sdb9696)
|
|
21
|
+
- Stabilise on\_since value for smart devices [\#1144](https://github.com/python-kasa/python-kasa/pull/1144) (@sdb9696)
|
|
22
|
+
- parse\_pcap\_klap: require source host [\#1137](https://github.com/python-kasa/python-kasa/pull/1137) (@rytilahti)
|
|
23
|
+
- parse\_pcap\_klap: use request\_uri for matching the response [\#1136](https://github.com/python-kasa/python-kasa/pull/1136) (@rytilahti)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
**Project maintenance:**
|
|
27
|
+
|
|
28
|
+
- Cache zoneinfo for smart devices [\#1156](https://github.com/python-kasa/python-kasa/pull/1156) (@sdb9696)
|
|
29
|
+
- Correctly define SmartModule.call as an async function [\#1148](https://github.com/python-kasa/python-kasa/pull/1148) (@sdb9696)
|
|
30
|
+
- Remove async magic patch from tests [\#1146](https://github.com/python-kasa/python-kasa/pull/1146) (@sdb9696)
|
|
31
|
+
- Move feature initialization from \_\_init\_\_ to \_initialize\_features [\#1140](https://github.com/python-kasa/python-kasa/pull/1140) (@rytilahti)
|
|
32
|
+
|
|
33
|
+
## [0.7.4](https://github.com/python-kasa/python-kasa/tree/0.7.4) (2024-09-27)
|
|
34
|
+
|
|
35
|
+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.3...0.7.4)
|
|
36
|
+
|
|
37
|
+
**Release summary:**
|
|
38
|
+
|
|
39
|
+
- KL135 color temp range corrected to 9000k max
|
|
40
|
+
- Minor enhancements and project maintenance
|
|
41
|
+
|
|
42
|
+
**Implemented enhancements:**
|
|
43
|
+
|
|
44
|
+
- Add factory\_reset\(\) to iotdevice [\#1125](https://github.com/python-kasa/python-kasa/pull/1125) (@rytilahti)
|
|
45
|
+
- Add reboot\(\) to the device interface [\#1124](https://github.com/python-kasa/python-kasa/pull/1124) (@rytilahti)
|
|
46
|
+
- Add factory-reset command to cli [\#1108](https://github.com/python-kasa/python-kasa/pull/1108) (@rytilahti)
|
|
47
|
+
|
|
48
|
+
**Fixed bugs:**
|
|
49
|
+
|
|
50
|
+
- Extend KL135 ct range up to 9000K [\#1123](https://github.com/python-kasa/python-kasa/pull/1123) (@rytilahti)
|
|
51
|
+
- Fix cli command for device off [\#1121](https://github.com/python-kasa/python-kasa/pull/1121) (@sdb9696)
|
|
52
|
+
|
|
53
|
+
**Project maintenance:**
|
|
54
|
+
|
|
55
|
+
- Use pytest-socket to ensure no tests are performing io [\#1133](https://github.com/python-kasa/python-kasa/pull/1133) (@sdb9696)
|
|
56
|
+
- Enable ruff lint pycodestyle warnings [\#1132](https://github.com/python-kasa/python-kasa/pull/1132) (@sdb9696)
|
|
57
|
+
- Add autouse fixture to patch asyncio.sleep [\#1131](https://github.com/python-kasa/python-kasa/pull/1131) (@sdb9696)
|
|
58
|
+
- Mock asyncio.sleep for klapprotocol tests [\#1130](https://github.com/python-kasa/python-kasa/pull/1130) (@rytilahti)
|
|
59
|
+
- Add fixture for T110 fw 1.9.0 [\#1129](https://github.com/python-kasa/python-kasa/pull/1129) (@rytilahti)
|
|
60
|
+
- Speed up and simplify github workflows [\#1128](https://github.com/python-kasa/python-kasa/pull/1128) (@sdb9696)
|
|
61
|
+
- Add KS200M\(US\) fw 1.0.12 fixture [\#1127](https://github.com/python-kasa/python-kasa/pull/1127) (@GatorEG)
|
|
62
|
+
- Add stale PR/Issue github workflow [\#1126](https://github.com/python-kasa/python-kasa/pull/1126) (@sdb9696)
|
|
63
|
+
- Add fixture for KL135\(US\) fw 1.0.15 [\#1122](https://github.com/python-kasa/python-kasa/pull/1122) (@rytilahti)
|
|
64
|
+
|
|
3
65
|
## [0.7.3](https://github.com/python-kasa/python-kasa/tree/0.7.3) (2024-09-10)
|
|
4
66
|
|
|
5
67
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.2...0.7.3)
|
|
6
68
|
|
|
7
|
-
**Release summary:**
|
|
8
|
-
|
|
9
|
-
- Migrate from `poetry` to `uv` for package/project management.
|
|
69
|
+
**Release summary:**
|
|
70
|
+
|
|
71
|
+
- Migrate from `poetry` to `uv` for package/project management.
|
|
10
72
|
- Various minor code improvements
|
|
11
73
|
|
|
12
74
|
**Project maintenance:**
|
|
@@ -21,9 +83,9 @@
|
|
|
21
83
|
|
|
22
84
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.1...0.7.2)
|
|
23
85
|
|
|
24
|
-
**Release summary:**
|
|
25
|
-
|
|
26
|
-
- **Breaking** change to disable including the check for the latest firmware for tapo devices and newer kasa devices in the standard update cycle. To check for the latest firmware call `check_latest_firmware` on the firmware module or run the `check_latest_firmware` feature.
|
|
86
|
+
**Release summary:**
|
|
87
|
+
|
|
88
|
+
- **Breaking** change to disable including the check for the latest firmware for tapo devices and newer kasa devices in the standard update cycle. To check for the latest firmware call `check_latest_firmware` on the firmware module or run the `check_latest_firmware` feature.
|
|
27
89
|
- Minor bugfixes and improvements.
|
|
28
90
|
|
|
29
91
|
**Breaking changes:**
|
|
@@ -54,9 +116,9 @@
|
|
|
54
116
|
|
|
55
117
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.5...0.7.1)
|
|
56
118
|
|
|
57
|
-
**Release highlights:**
|
|
58
|
-
- This release consists mainly of bugfixes and project improvements.
|
|
59
|
-
- There is also new support for Tapo T100 motion sensors.
|
|
119
|
+
**Release highlights:**
|
|
120
|
+
- This release consists mainly of bugfixes and project improvements.
|
|
121
|
+
- There is also new support for Tapo T100 motion sensors.
|
|
60
122
|
- The CLI now supports child devices on all applicable commands.
|
|
61
123
|
|
|
62
124
|
**Implemented enhancements:**
|
|
@@ -122,7 +184,7 @@ A critical bugfix for an issue with some L530 Series devices and a redactor for
|
|
|
122
184
|
|
|
123
185
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.3...0.7.0.4)
|
|
124
186
|
|
|
125
|
-
Critical bugfixes for issues with P100s and thermostats
|
|
187
|
+
Critical bugfixes for issues with P100s and thermostats
|
|
126
188
|
|
|
127
189
|
|
|
128
190
|
**Fixed bugs:**
|
|
@@ -136,7 +198,7 @@ Critical bugfixes for issues with P100s and thermostats
|
|
|
136
198
|
|
|
137
199
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.2...0.7.0.3)
|
|
138
200
|
|
|
139
|
-
Critical bugfix for issue #1033 with ks225 and S505D light preset module errors.
|
|
201
|
+
Critical bugfix for issue #1033 with ks225 and S505D light preset module errors.
|
|
140
202
|
Partially fixes light preset module errors with L920 and L930.
|
|
141
203
|
|
|
142
204
|
**Fixed bugs:**
|
|
@@ -191,25 +253,25 @@ This patch release fixes some minor issues found out during testing against all
|
|
|
191
253
|
|
|
192
254
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.2.1...0.7.0)
|
|
193
255
|
|
|
194
|
-
We have been working hard behind the scenes to make this major release possible.
|
|
195
|
-
This release brings a major refactoring of the library to serve the ever-growing list of supported devices and paves the way for the future, yet unsupported devices.
|
|
196
|
-
The library now exposes device features through generic module and feature interfaces, that allows easy extension for future improvements.
|
|
197
|
-
|
|
198
|
-
With almost 180 merged pull requests, over 200 changed files and since the last release, this release includes lots of goodies for everyone:
|
|
199
|
-
* Support for multi-functional devices like the dimmable fan KS240.
|
|
200
|
-
* Initial support for hubs and hub-connected devices like thermostats and sensors.
|
|
201
|
-
* Both IOT (legacy kasa) and SMART (tapo and newer kasa) devices now expose features and share common API.
|
|
202
|
-
* Modules to allow controlling new devices and functions such as light presets, fan controls, thermostats, humidity sensors, firmware updates and alarms.
|
|
203
|
-
* The common APIs allow dynamic introspection of available device features, making it easy to create dynamic interfaces.
|
|
204
|
-
* Improved documentation.
|
|
205
|
-
|
|
206
|
-
Hope you enjoy the release, feel free to leave a comment and feedback!
|
|
207
|
-
|
|
208
|
-
If you have a device that works, but is not listed in our supported devices list, feel free to [contribute fixture files](https://python-kasa.readthedocs.io/en/latest/contribute.html#contributing-fixture-files) to help us to make the library even better!
|
|
209
|
-
|
|
210
|
-
> git diff 0.6.2.1..HEAD|diffstat
|
|
211
|
-
> 214 files changed, 26960 insertions(+), 6310 deletions(-)
|
|
212
|
-
|
|
256
|
+
We have been working hard behind the scenes to make this major release possible.
|
|
257
|
+
This release brings a major refactoring of the library to serve the ever-growing list of supported devices and paves the way for the future, yet unsupported devices.
|
|
258
|
+
The library now exposes device features through generic module and feature interfaces, that allows easy extension for future improvements.
|
|
259
|
+
|
|
260
|
+
With almost 180 merged pull requests, over 200 changed files and since the last release, this release includes lots of goodies for everyone:
|
|
261
|
+
* Support for multi-functional devices like the dimmable fan KS240.
|
|
262
|
+
* Initial support for hubs and hub-connected devices like thermostats and sensors.
|
|
263
|
+
* Both IOT (legacy kasa) and SMART (tapo and newer kasa) devices now expose features and share common API.
|
|
264
|
+
* Modules to allow controlling new devices and functions such as light presets, fan controls, thermostats, humidity sensors, firmware updates and alarms.
|
|
265
|
+
* The common APIs allow dynamic introspection of available device features, making it easy to create dynamic interfaces.
|
|
266
|
+
* Improved documentation.
|
|
267
|
+
|
|
268
|
+
Hope you enjoy the release, feel free to leave a comment and feedback!
|
|
269
|
+
|
|
270
|
+
If you have a device that works, but is not listed in our supported devices list, feel free to [contribute fixture files](https://python-kasa.readthedocs.io/en/latest/contribute.html#contributing-fixture-files) to help us to make the library even better!
|
|
271
|
+
|
|
272
|
+
> git diff 0.6.2.1..HEAD|diffstat
|
|
273
|
+
> 214 files changed, 26960 insertions(+), 6310 deletions(-)
|
|
274
|
+
|
|
213
275
|
For more information on the changes please checkout our [documentation on the API changes](https://python-kasa.readthedocs.io/en/latest/deprecated.html)
|
|
214
276
|
|
|
215
277
|
**Breaking changes:**
|
|
@@ -415,6 +477,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
415
477
|
- Fix dump\_devinfo scrubbing for ks240 [\#765](https://github.com/python-kasa/python-kasa/pull/765) (@rytilahti)
|
|
416
478
|
- Rename and deprecate exception classes [\#739](https://github.com/python-kasa/python-kasa/pull/739) (@sdb9696)
|
|
417
479
|
|
|
480
|
+
**Closed issues:**
|
|
481
|
+
|
|
482
|
+
- Improve timezone support [\#980](https://github.com/python-kasa/python-kasa/issues/980)
|
|
483
|
+
|
|
418
484
|
## [0.6.2.1](https://github.com/python-kasa/python-kasa/tree/0.6.2.1) (2024-02-02)
|
|
419
485
|
|
|
420
486
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.2...0.6.2.1)
|
|
@@ -441,8 +507,8 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
441
507
|
|
|
442
508
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.1...0.6.2)
|
|
443
509
|
|
|
444
|
-
Release highlights:
|
|
445
|
-
* Support for tapo power strips (P300)
|
|
510
|
+
Release highlights:
|
|
511
|
+
* Support for tapo power strips (P300)
|
|
446
512
|
* Performance improvements and bug fixes
|
|
447
513
|
|
|
448
514
|
**Implemented enhancements:**
|
|
@@ -481,9 +547,9 @@ Release highlights:
|
|
|
481
547
|
|
|
482
548
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.0.1...0.6.1)
|
|
483
549
|
|
|
484
|
-
Release highlights:
|
|
485
|
-
* Support for tapo wall switches
|
|
486
|
-
* Support for unprovisioned devices
|
|
550
|
+
Release highlights:
|
|
551
|
+
* Support for tapo wall switches
|
|
552
|
+
* Support for unprovisioned devices
|
|
487
553
|
* Performance and stability improvements
|
|
488
554
|
|
|
489
555
|
**Implemented enhancements:**
|
|
@@ -556,17 +622,17 @@ A patch release to improve the protocol handling.
|
|
|
556
622
|
|
|
557
623
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.4...0.6.0)
|
|
558
624
|
|
|
559
|
-
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!
|
|
560
|
-
|
|
561
|
-
This release adds support to a large range of previously unsupported devices, including:
|
|
562
|
-
|
|
563
|
-
* Newer kasa-branded devices, including Matter-enabled devices like KP125M
|
|
564
|
-
* Newer hardware/firmware versions on some models, like EP25, that suddenly changed the used protocol
|
|
565
|
-
* Tapo-branded devices like plugs (P110), light bulbs (KL530), LED strips (L900, L920), and wall switches (KS205, KS225)
|
|
566
|
-
* UK variant of HS110, which was the first device using the new protocol
|
|
567
|
-
|
|
568
|
-
If your device that is not currently listed as supported is working, please consider contributing a test fixture file.
|
|
569
|
-
|
|
625
|
+
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!
|
|
626
|
+
|
|
627
|
+
This release adds support to a large range of previously unsupported devices, including:
|
|
628
|
+
|
|
629
|
+
* Newer kasa-branded devices, including Matter-enabled devices like KP125M
|
|
630
|
+
* Newer hardware/firmware versions on some models, like EP25, that suddenly changed the used protocol
|
|
631
|
+
* Tapo-branded devices like plugs (P110), light bulbs (KL530), LED strips (L900, L920), and wall switches (KS205, KS225)
|
|
632
|
+
* UK variant of HS110, which was the first device using the new protocol
|
|
633
|
+
|
|
634
|
+
If your device that is not currently listed as supported is working, please consider contributing a test fixture file.
|
|
635
|
+
|
|
570
636
|
Special thanks goes to @SimonWilkinson who created the initial PR for the new communication protocol!
|
|
571
637
|
|
|
572
638
|
**Breaking changes:**
|
|
@@ -661,13 +727,13 @@ Special thanks goes to @SimonWilkinson who created the initial PR for the new co
|
|
|
661
727
|
|
|
662
728
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.3...0.5.4)
|
|
663
729
|
|
|
664
|
-
The highlights of this maintenance release:
|
|
665
|
-
|
|
666
|
-
* Support to the alternative discovery protocol and foundational work to support other communication protocols, thanks to @sdb9696.
|
|
667
|
-
* Reliability improvements by avoiding overflowing device buffers, thanks to @cobryan05.
|
|
668
|
-
* Optimizations for downstream device accesses, thanks to @bdraco.
|
|
669
|
-
* Support for both pydantic v1 and v2.
|
|
670
|
-
|
|
730
|
+
The highlights of this maintenance release:
|
|
731
|
+
|
|
732
|
+
* Support to the alternative discovery protocol and foundational work to support other communication protocols, thanks to @sdb9696.
|
|
733
|
+
* Reliability improvements by avoiding overflowing device buffers, thanks to @cobryan05.
|
|
734
|
+
* Optimizations for downstream device accesses, thanks to @bdraco.
|
|
735
|
+
* Support for both pydantic v1 and v2.
|
|
736
|
+
|
|
671
737
|
As always, see the full changelog for details.
|
|
672
738
|
|
|
673
739
|
**Implemented enhancements:**
|
|
@@ -727,8 +793,8 @@ This release adds support for defining the device port and introduces dependency
|
|
|
727
793
|
|
|
728
794
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.1...0.5.2)
|
|
729
795
|
|
|
730
|
-
Besides some small improvements, this release:
|
|
731
|
-
* Adds optional dependency for for `orjson` and `kasa-crypt` to speed-up protocol handling by an order of magnitude.
|
|
796
|
+
Besides some small improvements, this release:
|
|
797
|
+
* Adds optional dependency for for `orjson` and `kasa-crypt` to speed-up protocol handling by an order of magnitude.
|
|
732
798
|
* Drops Python 3.7 support as it is no longer maintained.
|
|
733
799
|
|
|
734
800
|
**Breaking changes:**
|
|
@@ -763,11 +829,11 @@ Besides some small improvements, this release:
|
|
|
763
829
|
|
|
764
830
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.0...0.5.1)
|
|
765
831
|
|
|
766
|
-
This minor release contains mostly small UX fine-tuning and documentation improvements alongside with bug fixes:
|
|
767
|
-
* Improved console tool (JSON output, colorized output if rich is installed)
|
|
768
|
-
* Pretty, colorized console output, if `rich` is installed
|
|
769
|
-
* Support for configuring bulb presets
|
|
770
|
-
* Usage data is now reported in the expected format
|
|
832
|
+
This minor release contains mostly small UX fine-tuning and documentation improvements alongside with bug fixes:
|
|
833
|
+
* Improved console tool (JSON output, colorized output if rich is installed)
|
|
834
|
+
* Pretty, colorized console output, if `rich` is installed
|
|
835
|
+
* Support for configuring bulb presets
|
|
836
|
+
* Usage data is now reported in the expected format
|
|
771
837
|
* Dependency pinning is relaxed to give downstreams more control
|
|
772
838
|
|
|
773
839
|
**Breaking changes:**
|
|
@@ -831,21 +897,21 @@ This minor release contains mostly small UX fine-tuning and documentation improv
|
|
|
831
897
|
|
|
832
898
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.4.3...0.5.0)
|
|
833
899
|
|
|
834
|
-
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.
|
|
835
|
-
|
|
836
|
-
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):
|
|
837
|
-
* Basic system info
|
|
838
|
-
* Emeter
|
|
839
|
-
* 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
|
|
840
|
-
* Usage statistics - similar interface to emeter, but reports on-time statistics instead of energy consumption (new)
|
|
841
|
-
* Countdown (new)
|
|
842
|
-
* Antitheft (new)
|
|
843
|
-
* Schedule (new)
|
|
844
|
-
* Motion - for configuring motion settings on some dimmers (new)
|
|
845
|
-
* Ambientlight - for configuring brightness limits when motion sensor actuates on some dimmers (new)
|
|
846
|
-
* Cloud - information about cloud connectivity (new)
|
|
847
|
-
|
|
848
|
-
For developers, the new functionalities are currently only exposed through the implementation modules accessible through `modules` property.
|
|
900
|
+
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.
|
|
901
|
+
|
|
902
|
+
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):
|
|
903
|
+
* Basic system info
|
|
904
|
+
* Emeter
|
|
905
|
+
* 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
|
|
906
|
+
* Usage statistics - similar interface to emeter, but reports on-time statistics instead of energy consumption (new)
|
|
907
|
+
* Countdown (new)
|
|
908
|
+
* Antitheft (new)
|
|
909
|
+
* Schedule (new)
|
|
910
|
+
* Motion - for configuring motion settings on some dimmers (new)
|
|
911
|
+
* Ambientlight - for configuring brightness limits when motion sensor actuates on some dimmers (new)
|
|
912
|
+
* Cloud - information about cloud connectivity (new)
|
|
913
|
+
|
|
914
|
+
For developers, the new functionalities are currently only exposed through the implementation modules accessible through `modules` property.
|
|
849
915
|
Pull requests improving the functionality of modules as well as adding better interfaces to device classes are welcome!
|
|
850
916
|
|
|
851
917
|
**Breaking changes:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-kasa
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.5
|
|
4
4
|
Summary: Python API for TP-Link Kasa and Tapo devices
|
|
5
5
|
Project-URL: Homepage, https://github.com/python-kasa/python-kasa
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
|
|
@@ -24,6 +24,7 @@ Requires-Dist: asyncclick>=8.1.7
|
|
|
24
24
|
Requires-Dist: cryptography>=1.9
|
|
25
25
|
Requires-Dist: pydantic>=1.10.15
|
|
26
26
|
Requires-Dist: typing-extensions<5.0,>=4.12.2
|
|
27
|
+
Requires-Dist: tzdata>=2024.2; platform_system == 'Windows'
|
|
27
28
|
Provides-Extra: docs
|
|
28
29
|
Requires-Dist: docutils>=0.17; extra == 'docs'
|
|
29
30
|
Requires-Dist: myst-parser; extra == 'docs'
|
|
@@ -285,7 +285,7 @@ async def get_legacy_fixture(device):
|
|
|
285
285
|
try:
|
|
286
286
|
click.echo(f"Testing {test_call}..", nl=False)
|
|
287
287
|
info = await device.protocol.query(
|
|
288
|
-
{test_call.module: {test_call.method:
|
|
288
|
+
{test_call.module: {test_call.method: {}}}
|
|
289
289
|
)
|
|
290
290
|
resp = info[test_call.module]
|
|
291
291
|
except Exception as ex:
|
|
@@ -302,7 +302,7 @@ async def get_legacy_fixture(device):
|
|
|
302
302
|
final_query = defaultdict(defaultdict)
|
|
303
303
|
final = defaultdict(defaultdict)
|
|
304
304
|
for succ, resp in successes:
|
|
305
|
-
final_query[succ.module][succ.method] =
|
|
305
|
+
final_query[succ.module][succ.method] = {}
|
|
306
306
|
final[succ.module][succ.method] = resp
|
|
307
307
|
|
|
308
308
|
final = default_to_regular(final)
|
|
@@ -29,6 +29,24 @@ from kasa.klaptransport import KlapEncryptionSession, KlapTransportV2
|
|
|
29
29
|
from kasa.protocol import DEFAULT_CREDENTIALS, get_default_credentials
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
def _is_http_response_for_packet(response, packet):
|
|
33
|
+
"""Return True if the *response* contains a response for request in *packet*.
|
|
34
|
+
|
|
35
|
+
Different tshark versions use different field for the information.
|
|
36
|
+
"""
|
|
37
|
+
if not hasattr(response, "http"):
|
|
38
|
+
return False
|
|
39
|
+
if hasattr(response.http, "response_for_uri") and (
|
|
40
|
+
response.http.response_for_uri == packet.http.request_full_uri
|
|
41
|
+
):
|
|
42
|
+
return True
|
|
43
|
+
# tshark 4.4.0
|
|
44
|
+
if response.http.request_uri == packet.http.request_uri:
|
|
45
|
+
return True
|
|
46
|
+
|
|
47
|
+
return False
|
|
48
|
+
|
|
49
|
+
|
|
32
50
|
class MyEncryptionSession(KlapEncryptionSession):
|
|
33
51
|
"""A custom KlapEncryptionSession class that allows for decryption."""
|
|
34
52
|
|
|
@@ -194,6 +212,7 @@ def main(
|
|
|
194
212
|
username,
|
|
195
213
|
password,
|
|
196
214
|
device_ip,
|
|
215
|
+
source_host,
|
|
197
216
|
pcap_file_path,
|
|
198
217
|
output_json_name=None,
|
|
199
218
|
):
|
|
@@ -214,7 +233,6 @@ def main(
|
|
|
214
233
|
)
|
|
215
234
|
|
|
216
235
|
operator = Operator(KlapTransportV2(config=fake_device), creds)
|
|
217
|
-
|
|
218
236
|
packets = []
|
|
219
237
|
|
|
220
238
|
# pyshark is a little weird in how it handles iteration,
|
|
@@ -222,7 +240,9 @@ def main(
|
|
|
222
240
|
while True:
|
|
223
241
|
try:
|
|
224
242
|
packet = capture.next()
|
|
225
|
-
|
|
243
|
+
packet_number = capture._current_packet
|
|
244
|
+
if packet.ip.src != source_host:
|
|
245
|
+
continue
|
|
226
246
|
# we only care about http packets
|
|
227
247
|
if hasattr(
|
|
228
248
|
packet, "http"
|
|
@@ -267,18 +287,16 @@ def main(
|
|
|
267
287
|
message = bytes.fromhex(data)
|
|
268
288
|
operator.local_seed = message
|
|
269
289
|
response = None
|
|
290
|
+
print(
|
|
291
|
+
f"got handshake1 in {packet_number}, "
|
|
292
|
+
f"looking for the response"
|
|
293
|
+
)
|
|
270
294
|
while (
|
|
271
295
|
True
|
|
272
296
|
): # we are going to now look for the response to this request
|
|
273
297
|
response = capture.next()
|
|
274
|
-
if (
|
|
275
|
-
|
|
276
|
-
and hasattr(response.http, "response_for_uri")
|
|
277
|
-
and (
|
|
278
|
-
response.http.response_for_uri
|
|
279
|
-
== packet.http.request_full_uri
|
|
280
|
-
)
|
|
281
|
-
):
|
|
298
|
+
if _is_http_response_for_packet(response, packet):
|
|
299
|
+
print(f"found response in {packet_number}")
|
|
282
300
|
break
|
|
283
301
|
data = response.http.get_field_value("file_data", raw=True)
|
|
284
302
|
message = bytes.fromhex(data)
|
|
@@ -309,6 +327,11 @@ def main(
|
|
|
309
327
|
required=True,
|
|
310
328
|
help="the IP of the smart device as it appears in the pcap file.",
|
|
311
329
|
)
|
|
330
|
+
@click.option(
|
|
331
|
+
"--source-host",
|
|
332
|
+
required=True,
|
|
333
|
+
help="the IP of the device communicating with the smart device.",
|
|
334
|
+
)
|
|
312
335
|
@click.option(
|
|
313
336
|
"--username",
|
|
314
337
|
required=True,
|
|
@@ -332,14 +355,14 @@ def main(
|
|
|
332
355
|
required=False,
|
|
333
356
|
help="The name of the output file, relative to the current directory.",
|
|
334
357
|
)
|
|
335
|
-
async def cli(username, password, host, pcap_file_path, output):
|
|
358
|
+
async def cli(username, password, host, source_host, pcap_file_path, output):
|
|
336
359
|
"""Export KLAP data in JSON format from a PCAP file."""
|
|
337
360
|
# pyshark does not work within a running event loop and we don't want to
|
|
338
361
|
# install click as well as asyncclick so run in a new thread.
|
|
339
362
|
loop = asyncio.new_event_loop()
|
|
340
363
|
thread = Thread(
|
|
341
364
|
target=main,
|
|
342
|
-
args=[loop, username, password, host, pcap_file_path, output],
|
|
365
|
+
args=[loop, username, password, host, source_host, pcap_file_path, output],
|
|
343
366
|
daemon=True,
|
|
344
367
|
)
|
|
345
368
|
thread.start()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Module for caching ZoneInfos."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
|
|
7
|
+
from zoneinfo import ZoneInfo
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CachedZoneInfo(ZoneInfo):
|
|
11
|
+
"""Cache ZoneInfo objects."""
|
|
12
|
+
|
|
13
|
+
_cache: dict[str, ZoneInfo] = {}
|
|
14
|
+
|
|
15
|
+
@classmethod
|
|
16
|
+
async def get_cached_zone_info(cls, time_zone_str: str) -> ZoneInfo:
|
|
17
|
+
"""Get a cached zone info object."""
|
|
18
|
+
if cached := cls._cache.get(time_zone_str):
|
|
19
|
+
return cached
|
|
20
|
+
loop = asyncio.get_running_loop()
|
|
21
|
+
zinfo = await loop.run_in_executor(None, _get_zone_info, time_zone_str)
|
|
22
|
+
cls._cache[time_zone_str] = zinfo
|
|
23
|
+
return zinfo
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _get_zone_info(time_zone_str: str) -> ZoneInfo:
|
|
27
|
+
"""Get a time zone object for the given time zone string."""
|
|
28
|
+
return ZoneInfo(time_zone_str)
|
|
@@ -40,7 +40,7 @@ async def state(ctx, dev: Device):
|
|
|
40
40
|
echo(f"Port: {dev.port}")
|
|
41
41
|
echo(f"Device state: {dev.is_on}")
|
|
42
42
|
|
|
43
|
-
echo(f"Time: {dev.time} (tz: {dev.timezone}")
|
|
43
|
+
echo(f"Time: {dev.time} (tz: {dev.timezone})")
|
|
44
44
|
echo(f"Hardware: {dev.hw_info['hw_ver']}")
|
|
45
45
|
echo(f"Software: {dev.hw_info['sw_ver']}")
|
|
46
46
|
echo(f"MAC (rssi): {dev.mac} ({dev.rssi})")
|
|
@@ -99,7 +99,7 @@ async def on(dev: Device, transition: int):
|
|
|
99
99
|
return await dev.turn_on(transition=transition)
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
@
|
|
102
|
+
@device.command
|
|
103
103
|
@click.option("--transition", type=int, required=False)
|
|
104
104
|
@pass_dev_or_child
|
|
105
105
|
async def off(dev: Device, transition: int):
|
|
@@ -166,6 +166,17 @@ async def reboot(plug, delay):
|
|
|
166
166
|
return await plug.reboot(delay)
|
|
167
167
|
|
|
168
168
|
|
|
169
|
+
@device.command()
|
|
170
|
+
@pass_dev
|
|
171
|
+
async def factory_reset(plug):
|
|
172
|
+
"""Reset device to factory settings."""
|
|
173
|
+
click.confirm(
|
|
174
|
+
"Do you really want to reset the device to factory settings?", abort=True
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
return await plug.factory_reset()
|
|
178
|
+
|
|
179
|
+
|
|
169
180
|
@device.command()
|
|
170
181
|
@pass_dev
|
|
171
182
|
@click.option(
|
|
@@ -109,7 +109,7 @@ import logging
|
|
|
109
109
|
from abc import ABC, abstractmethod
|
|
110
110
|
from collections.abc import Mapping, Sequence
|
|
111
111
|
from dataclasses import dataclass
|
|
112
|
-
from datetime import datetime
|
|
112
|
+
from datetime import datetime, tzinfo
|
|
113
113
|
from typing import TYPE_CHECKING, Any
|
|
114
114
|
from warnings import warn
|
|
115
115
|
|
|
@@ -377,7 +377,7 @@ class Device(ABC):
|
|
|
377
377
|
|
|
378
378
|
@property
|
|
379
379
|
@abstractmethod
|
|
380
|
-
def timezone(self) ->
|
|
380
|
+
def timezone(self) -> tzinfo:
|
|
381
381
|
"""Return the timezone and time_difference."""
|
|
382
382
|
|
|
383
383
|
@property
|
|
@@ -435,7 +435,11 @@ class Device(ABC):
|
|
|
435
435
|
@property
|
|
436
436
|
@abstractmethod
|
|
437
437
|
def on_since(self) -> datetime | None:
|
|
438
|
-
"""Return the time that the device was turned on or None if turned off.
|
|
438
|
+
"""Return the time that the device was turned on or None if turned off.
|
|
439
|
+
|
|
440
|
+
This returns a cached value if the device reported value difference is under
|
|
441
|
+
five seconds to avoid device-caused jitter.
|
|
442
|
+
"""
|
|
439
443
|
|
|
440
444
|
@abstractmethod
|
|
441
445
|
async def wifi_scan(self) -> list[WifiNetwork]:
|
|
@@ -449,6 +453,21 @@ class Device(ABC):
|
|
|
449
453
|
async def set_alias(self, alias: str):
|
|
450
454
|
"""Set the device name (alias)."""
|
|
451
455
|
|
|
456
|
+
@abstractmethod
|
|
457
|
+
async def reboot(self, delay: int = 1) -> None:
|
|
458
|
+
"""Reboot the device.
|
|
459
|
+
|
|
460
|
+
Note that giving a delay of zero causes this to block,
|
|
461
|
+
as the device reboots immediately without responding to the call.
|
|
462
|
+
"""
|
|
463
|
+
|
|
464
|
+
@abstractmethod
|
|
465
|
+
async def factory_reset(self) -> None:
|
|
466
|
+
"""Reset device back to factory settings.
|
|
467
|
+
|
|
468
|
+
Note, this does not downgrade the firmware.
|
|
469
|
+
"""
|
|
470
|
+
|
|
452
471
|
def __repr__(self):
|
|
453
472
|
if self._last_update is None:
|
|
454
473
|
return f"<{self.device_type} at {self.host} - update() needed>"
|
|
@@ -85,7 +85,7 @@ TPLINK_KELVIN = {
|
|
|
85
85
|
"KB130": ColorTempRange(2500, 9000),
|
|
86
86
|
"KL130": ColorTempRange(2500, 9000),
|
|
87
87
|
"KL125": ColorTempRange(2500, 6500),
|
|
88
|
-
"KL135": ColorTempRange(2500,
|
|
88
|
+
"KL135": ColorTempRange(2500, 9000),
|
|
89
89
|
r"KL120\(EU\)": ColorTempRange(2700, 6500),
|
|
90
90
|
r"KL120\(US\)": ColorTempRange(2700, 5000),
|
|
91
91
|
r"KL430": ColorTempRange(2500, 9000),
|