python-kasa 0.7.0.1__tar.gz → 0.7.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/CHANGELOG.md +33 -15
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/PKG-INFO +1 -1
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/aestransport.py +7 -2
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/device.py +5 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/exceptions.py +10 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/feature.py +3 -1
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotstrip.py +9 -5
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/module.py +3 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/effects.py +25 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/__init__.py +2 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/brightness.py +14 -1
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/lighteffect.py +70 -6
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/lightstripeffect.py +38 -8
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/lighttransition.py +100 -52
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smartprotocol.py +42 -6
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/device_fixtures.py +8 -2
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/discovery_fixtures.py +3 -1
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fakeprotocol_smart.py +71 -2
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtureinfo.py +21 -3
- python_kasa-0.7.0.2/kasa/tests/smart/modules/test_light_effect.py +83 -0
- python_kasa-0.7.0.2/kasa/tests/smart/modules/test_light_strip_effect.py +101 -0
- python_kasa-0.7.0.2/kasa/tests/smart/modules/test_lighttransition.py +80 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_aestransport.py +27 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_childdevice.py +21 -1
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_common_modules.py +9 -5
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_device_factory.py +35 -17
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_smartprotocol.py +109 -7
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/pyproject.toml +1 -1
- python_kasa-0.7.0.1/kasa/tests/smart/modules/test_light_effect.py +0 -41
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/LICENSE +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/README.md +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/cli.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/credentials.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/device_factory.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/device_type.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/deviceconfig.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/discover.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/emeterstatus.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/httpclient.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/energy.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/fan.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/led.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/light.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/lighteffect.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/interfaces/lightpreset.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/effects.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotbulb.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotdevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotdimmer.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotlightstrip.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotmodule.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/iotplug.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/ambientlight.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/antitheft.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/cloud.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/countdown.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/emeter.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/led.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/light.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/lighteffect.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/lightpreset.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/motion.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/rulemodule.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/schedule.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/time.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iot/modules/usage.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/iotprotocol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/json.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/klaptransport.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/modulemapping.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/modulemapping.pyi +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/protocol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/py.typed +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/alarm.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/autooff.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/batterysensor.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/childdevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/cloud.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/color.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/colortemperature.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/contactsensor.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/devicemodule.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/energy.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/fan.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/firmware.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/frostprotection.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/humiditysensor.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/led.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/light.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/lightpreset.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/reportmode.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/temperaturecontrol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/temperaturesensor.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/time.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/modules/waterleaksensor.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/smartchilddevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/smartdevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/smart/smartmodule.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/conftest.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fakeprotocol_iot.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/features/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/features/test_brightness.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/features/test_colortemp.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/__init__.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_autooff.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_contact.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_fan.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_firmware.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_humidity.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_temperature.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/smart/modules/test_waterleak.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_bulb.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_cli.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_device.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_device_type.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_deviceconfig.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_dimmer.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_discovery.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_emeter.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_feature.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_httpclient.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_iotdevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_klapprotocol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_lightstrip.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_plug.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_protocol.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_readme_examples.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_smartdevice.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_strip.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/tests/test_usage.py +0 -0
- {python_kasa-0.7.0.1 → python_kasa-0.7.0.2}/kasa/xortransport.py +0 -0
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.0.2](https://github.com/python-kasa/python-kasa/tree/0.7.0.2) (2024-07-01)
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0.1...0.7.0.2)
|
|
5
6
|
|
|
6
7
|
This patch release fixes some minor issues found out during testing against all new homeassistant platforms.
|
|
7
8
|
|
|
9
|
+
**Fixed bugs:**
|
|
10
|
+
|
|
11
|
+
- Disable multi-request on unknown errors [\#1027](https://github.com/python-kasa/python-kasa/pull/1027) (@sdb9696)
|
|
12
|
+
- Disable multi requests on json decode error during multi-request [\#1025](https://github.com/python-kasa/python-kasa/pull/1025) (@sdb9696)
|
|
13
|
+
- Fix changing brightness when effect is active [\#1019](https://github.com/python-kasa/python-kasa/pull/1019) (@rytilahti)
|
|
14
|
+
- Update light transition module to work with child devices [\#1017](https://github.com/python-kasa/python-kasa/pull/1017) (@sdb9696)
|
|
15
|
+
- Handle unknown error codes gracefully [\#1016](https://github.com/python-kasa/python-kasa/pull/1016) (@rytilahti)
|
|
16
|
+
|
|
17
|
+
**Project maintenance:**
|
|
18
|
+
|
|
19
|
+
- Make parent attribute on device consistent across iot and smart [\#1023](https://github.com/python-kasa/python-kasa/pull/1023) (@sdb9696)
|
|
20
|
+
- Cache SmartErrorCode creation [\#1022](https://github.com/python-kasa/python-kasa/pull/1022) (@bdraco)
|
|
21
|
+
|
|
22
|
+
## [0.7.0.1](https://github.com/python-kasa/python-kasa/tree/0.7.0.1) (2024-06-25)
|
|
23
|
+
|
|
8
24
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.0...0.7.0.1)
|
|
9
25
|
|
|
26
|
+
This patch release fixes some minor issues found out during testing against all new homeassistant platforms.
|
|
27
|
+
|
|
10
28
|
**Fixed bugs:**
|
|
11
29
|
|
|
12
30
|
- Disable lighttransition module on child devices [\#1013](https://github.com/python-kasa/python-kasa/pull/1013) (@sdb9696)
|
|
@@ -54,24 +72,19 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
54
72
|
**Implemented enhancements:**
|
|
55
73
|
|
|
56
74
|
- Cleanup cli output [\#1000](https://github.com/python-kasa/python-kasa/pull/1000) (@rytilahti)
|
|
57
|
-
- Improve autooff name and unit [\#997](https://github.com/python-kasa/python-kasa/pull/997) (@rytilahti)
|
|
58
75
|
- Update mode, time, rssi and report\_interval feature names/units [\#995](https://github.com/python-kasa/python-kasa/pull/995) (@sdb9696)
|
|
59
|
-
- Add unit\_getter for feature [\#993](https://github.com/python-kasa/python-kasa/pull/993) (@rytilahti)
|
|
60
76
|
- Add timezone to on\_since attributes [\#978](https://github.com/python-kasa/python-kasa/pull/978) (@sdb9696)
|
|
61
77
|
- Add type hints to feature set\_value [\#974](https://github.com/python-kasa/python-kasa/pull/974) (@sdb9696)
|
|
62
78
|
- Handle unknown light effect names and only calculate effect list once [\#973](https://github.com/python-kasa/python-kasa/pull/973) (@sdb9696)
|
|
63
79
|
- Support smart child modules queries [\#967](https://github.com/python-kasa/python-kasa/pull/967) (@sdb9696)
|
|
64
80
|
- Do not expose child modules on parent devices [\#964](https://github.com/python-kasa/python-kasa/pull/964) (@sdb9696)
|
|
65
81
|
- Do not add parent only modules to strip sockets [\#963](https://github.com/python-kasa/python-kasa/pull/963) (@sdb9696)
|
|
66
|
-
- Add time sync command [\#951](https://github.com/python-kasa/python-kasa/pull/951) (@rytilahti)
|
|
67
82
|
- Make device initialisation easier by reducing required imports [\#936](https://github.com/python-kasa/python-kasa/pull/936) (@sdb9696)
|
|
68
83
|
- Fix set\_state for common light modules [\#929](https://github.com/python-kasa/python-kasa/pull/929) (@sdb9696)
|
|
69
84
|
- Add state feature for iot devices [\#924](https://github.com/python-kasa/python-kasa/pull/924) (@rytilahti)
|
|
70
85
|
- Add post update hook to module and use in smart LightEffect [\#921](https://github.com/python-kasa/python-kasa/pull/921) (@sdb9696)
|
|
71
86
|
- Add LightEffect module for smart light strips [\#918](https://github.com/python-kasa/python-kasa/pull/918) (@sdb9696)
|
|
72
|
-
- Add light presets common module to devices. [\#907](https://github.com/python-kasa/python-kasa/pull/907) (@sdb9696)
|
|
73
87
|
- Improve categorization of features [\#904](https://github.com/python-kasa/python-kasa/pull/904) (@rytilahti)
|
|
74
|
-
- Create common interfaces for remaining device types [\#895](https://github.com/python-kasa/python-kasa/pull/895) (@sdb9696)
|
|
75
88
|
- Make get\_module return typed module [\#892](https://github.com/python-kasa/python-kasa/pull/892) (@sdb9696)
|
|
76
89
|
- Add LightEffectModule for dynamic light effects on SMART bulbs [\#887](https://github.com/python-kasa/python-kasa/pull/887) (@sdb9696)
|
|
77
90
|
- Implement choice feature type [\#880](https://github.com/python-kasa/python-kasa/pull/880) (@rytilahti)
|
|
@@ -100,6 +113,11 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
100
113
|
- Add --child option to feature command [\#789](https://github.com/python-kasa/python-kasa/pull/789) (@rytilahti)
|
|
101
114
|
- Add temperature\_unit feature to t315 [\#788](https://github.com/python-kasa/python-kasa/pull/788) (@rytilahti)
|
|
102
115
|
- Add feature for ambient light sensor [\#787](https://github.com/python-kasa/python-kasa/pull/787) (@shifty35)
|
|
116
|
+
- Improve autooff name and unit [\#997](https://github.com/python-kasa/python-kasa/pull/997) (@rytilahti)
|
|
117
|
+
- Add unit\_getter for feature [\#993](https://github.com/python-kasa/python-kasa/pull/993) (@rytilahti)
|
|
118
|
+
- Add time sync command [\#951](https://github.com/python-kasa/python-kasa/pull/951) (@rytilahti)
|
|
119
|
+
- Add light presets common module to devices. [\#907](https://github.com/python-kasa/python-kasa/pull/907) (@sdb9696)
|
|
120
|
+
- Create common interfaces for remaining device types [\#895](https://github.com/python-kasa/python-kasa/pull/895) (@sdb9696)
|
|
103
121
|
- Add initial support for H100 and T315 [\#776](https://github.com/python-kasa/python-kasa/pull/776) (@rytilahti)
|
|
104
122
|
- Generalize smartdevice child support [\#775](https://github.com/python-kasa/python-kasa/pull/775) (@rytilahti)
|
|
105
123
|
- Raise CLI errors in debug mode [\#771](https://github.com/python-kasa/python-kasa/pull/771) (@sdb9696)
|
|
@@ -117,18 +135,13 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
117
135
|
|
|
118
136
|
- Fix smart led status to report rule status [\#1002](https://github.com/python-kasa/python-kasa/pull/1002) (@sdb9696)
|
|
119
137
|
- Demote device\_time back to debug [\#1001](https://github.com/python-kasa/python-kasa/pull/1001) (@rytilahti)
|
|
120
|
-
- Fix to call update when only --device-family passed to cli [\#987](https://github.com/python-kasa/python-kasa/pull/987) (@sdb9696)
|
|
121
|
-
- Disallow non-targeted device commands [\#982](https://github.com/python-kasa/python-kasa/pull/982) (@rytilahti)
|
|
122
138
|
- Add supported check to light transition module [\#971](https://github.com/python-kasa/python-kasa/pull/971) (@sdb9696)
|
|
123
139
|
- Fix switching off light effects for iot lights strips [\#961](https://github.com/python-kasa/python-kasa/pull/961) (@sdb9696)
|
|
124
140
|
- Add state features to iot strip sockets [\#960](https://github.com/python-kasa/python-kasa/pull/960) (@sdb9696)
|
|
125
141
|
- Ensure http delay logic works during default login attempt [\#959](https://github.com/python-kasa/python-kasa/pull/959) (@sdb9696)
|
|
126
142
|
- Fix fan speed level when off and derive smart fan module from common fan interface [\#957](https://github.com/python-kasa/python-kasa/pull/957) (@sdb9696)
|
|
127
|
-
- Require update in cli for wifi commands [\#956](https://github.com/python-kasa/python-kasa/pull/956) (@rytilahti)
|
|
128
|
-
- Do not raise on multi-request errors on child devices [\#949](https://github.com/python-kasa/python-kasa/pull/949) (@rytilahti)
|
|
129
143
|
- Do not show a zero error code when cli exits from showing help [\#935](https://github.com/python-kasa/python-kasa/pull/935) (@rytilahti)
|
|
130
144
|
- Initialize autooff features only when data is available [\#933](https://github.com/python-kasa/python-kasa/pull/933) (@rytilahti)
|
|
131
|
-
- Fix P100 errors on multi-requests [\#930](https://github.com/python-kasa/python-kasa/pull/930) (@sdb9696)
|
|
132
145
|
- Fix potential infinite loop if incomplete lists returned [\#920](https://github.com/python-kasa/python-kasa/pull/920) (@sdb9696)
|
|
133
146
|
- Add 'battery\_percentage' only when it's available [\#906](https://github.com/python-kasa/python-kasa/pull/906) (@rytilahti)
|
|
134
147
|
- Add missing alarm volume 'normal' [\#899](https://github.com/python-kasa/python-kasa/pull/899) (@rytilahti)
|
|
@@ -140,6 +153,11 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
140
153
|
- smartbulb: Limit brightness range to 1-100 [\#829](https://github.com/python-kasa/python-kasa/pull/829) (@rytilahti)
|
|
141
154
|
- Fix energy module calling get\_current\_power [\#798](https://github.com/python-kasa/python-kasa/pull/798) (@sdb9696)
|
|
142
155
|
- Fix auto update switch [\#786](https://github.com/python-kasa/python-kasa/pull/786) (@rytilahti)
|
|
156
|
+
- Fix to call update when only --device-family passed to cli [\#987](https://github.com/python-kasa/python-kasa/pull/987) (@sdb9696)
|
|
157
|
+
- Disallow non-targeted device commands [\#982](https://github.com/python-kasa/python-kasa/pull/982) (@rytilahti)
|
|
158
|
+
- Require update in cli for wifi commands [\#956](https://github.com/python-kasa/python-kasa/pull/956) (@rytilahti)
|
|
159
|
+
- Do not raise on multi-request errors on child devices [\#949](https://github.com/python-kasa/python-kasa/pull/949) (@rytilahti)
|
|
160
|
+
- Fix P100 errors on multi-requests [\#930](https://github.com/python-kasa/python-kasa/pull/930) (@sdb9696)
|
|
143
161
|
- Retry query on 403 after successful handshake [\#785](https://github.com/python-kasa/python-kasa/pull/785) (@sdb9696)
|
|
144
162
|
- Ensure connections are closed when cli is finished [\#752](https://github.com/python-kasa/python-kasa/pull/752) (@sdb9696)
|
|
145
163
|
- Fix for P100 on fw 1.1.3 login\_version none [\#751](https://github.com/python-kasa/python-kasa/pull/751) (@sdb9696)
|
|
@@ -172,19 +190,18 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
172
190
|
|
|
173
191
|
- Cleanup README to use the new cli format [\#999](https://github.com/python-kasa/python-kasa/pull/999) (@rytilahti)
|
|
174
192
|
- Add 0.7 api changes section to docs [\#996](https://github.com/python-kasa/python-kasa/pull/996) (@sdb9696)
|
|
175
|
-
- Update README to be more approachable for new users [\#994](https://github.com/python-kasa/python-kasa/pull/994) (@rytilahti)
|
|
176
193
|
- Update docs with more howto examples [\#968](https://github.com/python-kasa/python-kasa/pull/968) (@sdb9696)
|
|
177
194
|
- Update documentation structure and start migrating to markdown [\#934](https://github.com/python-kasa/python-kasa/pull/934) (@sdb9696)
|
|
178
195
|
- Add tutorial doctest module and enable top level await [\#919](https://github.com/python-kasa/python-kasa/pull/919) (@sdb9696)
|
|
179
196
|
- Add warning about tapo watchdog [\#902](https://github.com/python-kasa/python-kasa/pull/902) (@rytilahti)
|
|
180
197
|
- Move contribution instructions into docs [\#901](https://github.com/python-kasa/python-kasa/pull/901) (@rytilahti)
|
|
181
198
|
- Add rust tapo link to README [\#857](https://github.com/python-kasa/python-kasa/pull/857) (@rytilahti)
|
|
199
|
+
- Update README to be more approachable for new users [\#994](https://github.com/python-kasa/python-kasa/pull/994) (@rytilahti)
|
|
182
200
|
- Enable shell extra for installing ptpython and rich [\#782](https://github.com/python-kasa/python-kasa/pull/782) (@sdb9696)
|
|
183
201
|
- Add WallSwitch device type and autogenerate supported devices docs [\#758](https://github.com/python-kasa/python-kasa/pull/758) (@sdb9696)
|
|
184
202
|
|
|
185
203
|
**Project maintenance:**
|
|
186
204
|
|
|
187
|
-
- Drop python3.8 support [\#992](https://github.com/python-kasa/python-kasa/pull/992) (@rytilahti)
|
|
188
205
|
- Remove anyio dependency from pyproject.toml [\#990](https://github.com/python-kasa/python-kasa/pull/990) (@sdb9696)
|
|
189
206
|
- Configure mypy to run in virtual environment and fix resulting issues [\#989](https://github.com/python-kasa/python-kasa/pull/989) (@sdb9696)
|
|
190
207
|
- Better checking of child modules not supported by parent device [\#966](https://github.com/python-kasa/python-kasa/pull/966) (@sdb9696)
|
|
@@ -194,7 +211,6 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
194
211
|
- Deprecate device level light, effect and led attributes [\#916](https://github.com/python-kasa/python-kasa/pull/916) (@sdb9696)
|
|
195
212
|
- Update cli to use common modules and remove iot specific cli testing [\#913](https://github.com/python-kasa/python-kasa/pull/913) (@sdb9696)
|
|
196
213
|
- Deprecate is\_something attributes [\#912](https://github.com/python-kasa/python-kasa/pull/912) (@sdb9696)
|
|
197
|
-
- Make Light and Fan a common module interface [\#911](https://github.com/python-kasa/python-kasa/pull/911) (@sdb9696)
|
|
198
214
|
- Rename bulb interface to light and move fan and light interface to interfaces [\#910](https://github.com/python-kasa/python-kasa/pull/910) (@sdb9696)
|
|
199
215
|
- Make module names consistent and remove redundant module casting [\#909](https://github.com/python-kasa/python-kasa/pull/909) (@sdb9696)
|
|
200
216
|
- Add child devices from hubs to generated list of supported devices [\#898](https://github.com/python-kasa/python-kasa/pull/898) (@sdb9696)
|
|
@@ -229,10 +245,12 @@ For more information on the changes please checkout our [documentation on the AP
|
|
|
229
245
|
- Do not fail fast on pypy CI jobs [\#799](https://github.com/python-kasa/python-kasa/pull/799) (@sdb9696)
|
|
230
246
|
- Update dump\_devinfo to collect child device info [\#796](https://github.com/python-kasa/python-kasa/pull/796) (@sdb9696)
|
|
231
247
|
- Refactor test framework [\#794](https://github.com/python-kasa/python-kasa/pull/794) (@sdb9696)
|
|
248
|
+
- Refactor devices into subpackages and deprecate old names [\#716](https://github.com/python-kasa/python-kasa/pull/716) (@sdb9696)
|
|
249
|
+
- Drop python3.8 support [\#992](https://github.com/python-kasa/python-kasa/pull/992) (@rytilahti)
|
|
250
|
+
- Make Light and Fan a common module interface [\#911](https://github.com/python-kasa/python-kasa/pull/911) (@sdb9696)
|
|
232
251
|
- Add missing firmware module import [\#774](https://github.com/python-kasa/python-kasa/pull/774) (@rytilahti)
|
|
233
252
|
- Fix dump\_devinfo scrubbing for ks240 [\#765](https://github.com/python-kasa/python-kasa/pull/765) (@rytilahti)
|
|
234
253
|
- Rename and deprecate exception classes [\#739](https://github.com/python-kasa/python-kasa/pull/739) (@sdb9696)
|
|
235
|
-
- Refactor devices into subpackages and deprecate old names [\#716](https://github.com/python-kasa/python-kasa/pull/716) (@sdb9696)
|
|
236
254
|
|
|
237
255
|
## [0.6.2.1](https://github.com/python-kasa/python-kasa/tree/0.6.2.1) (2024-02-02)
|
|
238
256
|
|
|
@@ -140,8 +140,13 @@ class AesTransport(BaseTransport):
|
|
|
140
140
|
return un, pw
|
|
141
141
|
|
|
142
142
|
def _handle_response_error_code(self, resp_dict: Any, msg: str) -> None:
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
error_code_raw = resp_dict.get("error_code")
|
|
144
|
+
try:
|
|
145
|
+
error_code = SmartErrorCode.from_int(error_code_raw)
|
|
146
|
+
except ValueError:
|
|
147
|
+
_LOGGER.warning("Received unknown error code: %s", error_code_raw)
|
|
148
|
+
error_code = SmartErrorCode.INTERNAL_UNKNOWN_ERROR
|
|
149
|
+
if error_code is SmartErrorCode.SUCCESS:
|
|
145
150
|
return
|
|
146
151
|
msg = f"{msg}: {self._host}: {error_code.name}({error_code.value})"
|
|
147
152
|
if error_code in SMART_RETRYABLE_ERRORS:
|
|
@@ -328,6 +328,11 @@ class Device(ABC):
|
|
|
328
328
|
"""Send a raw query to the device."""
|
|
329
329
|
return await self.protocol.query(request=request)
|
|
330
330
|
|
|
331
|
+
@property
|
|
332
|
+
def parent(self) -> Device | None:
|
|
333
|
+
"""Return the parent on child devices."""
|
|
334
|
+
return self._parent
|
|
335
|
+
|
|
331
336
|
@property
|
|
332
337
|
def children(self) -> Sequence[Device]:
|
|
333
338
|
"""Returns the child devices."""
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from asyncio import TimeoutError as _asyncioTimeoutError
|
|
6
6
|
from enum import IntEnum
|
|
7
|
+
from functools import cache
|
|
7
8
|
from typing import Any
|
|
8
9
|
|
|
9
10
|
|
|
@@ -63,6 +64,12 @@ class SmartErrorCode(IntEnum):
|
|
|
63
64
|
def __str__(self):
|
|
64
65
|
return f"{self.name}({self.value})"
|
|
65
66
|
|
|
67
|
+
@staticmethod
|
|
68
|
+
@cache
|
|
69
|
+
def from_int(value: int) -> SmartErrorCode:
|
|
70
|
+
"""Convert an integer to a SmartErrorCode."""
|
|
71
|
+
return SmartErrorCode(value)
|
|
72
|
+
|
|
66
73
|
SUCCESS = 0
|
|
67
74
|
|
|
68
75
|
# Transport Errors
|
|
@@ -119,6 +126,9 @@ class SmartErrorCode(IntEnum):
|
|
|
119
126
|
DST_ERROR = -2301
|
|
120
127
|
DST_SAVE_ERROR = -2302
|
|
121
128
|
|
|
129
|
+
# Library internal for unknown error codes
|
|
130
|
+
INTERNAL_UNKNOWN_ERROR = -100_000
|
|
131
|
+
|
|
122
132
|
|
|
123
133
|
SMART_RETRYABLE_ERRORS = [
|
|
124
134
|
SmartErrorCode.TRANSPORT_NOT_AVAILABLE_ERROR,
|
|
@@ -107,6 +107,8 @@ class Feature:
|
|
|
107
107
|
Number = Type.Number
|
|
108
108
|
Choice = Type.Choice
|
|
109
109
|
|
|
110
|
+
DEFAULT_MAX = 2**16 # Arbitrary max
|
|
111
|
+
|
|
110
112
|
class Category(Enum):
|
|
111
113
|
"""Category hint to allow feature grouping."""
|
|
112
114
|
|
|
@@ -155,7 +157,7 @@ class Feature:
|
|
|
155
157
|
#: Minimum value
|
|
156
158
|
minimum_value: int = 0
|
|
157
159
|
#: Maximum value
|
|
158
|
-
maximum_value: int =
|
|
160
|
+
maximum_value: int = DEFAULT_MAX
|
|
159
161
|
#: Attribute containing the name of the range getter property.
|
|
160
162
|
#: If set, this property will be used to set *minimum_value* and *maximum_value*.
|
|
161
163
|
range_getter: str | None = None
|
|
@@ -307,10 +307,12 @@ class IotStripPlug(IotPlug):
|
|
|
307
307
|
The plug inherits (most of) the system information from the parent.
|
|
308
308
|
"""
|
|
309
309
|
|
|
310
|
+
_parent: IotStrip
|
|
311
|
+
|
|
310
312
|
def __init__(self, host: str, parent: IotStrip, child_id: str) -> None:
|
|
311
313
|
super().__init__(host)
|
|
312
314
|
|
|
313
|
-
self.
|
|
315
|
+
self._parent = parent
|
|
314
316
|
self.child_id = child_id
|
|
315
317
|
self._last_update = parent._last_update
|
|
316
318
|
self._set_sys_info(parent.sys_info)
|
|
@@ -380,7 +382,7 @@ class IotStripPlug(IotPlug):
|
|
|
380
382
|
self, target: str, cmd: str, arg: dict | None = None, child_ids=None
|
|
381
383
|
) -> Any:
|
|
382
384
|
"""Override query helper to include the child_ids."""
|
|
383
|
-
return await self.
|
|
385
|
+
return await self._parent._query_helper(
|
|
384
386
|
target, cmd, arg, child_ids=[self.child_id]
|
|
385
387
|
)
|
|
386
388
|
|
|
@@ -441,13 +443,15 @@ class IotStripPlug(IotPlug):
|
|
|
441
443
|
@requires_update
|
|
442
444
|
def model(self) -> str:
|
|
443
445
|
"""Return device model for a child socket."""
|
|
444
|
-
sys_info = self.
|
|
446
|
+
sys_info = self._parent.sys_info
|
|
445
447
|
return f"Socket for {sys_info['model']}"
|
|
446
448
|
|
|
447
449
|
def _get_child_info(self) -> dict:
|
|
448
450
|
"""Return the subdevice information for this device."""
|
|
449
|
-
for plug in self.
|
|
451
|
+
for plug in self._parent.sys_info["children"]:
|
|
450
452
|
if plug["id"] == self.child_id:
|
|
451
453
|
return plug
|
|
452
454
|
|
|
453
|
-
raise KasaException(
|
|
455
|
+
raise KasaException(
|
|
456
|
+
f"Unable to find children {self.child_id}"
|
|
457
|
+
) # pragma: no cover
|
|
@@ -112,6 +112,9 @@ class Module(ABC):
|
|
|
112
112
|
"LightTransition"
|
|
113
113
|
)
|
|
114
114
|
ReportMode: Final[ModuleName[smart.ReportMode]] = ModuleName("ReportMode")
|
|
115
|
+
SmartLightEffect: Final[ModuleName[smart.SmartLightEffect]] = ModuleName(
|
|
116
|
+
"LightEffect"
|
|
117
|
+
)
|
|
115
118
|
TemperatureSensor: Final[ModuleName[smart.TemperatureSensor]] = ModuleName(
|
|
116
119
|
"TemperatureSensor"
|
|
117
120
|
)
|
|
@@ -2,8 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from abc import ABC, abstractmethod
|
|
5
6
|
from typing import cast
|
|
6
7
|
|
|
8
|
+
from ..interfaces.lighteffect import LightEffect as LightEffectInterface
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SmartLightEffect(LightEffectInterface, ABC):
|
|
12
|
+
"""Abstract interface for smart light effects.
|
|
13
|
+
|
|
14
|
+
This interface extends lighteffect interface to add brightness controls.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
@abstractmethod
|
|
18
|
+
async def set_brightness(self, brightness: int, *, transition: int | None = None):
|
|
19
|
+
"""Set effect brightness."""
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
@abstractmethod
|
|
23
|
+
def brightness(self) -> int:
|
|
24
|
+
"""Return effect brightness."""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def is_active(self) -> bool:
|
|
29
|
+
"""Return True if effect is active."""
|
|
30
|
+
|
|
31
|
+
|
|
7
32
|
EFFECT_AURORA = {
|
|
8
33
|
"custom": 0,
|
|
9
34
|
"id": "TapoStrip_1MClvV18i15Jq3bvJVf0eP",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Modules for SMART devices."""
|
|
2
2
|
|
|
3
|
+
from ..effects import SmartLightEffect
|
|
3
4
|
from .alarm import Alarm
|
|
4
5
|
from .autooff import AutoOff
|
|
5
6
|
from .batterysensor import BatterySensor
|
|
@@ -54,4 +55,5 @@ __all__ = [
|
|
|
54
55
|
"WaterleakSensor",
|
|
55
56
|
"ContactSensor",
|
|
56
57
|
"FrostProtection",
|
|
58
|
+
"SmartLightEffect",
|
|
57
59
|
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from ...feature import Feature
|
|
6
|
-
from ..smartmodule import SmartModule
|
|
6
|
+
from ..smartmodule import Module, SmartModule
|
|
7
7
|
|
|
8
8
|
BRIGHTNESS_MIN = 0
|
|
9
9
|
BRIGHTNESS_MAX = 100
|
|
@@ -42,6 +42,12 @@ class Brightness(SmartModule):
|
|
|
42
42
|
@property
|
|
43
43
|
def brightness(self):
|
|
44
44
|
"""Return current brightness."""
|
|
45
|
+
# If the device supports effects and one is active, use its brightness
|
|
46
|
+
if (
|
|
47
|
+
light_effect := self._device.modules.get(Module.SmartLightEffect)
|
|
48
|
+
) is not None and light_effect.is_active:
|
|
49
|
+
return light_effect.brightness
|
|
50
|
+
|
|
45
51
|
return self.data["brightness"]
|
|
46
52
|
|
|
47
53
|
async def set_brightness(self, brightness: int, *, transition: int | None = None):
|
|
@@ -59,6 +65,13 @@ class Brightness(SmartModule):
|
|
|
59
65
|
|
|
60
66
|
if brightness == 0:
|
|
61
67
|
return await self._device.turn_off()
|
|
68
|
+
|
|
69
|
+
# If the device supports effects and one is active, we adjust its brightness
|
|
70
|
+
if (
|
|
71
|
+
light_effect := self._device.modules.get(Module.SmartLightEffect)
|
|
72
|
+
) is not None and light_effect.is_active:
|
|
73
|
+
return await light_effect.set_brightness(brightness)
|
|
74
|
+
|
|
62
75
|
return await self.call("set_device_info", {"brightness": brightness})
|
|
63
76
|
|
|
64
77
|
async def _check_supported(self):
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import base64
|
|
6
|
+
import binascii
|
|
7
|
+
import contextlib
|
|
6
8
|
import copy
|
|
7
9
|
from typing import Any
|
|
8
10
|
|
|
9
|
-
from
|
|
10
|
-
from ..smartmodule import SmartModule
|
|
11
|
+
from ..effects import SmartLightEffect
|
|
12
|
+
from ..smartmodule import Module, SmartModule
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
class LightEffect(SmartModule,
|
|
15
|
+
class LightEffect(SmartModule, SmartLightEffect):
|
|
14
16
|
"""Implementation of dynamic light effects."""
|
|
15
17
|
|
|
16
18
|
REQUIRED_COMPONENT = "light_effect"
|
|
@@ -36,8 +38,11 @@ class LightEffect(SmartModule, LightEffectInterface):
|
|
|
36
38
|
# If the name has not been edited scene_name will be an empty string
|
|
37
39
|
effect["scene_name"] = self.AVAILABLE_BULB_EFFECTS[effect["id"]]
|
|
38
40
|
else:
|
|
39
|
-
# Otherwise it
|
|
40
|
-
|
|
41
|
+
# Otherwise it might be b64 encoded or raw string
|
|
42
|
+
with contextlib.suppress(binascii.Error):
|
|
43
|
+
effect["scene_name"] = base64.b64decode(
|
|
44
|
+
effect["scene_name"]
|
|
45
|
+
).decode()
|
|
41
46
|
|
|
42
47
|
self._effect_state_list = effects
|
|
43
48
|
self._effect_list = [self.LIGHT_EFFECTS_OFF]
|
|
@@ -77,6 +82,8 @@ class LightEffect(SmartModule, LightEffectInterface):
|
|
|
77
82
|
) -> None:
|
|
78
83
|
"""Set an effect for the device.
|
|
79
84
|
|
|
85
|
+
Calling this will modify the brightness of the effect on the device.
|
|
86
|
+
|
|
80
87
|
The device doesn't store an active effect while not enabled so store locally.
|
|
81
88
|
"""
|
|
82
89
|
if effect != self.LIGHT_EFFECTS_OFF and effect not in self._scenes_names_to_id:
|
|
@@ -90,7 +97,64 @@ class LightEffect(SmartModule, LightEffectInterface):
|
|
|
90
97
|
if enable:
|
|
91
98
|
effect_id = self._scenes_names_to_id[effect]
|
|
92
99
|
params["id"] = effect_id
|
|
93
|
-
|
|
100
|
+
|
|
101
|
+
# We set the wanted brightness before activating the effect
|
|
102
|
+
brightness_module = self._device.modules[Module.Brightness]
|
|
103
|
+
brightness = (
|
|
104
|
+
brightness if brightness is not None else brightness_module.brightness
|
|
105
|
+
)
|
|
106
|
+
await self.set_brightness(brightness, effect_id=effect_id)
|
|
107
|
+
|
|
108
|
+
await self.call("set_dynamic_light_effect_rule_enable", params)
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def is_active(self) -> bool:
|
|
112
|
+
"""Return True if effect is active."""
|
|
113
|
+
return bool(self._device._info["dynamic_light_effect_enable"])
|
|
114
|
+
|
|
115
|
+
def _get_effect_data(self, effect_id: str | None = None) -> dict[str, Any]:
|
|
116
|
+
"""Return effect data for the *effect_id*.
|
|
117
|
+
|
|
118
|
+
If *effect_id* is None, return the data for active effect.
|
|
119
|
+
"""
|
|
120
|
+
if effect_id is None:
|
|
121
|
+
effect_id = self.data["current_rule_id"]
|
|
122
|
+
|
|
123
|
+
return self._effect_state_list[effect_id]
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def brightness(self) -> int:
|
|
127
|
+
"""Return effect brightness."""
|
|
128
|
+
first_color_status = self._get_effect_data()["color_status_list"][0]
|
|
129
|
+
brightness = first_color_status[0]
|
|
130
|
+
|
|
131
|
+
return brightness
|
|
132
|
+
|
|
133
|
+
async def set_brightness(
|
|
134
|
+
self,
|
|
135
|
+
brightness: int,
|
|
136
|
+
*,
|
|
137
|
+
transition: int | None = None,
|
|
138
|
+
effect_id: str | None = None,
|
|
139
|
+
):
|
|
140
|
+
"""Set effect brightness."""
|
|
141
|
+
new_effect = self._get_effect_data(effect_id=effect_id).copy()
|
|
142
|
+
|
|
143
|
+
def _replace_brightness(data, new_brightness):
|
|
144
|
+
"""Replace brightness.
|
|
145
|
+
|
|
146
|
+
The first element is the brightness, the rest are unknown.
|
|
147
|
+
[[33, 0, 0, 2700], [33, 321, 99, 0], [33, 196, 99, 0], .. ]
|
|
148
|
+
"""
|
|
149
|
+
return [new_brightness, data[1], data[2], data[3]]
|
|
150
|
+
|
|
151
|
+
new_color_status_list = [
|
|
152
|
+
_replace_brightness(state, brightness)
|
|
153
|
+
for state in new_effect["color_status_list"]
|
|
154
|
+
]
|
|
155
|
+
new_effect["color_status_list"] = new_color_status_list
|
|
156
|
+
|
|
157
|
+
return await self.call("edit_dynamic_light_effect_rule", new_effect)
|
|
94
158
|
|
|
95
159
|
async def set_custom_effect(
|
|
96
160
|
self,
|
|
@@ -4,15 +4,14 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from ..
|
|
9
|
-
from ..smartmodule import SmartModule
|
|
7
|
+
from ..effects import EFFECT_MAPPING, EFFECT_NAMES, SmartLightEffect
|
|
8
|
+
from ..smartmodule import Module, SmartModule
|
|
10
9
|
|
|
11
10
|
if TYPE_CHECKING:
|
|
12
11
|
from ..smartdevice import SmartDevice
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
class LightStripEffect(SmartModule,
|
|
14
|
+
class LightStripEffect(SmartModule, SmartLightEffect):
|
|
16
15
|
"""Implementation of dynamic light effects."""
|
|
17
16
|
|
|
18
17
|
REQUIRED_COMPONENT = "light_strip_lighting_effect"
|
|
@@ -22,6 +21,7 @@ class LightStripEffect(SmartModule, LightEffectInterface):
|
|
|
22
21
|
effect_list = [self.LIGHT_EFFECTS_OFF]
|
|
23
22
|
effect_list.extend(EFFECT_NAMES)
|
|
24
23
|
self._effect_list = effect_list
|
|
24
|
+
self._effect_mapping = EFFECT_MAPPING
|
|
25
25
|
|
|
26
26
|
@property
|
|
27
27
|
def name(self) -> str:
|
|
@@ -53,6 +53,28 @@ class LightStripEffect(SmartModule, LightEffectInterface):
|
|
|
53
53
|
return name
|
|
54
54
|
return self.LIGHT_EFFECTS_OFF
|
|
55
55
|
|
|
56
|
+
@property
|
|
57
|
+
def is_active(self) -> bool:
|
|
58
|
+
"""Return if effect is active."""
|
|
59
|
+
eff = self.data["lighting_effect"]
|
|
60
|
+
# softAP has enable=1, but brightness 0 which fails on tests
|
|
61
|
+
return bool(eff["enable"]) and eff["name"] in self._effect_list
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def brightness(self) -> int:
|
|
65
|
+
"""Return effect brightness."""
|
|
66
|
+
eff = self.data["lighting_effect"]
|
|
67
|
+
return eff["brightness"]
|
|
68
|
+
|
|
69
|
+
async def set_brightness(self, brightness: int, *, transition: int | None = None):
|
|
70
|
+
"""Set effect brightness."""
|
|
71
|
+
if brightness <= 0:
|
|
72
|
+
return await self.set_effect(self.LIGHT_EFFECTS_OFF)
|
|
73
|
+
|
|
74
|
+
# Need to pass bAdjusted to keep the existing effect running
|
|
75
|
+
eff = {"brightness": brightness, "bAdjusted": True}
|
|
76
|
+
return await self.set_custom_effect(eff)
|
|
77
|
+
|
|
56
78
|
@property
|
|
57
79
|
def effect_list(self) -> list[str]:
|
|
58
80
|
"""Return built-in effects list.
|
|
@@ -81,16 +103,24 @@ class LightStripEffect(SmartModule, LightEffectInterface):
|
|
|
81
103
|
:param int brightness: The wanted brightness
|
|
82
104
|
:param int transition: The wanted transition time
|
|
83
105
|
"""
|
|
106
|
+
brightness_module = self._device.modules[Module.Brightness]
|
|
84
107
|
if effect == self.LIGHT_EFFECTS_OFF:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
108
|
+
state = self._device.modules[Module.Light].state
|
|
109
|
+
await self._device.modules[Module.Light].set_state(state)
|
|
110
|
+
return
|
|
111
|
+
|
|
112
|
+
if effect not in self._effect_mapping:
|
|
88
113
|
raise ValueError(f"The effect {effect} is not a built in effect.")
|
|
89
114
|
else:
|
|
90
|
-
effect_dict =
|
|
115
|
+
effect_dict = self._effect_mapping[effect]
|
|
91
116
|
|
|
117
|
+
# Use explicitly given brightness
|
|
92
118
|
if brightness is not None:
|
|
93
119
|
effect_dict["brightness"] = brightness
|
|
120
|
+
# Fall back to brightness reported by the brightness module
|
|
121
|
+
elif brightness_module.brightness:
|
|
122
|
+
effect_dict["brightness"] = brightness_module.brightness
|
|
123
|
+
|
|
94
124
|
if transition is not None:
|
|
95
125
|
effect_dict["transition"] = transition
|
|
96
126
|
|