python-kasa 0.7.4__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.4 → python_kasa-0.7.5}/CHANGELOG.md +34 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/PKG-INFO +2 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/dump_devinfo.py +2 -2
- {python_kasa-0.7.4 → 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.4 → python_kasa-0.7.5}/kasa/cli/device.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/device.py +7 -3
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/device_factory.py +2 -2
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/discover.py +2 -2
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotdevice.py +18 -10
- {python_kasa-0.7.4 → 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.4 → python_kasa-0.7.5}/kasa/iot/modules/ambientlight.py +3 -3
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/cloud.py +3 -3
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/emeter.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/light.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/lightpreset.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/time.py +16 -5
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/klaptransport.py +0 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/module.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/cloud.py +3 -9
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/color.py +3 -8
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/contactsensor.py +3 -8
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/devicemodule.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/fan.py +4 -10
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/humiditysensor.py +4 -9
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/light.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/lighteffect.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/lightpreset.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/lighttransition.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/reportmode.py +3 -8
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/temperaturesensor.py +7 -10
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/time.py +28 -14
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/waterleaksensor.py +4 -8
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/smartchilddevice.py +1 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/smartdevice.py +23 -11
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/smartmodule.py +3 -3
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/conftest.py +0 -11
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_device.py +35 -3
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_feature.py +10 -4
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_protocol.py +6 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/pyproject.toml +2 -1
- {python_kasa-0.7.4 → python_kasa-0.7.5}/.gitignore +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/LICENSE +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/README.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/README.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/bench/benchmark.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/bench/utils/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/bench/utils/data.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/bench/utils/original.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/create_module_fixtures.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/generate_supported.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/helpers/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/helpers/smartrequests.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/parse_pcap.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/devtools/perftest.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/Makefile +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/make.bat +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/SUPPORTED.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/_static/copybutton.js +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/cli.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/codeinfo.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/conf.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/contribute.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/deprecated.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/connect.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/device.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/discover.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/energy.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/feature.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/light.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/module.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides/strip.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/guides.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/index.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/library.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/reference.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartbulb.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartdevice.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartdimmer.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartlightstrip.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartplug.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/smartstrip.rst +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/topics.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/source/tutorial.md +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/docs/tutorial.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/aestransport.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/__main__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/common.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/discover.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/feature.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/lazygroup.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/light.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/main.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/schedule.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/time.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/usage.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/cli/wifi.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/credentials.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/device_type.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/deviceconfig.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/emeterstatus.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/exceptions.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/feature.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/httpclient.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/energy.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/fan.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/led.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/light.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/lighteffect.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/interfaces/lightpreset.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/effects.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotbulb.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotdimmer.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotlightstrip.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotmodule.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/iotplug.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/antitheft.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/countdown.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/led.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/lighteffect.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/motion.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/rulemodule.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/schedule.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iot/modules/usage.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/iotprotocol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/json.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/modulemapping.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/modulemapping.pyi +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/protocol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/py.typed +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/effects.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/alarm.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/autooff.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/batterysensor.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/brightness.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/childdevice.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/colortemperature.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/energy.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/firmware.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/frostprotection.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/led.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/lightstripeffect.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/motionsensor.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smart/modules/temperaturecontrol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/smartprotocol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/device_fixtures.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/discovery_fixtures.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fakeprotocol_iot.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fakeprotocol_smart.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtureinfo.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T100(EU)_1.0_1.12.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.9.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/features/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/features/test_brightness.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/features/test_colortemp.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_autooff.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_contact.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_fan.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_firmware.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_humidity.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_light_effect.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_motionsensor.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_temperature.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/smart/modules/test_waterleak.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_aestransport.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_bulb.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_childdevice.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_cli.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_common_modules.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_device_factory.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_device_type.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_deviceconfig.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_dimmer.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_discovery.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_emeter.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_httpclient.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_iotdevice.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_klapprotocol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_lightstrip.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_plug.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_readme_examples.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_smartdevice.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_smartprotocol.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_strip.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/tests/test_usage.py +0 -0
- {python_kasa-0.7.4 → python_kasa-0.7.5}/kasa/xortransport.py +0 -0
|
@@ -1,5 +1,35 @@
|
|
|
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
|
+
|
|
3
33
|
## [0.7.4](https://github.com/python-kasa/python-kasa/tree/0.7.4) (2024-09-27)
|
|
4
34
|
|
|
5
35
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.3...0.7.4)
|
|
@@ -447,6 +477,10 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
447
477
|
- Fix dump\_devinfo scrubbing for ks240 [\#765](https://github.com/python-kasa/python-kasa/pull/765) (@rytilahti)
|
|
448
478
|
- Rename and deprecate exception classes [\#739](https://github.com/python-kasa/python-kasa/pull/739) (@sdb9696)
|
|
449
479
|
|
|
480
|
+
**Closed issues:**
|
|
481
|
+
|
|
482
|
+
- Improve timezone support [\#980](https://github.com/python-kasa/python-kasa/issues/980)
|
|
483
|
+
|
|
450
484
|
## [0.6.2.1](https://github.com/python-kasa/python-kasa/tree/0.6.2.1) (2024-02-02)
|
|
451
485
|
|
|
452
486
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.6.2...0.6.2.1)
|
|
@@ -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})")
|
|
@@ -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]:
|
|
@@ -18,7 +18,7 @@ import functools
|
|
|
18
18
|
import inspect
|
|
19
19
|
import logging
|
|
20
20
|
from collections.abc import Mapping, Sequence
|
|
21
|
-
from datetime import datetime, timedelta,
|
|
21
|
+
from datetime import datetime, timedelta, tzinfo
|
|
22
22
|
from typing import TYPE_CHECKING, Any, cast
|
|
23
23
|
|
|
24
24
|
from ..device import Device, WifiNetwork
|
|
@@ -181,6 +181,7 @@ class IotDevice(Device):
|
|
|
181
181
|
self._legacy_features: set[str] = set()
|
|
182
182
|
self._children: Mapping[str, IotDevice] = {}
|
|
183
183
|
self._modules: dict[str | ModuleName[Module], IotModule] = {}
|
|
184
|
+
self._on_since: datetime | None = None
|
|
184
185
|
|
|
185
186
|
@property
|
|
186
187
|
def children(self) -> Sequence[IotDevice]:
|
|
@@ -207,6 +208,8 @@ class IotDevice(Device):
|
|
|
207
208
|
def _create_request(
|
|
208
209
|
self, target: str, cmd: str, arg: dict | None = None, child_ids=None
|
|
209
210
|
):
|
|
211
|
+
if arg is None:
|
|
212
|
+
arg = {}
|
|
210
213
|
request: dict[str, Any] = {target: {cmd: arg}}
|
|
211
214
|
if child_ids is not None:
|
|
212
215
|
request = {"context": {"child_ids": child_ids}, target: {cmd: arg}}
|
|
@@ -296,7 +299,7 @@ class IotDevice(Device):
|
|
|
296
299
|
|
|
297
300
|
self._set_sys_info(self._last_update["system"]["get_sysinfo"])
|
|
298
301
|
for module in self._modules.values():
|
|
299
|
-
module._post_update_hook()
|
|
302
|
+
await module._post_update_hook()
|
|
300
303
|
|
|
301
304
|
if not self._features:
|
|
302
305
|
await self._initialize_features()
|
|
@@ -461,7 +464,7 @@ class IotDevice(Device):
|
|
|
461
464
|
|
|
462
465
|
@property
|
|
463
466
|
@requires_update
|
|
464
|
-
def timezone(self) ->
|
|
467
|
+
def timezone(self) -> tzinfo:
|
|
465
468
|
"""Return the current timezone."""
|
|
466
469
|
return self.modules[Module.IotTime].timezone
|
|
467
470
|
|
|
@@ -592,18 +595,23 @@ class IotDevice(Device):
|
|
|
592
595
|
@property # type: ignore
|
|
593
596
|
@requires_update
|
|
594
597
|
def on_since(self) -> datetime | None:
|
|
595
|
-
"""Return
|
|
596
|
-
if "on_time" not in self._sys_info:
|
|
597
|
-
return None
|
|
598
|
+
"""Return the time that the device was turned on or None if turned off.
|
|
598
599
|
|
|
599
|
-
if
|
|
600
|
+
This returns a cached value if the device reported value difference is under
|
|
601
|
+
five seconds to avoid device-caused jitter.
|
|
602
|
+
"""
|
|
603
|
+
if self.is_off or "on_time" not in self._sys_info:
|
|
604
|
+
self._on_since = None
|
|
600
605
|
return None
|
|
601
606
|
|
|
602
607
|
on_time = self._sys_info["on_time"]
|
|
603
608
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
609
|
+
on_since = self.time - timedelta(seconds=on_time)
|
|
610
|
+
if not self._on_since or timedelta(
|
|
611
|
+
seconds=0
|
|
612
|
+
) < on_since - self._on_since > timedelta(seconds=5):
|
|
613
|
+
self._on_since = on_since
|
|
614
|
+
return self._on_since
|
|
607
615
|
|
|
608
616
|
@property # type: ignore
|
|
609
617
|
@requires_update
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
from collections import defaultdict
|
|
7
|
-
from datetime import datetime, timedelta
|
|
7
|
+
from datetime import datetime, timedelta
|
|
8
8
|
from typing import Any
|
|
9
9
|
|
|
10
10
|
from ..device_type import DeviceType
|
|
@@ -318,6 +318,7 @@ class IotStripPlug(IotPlug):
|
|
|
318
318
|
self._set_sys_info(parent.sys_info)
|
|
319
319
|
self._device_type = DeviceType.StripSocket
|
|
320
320
|
self.protocol = parent.protocol # Must use the same connection as the parent
|
|
321
|
+
self._on_since: datetime | None = None
|
|
321
322
|
|
|
322
323
|
async def _initialize_modules(self):
|
|
323
324
|
"""Initialize modules not added in init."""
|
|
@@ -372,7 +373,7 @@ class IotStripPlug(IotPlug):
|
|
|
372
373
|
"""
|
|
373
374
|
await self._modular_update({})
|
|
374
375
|
for module in self._modules.values():
|
|
375
|
-
module._post_update_hook()
|
|
376
|
+
await module._post_update_hook()
|
|
376
377
|
|
|
377
378
|
if not self._features:
|
|
378
379
|
await self._initialize_features()
|
|
@@ -438,14 +439,20 @@ class IotStripPlug(IotPlug):
|
|
|
438
439
|
def on_since(self) -> datetime | None:
|
|
439
440
|
"""Return on-time, if available."""
|
|
440
441
|
if self.is_off:
|
|
442
|
+
self._on_since = None
|
|
441
443
|
return None
|
|
442
444
|
|
|
443
445
|
info = self._get_child_info()
|
|
444
446
|
on_time = info["on_time"]
|
|
445
447
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
448
|
+
time = self._parent.time
|
|
449
|
+
|
|
450
|
+
on_since = time - timedelta(seconds=on_time)
|
|
451
|
+
if not self._on_since or timedelta(
|
|
452
|
+
seconds=0
|
|
453
|
+
) < on_since - self._on_since > timedelta(seconds=5):
|
|
454
|
+
self._on_since = on_since
|
|
455
|
+
return self._on_since
|
|
449
456
|
|
|
450
457
|
@property # type: ignore
|
|
451
458
|
@requires_update
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"""Module for io device timezone lookups."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
from datetime import datetime, tzinfo
|
|
7
|
+
|
|
8
|
+
from ..cachedzoneinfo import CachedZoneInfo
|
|
9
|
+
|
|
10
|
+
_LOGGER = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
async def get_timezone(index: int) -> tzinfo:
|
|
14
|
+
"""Get the timezone from the index."""
|
|
15
|
+
if index > 109:
|
|
16
|
+
_LOGGER.error(
|
|
17
|
+
"Unexpected index %s not configured as a timezone, defaulting to UTC", index
|
|
18
|
+
)
|
|
19
|
+
return await CachedZoneInfo.get_cached_zone_info("Etc/UTC")
|
|
20
|
+
|
|
21
|
+
name = TIMEZONE_INDEX[index]
|
|
22
|
+
return await CachedZoneInfo.get_cached_zone_info(name)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
async def get_timezone_index(name: str) -> int:
|
|
26
|
+
"""Return the iot firmware index for a valid IANA timezone key."""
|
|
27
|
+
rev = {val: key for key, val in TIMEZONE_INDEX.items()}
|
|
28
|
+
if name in rev:
|
|
29
|
+
return rev[name]
|
|
30
|
+
|
|
31
|
+
# Try to find a supported timezone matching dst true/false
|
|
32
|
+
zone = await CachedZoneInfo.get_cached_zone_info(name)
|
|
33
|
+
now = datetime.now()
|
|
34
|
+
winter = datetime(now.year, 1, 1, 12)
|
|
35
|
+
summer = datetime(now.year, 7, 1, 12)
|
|
36
|
+
for i in range(110):
|
|
37
|
+
configured_zone = await get_timezone(i)
|
|
38
|
+
if zone.utcoffset(winter) == configured_zone.utcoffset(
|
|
39
|
+
winter
|
|
40
|
+
) and zone.utcoffset(summer) == configured_zone.utcoffset(summer):
|
|
41
|
+
return i
|
|
42
|
+
raise ValueError("Device does not support timezone %s", name)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
TIMEZONE_INDEX = {
|
|
46
|
+
0: "Etc/GMT+12",
|
|
47
|
+
1: "Pacific/Samoa",
|
|
48
|
+
2: "US/Hawaii",
|
|
49
|
+
3: "US/Alaska",
|
|
50
|
+
4: "Mexico/BajaNorte",
|
|
51
|
+
5: "Etc/GMT+8",
|
|
52
|
+
6: "PST8PDT",
|
|
53
|
+
7: "US/Arizona",
|
|
54
|
+
8: "America/Mazatlan",
|
|
55
|
+
9: "MST",
|
|
56
|
+
10: "MST7MDT",
|
|
57
|
+
11: "Mexico/General",
|
|
58
|
+
12: "Etc/GMT+6",
|
|
59
|
+
13: "CST6CDT",
|
|
60
|
+
14: "America/Monterrey",
|
|
61
|
+
15: "Canada/Saskatchewan",
|
|
62
|
+
16: "America/Bogota",
|
|
63
|
+
17: "Etc/GMT+5",
|
|
64
|
+
18: "EST",
|
|
65
|
+
19: "America/Indiana/Indianapolis",
|
|
66
|
+
20: "America/Caracas",
|
|
67
|
+
21: "America/Asuncion",
|
|
68
|
+
22: "Etc/GMT+4",
|
|
69
|
+
23: "Canada/Atlantic",
|
|
70
|
+
24: "America/Cuiaba",
|
|
71
|
+
25: "Brazil/West",
|
|
72
|
+
26: "America/Santiago",
|
|
73
|
+
27: "Canada/Newfoundland",
|
|
74
|
+
28: "America/Sao_Paulo",
|
|
75
|
+
29: "America/Argentina/Buenos_Aires",
|
|
76
|
+
30: "America/Cayenne",
|
|
77
|
+
31: "America/Miquelon",
|
|
78
|
+
32: "America/Montevideo",
|
|
79
|
+
33: "Chile/Continental",
|
|
80
|
+
34: "Etc/GMT+2",
|
|
81
|
+
35: "Atlantic/Azores",
|
|
82
|
+
36: "Atlantic/Cape_Verde",
|
|
83
|
+
37: "Africa/Casablanca",
|
|
84
|
+
38: "UCT",
|
|
85
|
+
39: "GB",
|
|
86
|
+
40: "Africa/Monrovia",
|
|
87
|
+
41: "Europe/Amsterdam",
|
|
88
|
+
42: "Europe/Belgrade",
|
|
89
|
+
43: "Europe/Brussels",
|
|
90
|
+
44: "Europe/Sarajevo",
|
|
91
|
+
45: "Africa/Lagos",
|
|
92
|
+
46: "Africa/Windhoek",
|
|
93
|
+
47: "Asia/Amman",
|
|
94
|
+
48: "Europe/Athens",
|
|
95
|
+
49: "Asia/Beirut",
|
|
96
|
+
50: "Africa/Cairo",
|
|
97
|
+
51: "Asia/Damascus",
|
|
98
|
+
52: "EET",
|
|
99
|
+
53: "Africa/Harare",
|
|
100
|
+
54: "Europe/Helsinki",
|
|
101
|
+
55: "Asia/Istanbul",
|
|
102
|
+
56: "Asia/Jerusalem",
|
|
103
|
+
57: "Europe/Kaliningrad",
|
|
104
|
+
58: "Africa/Tripoli",
|
|
105
|
+
59: "Asia/Baghdad",
|
|
106
|
+
60: "Asia/Kuwait",
|
|
107
|
+
61: "Europe/Minsk",
|
|
108
|
+
62: "Europe/Moscow",
|
|
109
|
+
63: "Africa/Nairobi",
|
|
110
|
+
64: "Asia/Tehran",
|
|
111
|
+
65: "Asia/Muscat",
|
|
112
|
+
66: "Asia/Baku",
|
|
113
|
+
67: "Europe/Samara",
|
|
114
|
+
68: "Indian/Mauritius",
|
|
115
|
+
69: "Asia/Tbilisi",
|
|
116
|
+
70: "Asia/Yerevan",
|
|
117
|
+
71: "Asia/Kabul",
|
|
118
|
+
72: "Asia/Ashgabat",
|
|
119
|
+
73: "Asia/Yekaterinburg",
|
|
120
|
+
74: "Asia/Karachi",
|
|
121
|
+
75: "Asia/Kolkata",
|
|
122
|
+
76: "Asia/Colombo",
|
|
123
|
+
77: "Asia/Kathmandu",
|
|
124
|
+
78: "Asia/Almaty",
|
|
125
|
+
79: "Asia/Dhaka",
|
|
126
|
+
80: "Asia/Novosibirsk",
|
|
127
|
+
81: "Asia/Rangoon",
|
|
128
|
+
82: "Asia/Bangkok",
|
|
129
|
+
83: "Asia/Krasnoyarsk",
|
|
130
|
+
84: "Asia/Chongqing",
|
|
131
|
+
85: "Asia/Irkutsk",
|
|
132
|
+
86: "Asia/Singapore",
|
|
133
|
+
87: "Australia/Perth",
|
|
134
|
+
88: "Asia/Taipei",
|
|
135
|
+
89: "Asia/Ulaanbaatar",
|
|
136
|
+
90: "Asia/Tokyo",
|
|
137
|
+
91: "Asia/Seoul",
|
|
138
|
+
92: "Asia/Yakutsk",
|
|
139
|
+
93: "Australia/Adelaide",
|
|
140
|
+
94: "Australia/Darwin",
|
|
141
|
+
95: "Australia/Brisbane",
|
|
142
|
+
96: "Australia/Canberra",
|
|
143
|
+
97: "Pacific/Guam",
|
|
144
|
+
98: "Australia/Hobart",
|
|
145
|
+
99: "Antarctica/DumontDUrville",
|
|
146
|
+
100: "Asia/Magadan",
|
|
147
|
+
101: "Asia/Srednekolymsk",
|
|
148
|
+
102: "Etc/GMT-11",
|
|
149
|
+
103: "Asia/Anadyr",
|
|
150
|
+
104: "Pacific/Auckland",
|
|
151
|
+
105: "Etc/GMT-12",
|
|
152
|
+
106: "Pacific/Fiji",
|
|
153
|
+
107: "Etc/GMT-13",
|
|
154
|
+
108: "Pacific/Apia",
|
|
155
|
+
109: "Etc/GMT-14",
|
|
156
|
+
}
|
|
@@ -16,11 +16,11 @@ from ..iotmodule import IotModule, merge
|
|
|
16
16
|
class AmbientLight(IotModule):
|
|
17
17
|
"""Implements ambient light controls for the motion sensor."""
|
|
18
18
|
|
|
19
|
-
def
|
|
20
|
-
|
|
19
|
+
def _initialize_features(self):
|
|
20
|
+
"""Initialize features after the initial update."""
|
|
21
21
|
self._add_feature(
|
|
22
22
|
Feature(
|
|
23
|
-
device=
|
|
23
|
+
device=self._device,
|
|
24
24
|
container=self,
|
|
25
25
|
id="ambient_light",
|
|
26
26
|
name="Ambient Light",
|
|
@@ -24,11 +24,11 @@ class CloudInfo(BaseModel):
|
|
|
24
24
|
class Cloud(IotModule):
|
|
25
25
|
"""Module implementing support for cloud services."""
|
|
26
26
|
|
|
27
|
-
def
|
|
28
|
-
|
|
27
|
+
def _initialize_features(self):
|
|
28
|
+
"""Initialize features after the initial update."""
|
|
29
29
|
self._add_feature(
|
|
30
30
|
Feature(
|
|
31
|
-
device=
|
|
31
|
+
device=self._device,
|
|
32
32
|
container=self,
|
|
33
33
|
id="cloud_connection",
|
|
34
34
|
name="Cloud connection",
|
|
@@ -12,7 +12,7 @@ from .usage import Usage
|
|
|
12
12
|
class Emeter(Usage, EnergyInterface):
|
|
13
13
|
"""Emeter module."""
|
|
14
14
|
|
|
15
|
-
def _post_update_hook(self) -> None:
|
|
15
|
+
async def _post_update_hook(self) -> None:
|
|
16
16
|
self._supported = EnergyInterface.ModuleFeature.PERIODIC_STATS
|
|
17
17
|
if (
|
|
18
18
|
"voltage_mv" in self.data["get_realtime"]
|
|
@@ -239,7 +239,7 @@ class Light(IotModule, LightInterface):
|
|
|
239
239
|
"""Return the current light state."""
|
|
240
240
|
return self._light_state
|
|
241
241
|
|
|
242
|
-
def _post_update_hook(self) -> None:
|
|
242
|
+
async def _post_update_hook(self) -> None:
|
|
243
243
|
if self._device.is_on is False:
|
|
244
244
|
state = LightState(light_on=False)
|
|
245
245
|
else:
|
|
@@ -41,7 +41,7 @@ class LightPreset(IotModule, LightPresetInterface):
|
|
|
41
41
|
_presets: dict[str, IotLightPreset]
|
|
42
42
|
_preset_list: list[str]
|
|
43
43
|
|
|
44
|
-
def _post_update_hook(self):
|
|
44
|
+
async def _post_update_hook(self):
|
|
45
45
|
"""Update the internal presets."""
|
|
46
46
|
self._presets = {
|
|
47
47
|
f"Light preset {index+1}": IotLightPreset(**vals)
|