python-kasa 0.6.2.1__py3-none-any.whl → 0.7.0.dev0__py3-none-any.whl
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.
- kasa/__init__.py +88 -27
- kasa/aestransport.py +51 -34
- kasa/cli.py +326 -130
- kasa/device.py +406 -0
- kasa/device_factory.py +83 -44
- kasa/device_type.py +7 -3
- kasa/deviceconfig.py +16 -9
- kasa/discover.py +100 -81
- kasa/emeterstatus.py +7 -5
- kasa/exceptions.py +41 -26
- kasa/feature.py +201 -0
- kasa/httpclient.py +21 -14
- kasa/interfaces/__init__.py +16 -0
- kasa/interfaces/fan.py +20 -0
- kasa/interfaces/led.py +38 -0
- kasa/interfaces/light.py +133 -0
- kasa/interfaces/lighteffect.py +80 -0
- kasa/interfaces/lightpreset.py +76 -0
- kasa/iot/__init__.py +18 -0
- kasa/{effects.py → iot/effects.py} +4 -2
- kasa/{smartbulb.py → iot/iotbulb.py} +100 -147
- kasa/{smartdevice.py → iot/iotdevice.py} +157 -286
- kasa/{smartdimmer.py → iot/iotdimmer.py} +42 -33
- kasa/iot/iotlightstrip.py +71 -0
- kasa/{modules/module.py → iot/iotmodule.py} +22 -42
- kasa/iot/iotplug.py +94 -0
- kasa/{smartstrip.py → iot/iotstrip.py} +57 -75
- kasa/{modules → iot/modules}/__init__.py +10 -2
- kasa/{modules → iot/modules}/ambientlight.py +31 -3
- kasa/{modules → iot/modules}/antitheft.py +1 -0
- kasa/{modules → iot/modules}/cloud.py +25 -6
- kasa/{modules → iot/modules}/countdown.py +1 -0
- kasa/iot/modules/emeter.py +210 -0
- kasa/iot/modules/led.py +32 -0
- kasa/iot/modules/light.py +221 -0
- kasa/iot/modules/lighteffect.py +122 -0
- kasa/iot/modules/lightpreset.py +151 -0
- kasa/{modules → iot/modules}/motion.py +8 -8
- kasa/{modules → iot/modules}/rulemodule.py +11 -12
- kasa/{modules → iot/modules}/schedule.py +1 -0
- kasa/{modules → iot/modules}/time.py +5 -4
- kasa/{modules → iot/modules}/usage.py +10 -8
- kasa/iotprotocol.py +22 -20
- kasa/klaptransport.py +25 -15
- kasa/module.py +136 -0
- kasa/modulemapping.py +25 -0
- kasa/modulemapping.pyi +96 -0
- kasa/protocol.py +6 -4
- kasa/smart/__init__.py +6 -0
- kasa/smart/effects.py +429 -0
- kasa/smart/modules/__init__.py +57 -0
- kasa/smart/modules/alarm.py +142 -0
- kasa/smart/modules/autooff.py +96 -0
- kasa/smart/modules/batterysensor.py +54 -0
- kasa/smart/modules/brightness.py +66 -0
- kasa/smart/modules/childdevice.py +10 -0
- kasa/smart/modules/cloud.py +42 -0
- kasa/smart/modules/color.py +96 -0
- kasa/smart/modules/colortemperature.py +78 -0
- kasa/smart/modules/contactsensor.py +42 -0
- kasa/smart/modules/devicemodule.py +22 -0
- kasa/smart/modules/energy.py +101 -0
- kasa/smart/modules/fan.py +80 -0
- kasa/smart/modules/firmware.py +216 -0
- kasa/smart/modules/frostprotection.py +59 -0
- kasa/smart/modules/humiditysensor.py +55 -0
- kasa/smart/modules/led.py +49 -0
- kasa/smart/modules/light.py +139 -0
- kasa/smart/modules/lighteffect.py +115 -0
- kasa/smart/modules/lightpreset.py +142 -0
- kasa/smart/modules/lightstripeffect.py +135 -0
- kasa/smart/modules/lighttransition.py +183 -0
- kasa/smart/modules/reportmode.py +36 -0
- kasa/smart/modules/temperaturecontrol.py +177 -0
- kasa/smart/modules/temperaturesensor.py +77 -0
- kasa/smart/modules/time.py +57 -0
- kasa/smart/modules/waterleaksensor.py +66 -0
- kasa/smart/smartchilddevice.py +65 -0
- kasa/smart/smartdevice.py +653 -0
- kasa/smart/smartmodule.py +112 -0
- kasa/smartprotocol.py +107 -41
- kasa/tests/conftest.py +27 -562
- kasa/tests/device_fixtures.py +427 -0
- kasa/tests/discovery_fixtures.py +197 -0
- kasa/tests/fakeprotocol_iot.py +64 -6
- kasa/tests/fakeprotocol_smart.py +215 -22
- kasa/tests/fixtureinfo.py +154 -0
- kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +221 -0
- kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +547 -0
- kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +391 -0
- kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +1557 -0
- kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +899 -0
- kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +479 -0
- kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +449 -0
- kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +173 -0
- kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +204 -0
- kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +566 -0
- kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +170 -0
- kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +171 -0
- kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +171 -0
- kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +526 -0
- kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +533 -0
- kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +530 -0
- kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +537 -0
- kasa/tests/smart/__init__.py +0 -0
- kasa/tests/smart/features/__init__.py +0 -0
- kasa/tests/smart/features/test_brightness.py +55 -0
- kasa/tests/smart/features/test_colortemp.py +30 -0
- kasa/tests/smart/modules/__init__.py +0 -0
- kasa/tests/smart/modules/test_contact.py +28 -0
- kasa/tests/smart/modules/test_fan.py +79 -0
- kasa/tests/smart/modules/test_firmware.py +108 -0
- kasa/tests/smart/modules/test_humidity.py +28 -0
- kasa/tests/smart/modules/test_light_effect.py +41 -0
- kasa/tests/smart/modules/test_temperature.py +47 -0
- kasa/tests/smart/modules/test_temperaturecontrol.py +137 -0
- kasa/tests/smart/modules/test_waterleak.py +42 -0
- kasa/tests/test_aestransport.py +115 -23
- kasa/tests/test_bulb.py +115 -85
- kasa/tests/test_childdevice.py +19 -7
- kasa/tests/test_cli.py +453 -99
- kasa/tests/test_common_modules.py +216 -0
- kasa/tests/test_device.py +268 -0
- kasa/tests/test_device_factory.py +61 -35
- kasa/tests/test_device_type.py +1 -1
- kasa/tests/test_deviceconfig.py +2 -2
- kasa/tests/test_dimmer.py +33 -24
- kasa/tests/test_discovery.py +112 -63
- kasa/tests/test_emeter.py +14 -10
- kasa/tests/test_feature.py +205 -0
- kasa/tests/test_httpclient.py +9 -9
- kasa/tests/test_iotdevice.py +286 -0
- kasa/tests/test_klapprotocol.py +94 -37
- kasa/tests/test_lightstrip.py +24 -19
- kasa/tests/test_plug.py +46 -8
- kasa/tests/test_protocol.py +8 -10
- kasa/tests/test_readme_examples.py +87 -26
- kasa/tests/test_smartdevice.py +203 -311
- kasa/tests/test_smartprotocol.py +130 -25
- kasa/tests/test_strip.py +15 -6
- kasa/tests/test_usage.py +1 -1
- kasa/xortransport.py +15 -12
- {python_kasa-0.6.2.1.dist-info → python_kasa-0.7.0.dev0.dist-info}/METADATA +45 -143
- python_kasa-0.7.0.dev0.dist-info/RECORD +239 -0
- kasa/modules/emeter.py +0 -111
- kasa/smartlightstrip.py +0 -143
- kasa/smartplug.py +0 -91
- kasa/tapo/__init__.py +0 -7
- kasa/tapo/childdevice.py +0 -41
- kasa/tapo/tapobulb.py +0 -262
- kasa/tapo/tapodevice.py +0 -409
- kasa/tapo/tapoplug.py +0 -45
- kasa/tests/fixtures/HS105(US)_1.0_mocked.json +0 -47
- kasa/tests/fixtures/HS110(EU)_2.0_mocked.json +0 -50
- kasa/tests/fixtures/HS110(US)_1.0_mocked.json +0 -50
- kasa/tests/fixtures/HS200(US)_1.0_mocked.json +0 -47
- kasa/tests/fixtures/HS220(US)_1.0_mocked.json +0 -75
- kasa/tests/fixtures/LB100(US)_1.0_mocked.json +0 -103
- kasa/tests/fixtures/LB120(US)_1.0_mocked.json +0 -103
- kasa/tests/fixtures/LB130(US)_1.0_mocked.json +0 -104
- python_kasa-0.6.2.1.dist-info/RECORD +0 -167
- {python_kasa-0.6.2.1.dist-info → python_kasa-0.7.0.dev0.dist-info}/LICENSE +0 -0
- {python_kasa-0.6.2.1.dist-info → python_kasa-0.7.0.dev0.dist-info}/WHEEL +0 -0
- {python_kasa-0.6.2.1.dist-info → python_kasa-0.7.0.dev0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
kasa/__init__.py,sha256=6NtNeLfa5IxeF5DUFrImgPQ-wxs_gXqLMdTyAxJWR-U,4122
|
|
2
|
+
kasa/aestransport.py,sha256=znkr9wTGcXMSbuVUEfeSAjTa8tblPHn262Roetd1uVo,16213
|
|
3
|
+
kasa/cli.py,sha256=TI2AwLKmMFIRYbCHIMuM8ZLkPoDobKMkNLeZbnrhPEY,37621
|
|
4
|
+
kasa/credentials.py,sha256=SU9O5QjkWsozC7oCMhc2abydmETNjLZrJwv_KJ6fnK4,357
|
|
5
|
+
kasa/device.py,sha256=whOXYRSN3XCn5hcAq0OPCROVitnSb7U5TRYUQdn3uhU,13644
|
|
6
|
+
kasa/device_factory.py,sha256=ct22rdnDqXONBc5PMeY_hii84Jy8ncWfkyEq2ZzfheA,6996
|
|
7
|
+
kasa/device_type.py,sha256=MJW1bVoAcH_MILSW8IBpv3jKRbPWkxmvuWdU-7Ov_D0,744
|
|
8
|
+
kasa/deviceconfig.py,sha256=iE5nOyG5vP_wpMIGV4pNAV36LJS4YxYn-8gmS6wMSFY,6913
|
|
9
|
+
kasa/discover.py,sha256=-MK5Kdca_bf43vHRhLl0tpP51wLtsE_kxB9_8L0pSFg,20465
|
|
10
|
+
kasa/emeterstatus.py,sha256=-F0QAXR13jmfgdzjMjgLUY3LhEWRqceJ8zkB53HIX1Y,2529
|
|
11
|
+
kasa/exceptions.py,sha256=jot7D_0aZjHR57NKiz2s1IdhfN9JUGiOGwd7HXshjuI,3878
|
|
12
|
+
kasa/feature.py,sha256=4Cc6UC7zshNu5KSgb9m3jNSTM9Ny-vR7YBH1LrjXKyI,7341
|
|
13
|
+
kasa/httpclient.py,sha256=wA6MmEkcnseKbjzDy8R5YeJJEDEhrRNc9tqgmCjQSNo,3960
|
|
14
|
+
kasa/interfaces/__init__.py,sha256=bDGedx_sD_wsr1nATAJHt2nv3ClVWsWLfWiyBICMSOk,290
|
|
15
|
+
kasa/interfaces/fan.py,sha256=cnT9HpiJrJ9JSrF4nRzb6Ff8OyC1-ZUzW6aIGXQObWc,411
|
|
16
|
+
kasa/interfaces/led.py,sha256=LJR2IiEhZdrskza9nDLAe5WWgr_JCd3B35jve7q0BI0,950
|
|
17
|
+
kasa/interfaces/light.py,sha256=jvlzZN0M-znnKFit__whiXdidwhpmkPn7zmFDnA_0bA,3372
|
|
18
|
+
kasa/interfaces/lighteffect.py,sha256=6in84ZCBli1ejHM7WuiG5AmnDQPDNRsZA3ER3t00sUw,2122
|
|
19
|
+
kasa/interfaces/lightpreset.py,sha256=d0oFmaC1METpQWxyBvSL8yPCjO1Z1-cOzNWa665ROyc,1887
|
|
20
|
+
kasa/iot/__init__.py,sha256=k0QlxHTzb_btqNIIpUd9ybDo-CjkQLa1DReyAkTfs4I,399
|
|
21
|
+
kasa/iot/effects.py,sha256=au35HDrHso7JRdv9bPSdkepdpR8NbSp-gFGHW2SKZUw,7506
|
|
22
|
+
kasa/iot/iotbulb.py,sha256=0buVJi9bX9T1-Sr96EOeFlfP0FKRQO8XblFe4gjVdeY,17734
|
|
23
|
+
kasa/iot/iotdevice.py,sha256=3czE3_Ot_VU0JXheRIUeQm9JBhhoyyWoREZyf-S8Kn8,24534
|
|
24
|
+
kasa/iot/iotdimmer.py,sha256=9F7FnhfNQkHKPHS2IO2Y265W5tUjdODClxeYi7D2IoM,7666
|
|
25
|
+
kasa/iot/iotlightstrip.py,sha256=bVlRzA3TUJMS4Xdkrsje6LIum52rf_fTz7lhf_tLt7A,2061
|
|
26
|
+
kasa/iot/iotmodule.py,sha256=-pf1d91Va0pxfcgT0HsF5aO8xJYWyoYVMCrrADP2zWg,2091
|
|
27
|
+
kasa/iot/iotplug.py,sha256=LVYdP0mTH2EdkCZihgVNLh1bLAIlg_VlkBJb2my2RVw,2976
|
|
28
|
+
kasa/iot/iotstrip.py,sha256=5phlDrPd4w7yd7VSQfFWmSmjMKURf9URDmbMzxuh-bY,12339
|
|
29
|
+
kasa/iot/modules/__init__.py,sha256=Nq49DvOol1DcURsL3ZmXRLOmQRAgA7s3yFA9aiKQkss,751
|
|
30
|
+
kasa/iot/modules/ambientlight.py,sha256=qGwAuAfSHE6at-hzMblKmEkwNsWrtY5k6unnrFrkX1s,2458
|
|
31
|
+
kasa/iot/modules/antitheft.py,sha256=XV5NM_zMLMU50KpR-MCFGx-1S4TxB61jcuOh3KZ-9Zc,235
|
|
32
|
+
kasa/iot/modules/cloud.py,sha256=CWL54K3iC7VQ7NBdnX039fz6r-MjCwxdhOGqv2QCk7c,2037
|
|
33
|
+
kasa/iot/modules/countdown.py,sha256=53PUMGv3L1zMTkx1PBRvMSGzqX6ZnbwmtXHMyBioT4o,159
|
|
34
|
+
kasa/iot/modules/emeter.py,sha256=6Ckz5coe8VtO34jIqWSvRG4c0lKVISKGHHBZwMe7rcA,6816
|
|
35
|
+
kasa/iot/modules/led.py,sha256=6iM2FTE7sxNJtxmqwLs2iFXBbTdF-4vmgIAqJTuXDAA,814
|
|
36
|
+
kasa/iot/modules/light.py,sha256=6P_NKzrxvlR6FbEkTtNjEaSM3yahW8O_C6UsbtGUJx4,7787
|
|
37
|
+
kasa/iot/modules/lighteffect.py,sha256=UunL9zT3pkXBZA3irrv0a4HG9_YV57STfAt_0-0yrrk,3595
|
|
38
|
+
kasa/iot/modules/lightpreset.py,sha256=_tMCxMCX9VEjx1pwhkk8O7HMmU1PFWJL32pUhkzA6Lk,5282
|
|
39
|
+
kasa/iot/modules/motion.py,sha256=lfxM0CFGacjZrBh6UqN5Kyja4beXwrTNxZUU4lh0xZg,2264
|
|
40
|
+
kasa/iot/modules/rulemodule.py,sha256=_QgsgMRvnh2M2xLx0ACvPdhn_3LZ9zwTbhpT5oQqxvE,2040
|
|
41
|
+
kasa/iot/modules/schedule.py,sha256=r9MbXp4CRV8qKPlSXWY5RpHqkT6ULdLGLg8P857sEqI,151
|
|
42
|
+
kasa/iot/modules/time.py,sha256=4cuogMUfHEcbQ3kCVKuD1Ms2qviU0sXK5yQhaYW_Jpg,1415
|
|
43
|
+
kasa/iot/modules/usage.py,sha256=YeeUdVJ6Koj2eSQ0U9qETdqhBrUVd0j7cnY1XOhVSlc,3819
|
|
44
|
+
kasa/iotprotocol.py,sha256=9QzkaaQcyEvoL5cZTxfQ2i-lywU1ciAUmE20mC-jc_k,4464
|
|
45
|
+
kasa/json.py,sha256=cPLAwsWD1yCp3_dHe4CjgrM29FaICHbqUL37QYoiipk,415
|
|
46
|
+
kasa/klaptransport.py,sha256=zomU81pqT5e4-DMoxLvubJ3xYF0gpmb0FxA49xSTKr8,18359
|
|
47
|
+
kasa/module.py,sha256=96DXzUJ3TXmy4q4sjyd20X-9pIlEt2hlzdpsCwFO4f0,5321
|
|
48
|
+
kasa/modulemapping.py,sha256=79mtaewNYvhFjn1Jo39xE57aid5gn08A-45bOS0vgMs,499
|
|
49
|
+
kasa/modulemapping.pyi,sha256=dP-zCo8FiFOC68TtpBlxDcJASDwUur1gFyC9Ei9aaMU,3853
|
|
50
|
+
kasa/protocol.py,sha256=suY021K8kfOzUNLLNDXBqJRcoSXlx2UwqUgOughNzzk,3325
|
|
51
|
+
kasa/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
+
kasa/smart/__init__.py,sha256=gdmi-Doe7dnv7e8ab_892lr9IdOXeFa3XlU3u_CePCk,198
|
|
53
|
+
kasa/smart/effects.py,sha256=EneV8hvcNRCNqZqXxAmxQBXDk7dnnSWKd_Ru4egIXHY,10807
|
|
54
|
+
kasa/smart/modules/__init__.py,sha256=zXiuja09r25Cx1jUHnnO67g3aJgbN74bAFi3qo44JyE,1451
|
|
55
|
+
kasa/smart/modules/alarm.py,sha256=abwuqdmcZD1FK_m0nyuZv9mRyrpTDh8pMzqEildvB_4,4214
|
|
56
|
+
kasa/smart/modules/autooff.py,sha256=KtvLCfNDav3KQSNvO9uWwVfI_20VjlbWE_XmGKkjAbY,2842
|
|
57
|
+
kasa/smart/modules/batterysensor.py,sha256=9CGZoVk7COwM0yIYqRKqpoxYQA-1poCqEaoJZfrnoI4,1634
|
|
58
|
+
kasa/smart/modules/brightness.py,sha256=krwyfFNhXm1r7RcQXPhajSAizfh5hrPHrpbV8-ocy_s,2077
|
|
59
|
+
kasa/smart/modules/childdevice.py,sha256=Ge5DbilDBoSdUWDfSfMqFz3ZNA1in8c2QeBG3zZgQuM,246
|
|
60
|
+
kasa/smart/modules/cloud.py,sha256=pOjagSVWwbcKtY5hLG89upaYG7TaJiwhWgiYGVrltCA,1151
|
|
61
|
+
kasa/smart/modules/color.py,sha256=Qr8v0xz1sgKDI6OwdcD5UxJabqBQ1bhMJMH5fPivbI8,2956
|
|
62
|
+
kasa/smart/modules/colortemperature.py,sha256=fK7SMAfeX__LIoVlLO7aMKOWa52XmpUzR0Aymrb8tRs,2511
|
|
63
|
+
kasa/smart/modules/contactsensor.py,sha256=wnKkb5yt7OPvdvfFjYlB0_xKsTptviNSQD19UDJQ3sY,1145
|
|
64
|
+
kasa/smart/modules/devicemodule.py,sha256=gl6flBNv1mb7uShsv6U-myZ0z6ZYpzrqaem9xJLAKzg,552
|
|
65
|
+
kasa/smart/modules/energy.py,sha256=CXE7wDTpMAzqnIjyRFLC--lPHlca_1kaP7umPcd3ZXQ,2960
|
|
66
|
+
kasa/smart/modules/fan.py,sha256=sGM9Cro2i9iulIf76O3wijIL6HUlAx1YPaT-7HIC0xM,2446
|
|
67
|
+
kasa/smart/modules/firmware.py,sha256=2tk5KxXCd6234mENnyP7C8OqNqyMxemoUG6J9DdWu38,7281
|
|
68
|
+
kasa/smart/modules/frostprotection.py,sha256=atqjnvMySSvQ-FeWeynyof2xEY9PF3qA0Eme6ATWhOU,1748
|
|
69
|
+
kasa/smart/modules/humiditysensor.py,sha256=hTgSb7RjgwWAWiVjG6_wjm-KNoAvfgbYuJZST53UVus,1609
|
|
70
|
+
kasa/smart/modules/led.py,sha256=evlYwTXhkUs4jqmRLEENeRrBkztN7_wEna7WJCnBWmw,1369
|
|
71
|
+
kasa/smart/modules/light.py,sha256=Zy6HhWPoDd2CSwnM6BT1Lh6PGPgxqkMA87Vi7Qp31BU,4791
|
|
72
|
+
kasa/smart/modules/lighteffect.py,sha256=cJg4pRYZrR6iHmIVGnBN-qoz9oTrtlhEtXQb2soL5Dk,3971
|
|
73
|
+
kasa/smart/modules/lightpreset.py,sha256=Xoy2sOVxq4z9bifwPIgo-jN99Xv9e8Gxs2BjMY2-N44,5327
|
|
74
|
+
kasa/smart/modules/lightstripeffect.py,sha256=Hdw_QZ7c8SDawDFpYhnMinAnukMAt62Yaql_HNvvBtE,4012
|
|
75
|
+
kasa/smart/modules/lighttransition.py,sha256=LLJvyruBzvkLY0O6xiezEuPun7bwZ8b6aiRP9RYeL0A,6237
|
|
76
|
+
kasa/smart/modules/reportmode.py,sha256=IMg1HWmipgsKeOgOc9mtnGYdpjGPIzqcwtgYqjtjz9o,960
|
|
77
|
+
kasa/smart/modules/temperaturecontrol.py,sha256=qDXCm-NO_shtu8q29_6F6Vx5hbLO82QnOqiODTlENmo,5645
|
|
78
|
+
kasa/smart/modules/temperaturesensor.py,sha256=ezYTyFSKG-d2Dz20fX_3VUwU2ZXHCEPlC8AjVpx1gSQ,2547
|
|
79
|
+
kasa/smart/modules/time.py,sha256=nzU26LYI0DqXZI471BZp6rXL6AQVgV7NF8FY7cnJiY4,1678
|
|
80
|
+
kasa/smart/modules/waterleaksensor.py,sha256=-mFTA3qpXYHSHUsA5062tscJrU74eqVv3gG9zL15UNg,1790
|
|
81
|
+
kasa/smart/smartchilddevice.py,sha256=fEFp_SFl1a2bcmmpFQYHxk4a5Se30AKLv1_eXrLIFqY,2326
|
|
82
|
+
kasa/smart/smartdevice.py,sha256=ARSw7vO78GW7Mmrg55jlp3BTEE0PkSBrQjFWWR9w240,23677
|
|
83
|
+
kasa/smart/smartmodule.py,sha256=UcQSZ94wfXtxgnJJ-feTCi1lEb0Oayeed9-z7x-ejcA,3609
|
|
84
|
+
kasa/smartprotocol.py,sha256=LRCse6cOW8efoyY5SgSH0PeaoUWkGS1gxk5gj7mXRDM,15200
|
|
85
|
+
kasa/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
86
|
+
kasa/tests/conftest.py,sha256=SEMjGkposNARLaU2DZO__NBkZmNIn3A-CXJuYIrRk9Q,2791
|
|
87
|
+
kasa/tests/device_fixtures.py,sha256=VGFQ_Qs-Q8ilVNVyHFvvCOn5if2DbrLUfMfJuRQhySQ,12160
|
|
88
|
+
kasa/tests/discovery_fixtures.py,sha256=vcT9HEy5M8m2hWwuYBO1FmdCiySqooqOHmKgHMzZZrQ,6389
|
|
89
|
+
kasa/tests/fakeprotocol_iot.py,sha256=oMZeflwjxb1Vh3lNCK-lfkcR1ZmpZqBMmfRCHI5qz3c,13544
|
|
90
|
+
kasa/tests/fakeprotocol_smart.py,sha256=TDy5MhMeMKd9ymuYXIzB9ixgAohAOB7T_KYtQ0lX0sA,12989
|
|
91
|
+
kasa/tests/fixtureinfo.py,sha256=3hZrANIFasuBWslUrelqluqozm2DDfrbqxCRcpN1Jt0,4857
|
|
92
|
+
kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json,sha256=sABRlOhIcHXHnKTQFdEnIKW5gf2ir3t_TaJXamVQ8ZM,974
|
|
93
|
+
kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json,sha256=yOfWZEhRPMshudzi5suV6ER_9yagp4hILhznX5r1KuI,1427
|
|
94
|
+
kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json,sha256=U0HfHYYk1vItt-HDg3iMz-TeaG8DdQeNWnxP0qviY3s,3677
|
|
95
|
+
kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json,sha256=wcqEXs5i9DOFcsdOvwX-wA4HrIegA4Q8-SdP8mdF31c,894
|
|
96
|
+
kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json,sha256=GUwMfBGiMSOBCcWE89dhB840QEIhERt5r2V5esFwNTw,1462
|
|
97
|
+
kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json,sha256=nh7eutiAE9h8K3DwoaJ8PcT49gB3nDJ7AeeD9nqvsbo,1305
|
|
98
|
+
kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json,sha256=XGGtRjD0TjA9ahnOUuuYYb2FgYc987iGJmwDH9Q5KkE,1422
|
|
99
|
+
kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json,sha256=JSV9TiGhaHXurDjrS6HyTJR46nGWUX3obUHpIm8tYhA,1552
|
|
100
|
+
kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json,sha256=lh2olDXRAivh80y5p_aDUmSygI73tCCSMO0adSe0-Sw,1356
|
|
101
|
+
kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json,sha256=RqZo3_gbZYJv3Jbr-RadM5AuyDqXokOeM1AiZ7Z89MA,938
|
|
102
|
+
kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json,sha256=W_d_rwQomAdtukmabil_a34jmlXLPqPwCQOl-3jkTgM,1425
|
|
103
|
+
kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json,sha256=9fMqs4Oq-g_69i8Rl4_pb5ATyq0y_zlDlbJtoEFd6f0,1729
|
|
104
|
+
kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json,sha256=NeNiEt7TC5IOb5PqYfl5GWx3maeXYzlktICZrFaZo_o,1134
|
|
105
|
+
kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json,sha256=T-Otwn89h0jA8687miaQgkKK8qL4_YmZ4qRORJUgD1o,1187
|
|
106
|
+
kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json,sha256=uML5duxcKwOPkPspO6OY3WXWHST2NtSerBLeKr5Ov0Q,1442
|
|
107
|
+
kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json,sha256=KvZTRwbKoIkgD85WgYhws8FE9UeZyvsRwWIBugZEuDU,946
|
|
108
|
+
kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json,sha256=sTW74aKPjYQMSvkIxRmMizS7zMHFchOFVOmdg17PCuc,1476
|
|
109
|
+
kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json,sha256=4-aKR-g6xy_PFcTeXd5miKZpWALNxqfprV6Kk9mOf1Q,2183
|
|
110
|
+
kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json,sha256=kBsFYISBLsZIwyRJCw6uls8KjR5-iSZ2tO79vix3G0w,1845
|
|
111
|
+
kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json,sha256=Mun0GFrChSwcQTWROD22qQAUfHxvIadyM8NHgtNnXkY,2964
|
|
112
|
+
kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json,sha256=eMgqR_kO40-3a9onCo2nfpQ9d6EAIooK57aQWr0SEuM,2931
|
|
113
|
+
kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json,sha256=ZSieePCbO2C23zrHnzgcXi2fGFW6aToMPffGl3FIH5A,2866
|
|
114
|
+
kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json,sha256=PzDEJ_AHlUy7-CaGLoJSryWuNYeKjbmdfvJLD8bB9bE,2664
|
|
115
|
+
kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json,sha256=WSoAtxCnoCVubVVjokvuE6t4EdKY_zfP0v8r4lkM91Q,2724
|
|
116
|
+
kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json,sha256=lrBn_IEJHxoHFr3VxkNW95S3HuuH4nOxP2Sqkpzbx3s,2627
|
|
117
|
+
kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json,sha256=WLMFeDgVrUMxgz9nrVUfU8DUnqo8oSdXLHjka6bxWOY,2768
|
|
118
|
+
kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json,sha256=-muZnKuMstL8lGybN_J_Sztv5OzvxK11X5XWc0xMRZY,2787
|
|
119
|
+
kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json,sha256=jImhH-sg59dTYgYw2qYYgc5O2f2uya7SCm8z7-601Fc,2541
|
|
120
|
+
kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json,sha256=yfVrQMCJ-3IO8ii0nMFjT3bmOxO8f2bFo9YWo_LA26k,2667
|
|
121
|
+
kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json,sha256=A6Rh5Y15qZzsDe6oBSMVksKly_LwE78be9P7xgjquBg,2649
|
|
122
|
+
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json,sha256=z8pMFiQryWZ1o61mpWWhYmgZDNaS_Z4oLCnouWQe15Y,1717
|
|
123
|
+
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json,sha256=IeDMUr5iXoNrZ8O8SIy45ImKEi45t9IsvDDN1htnlXY,1750
|
|
124
|
+
kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json,sha256=5UBXSa6HBhZmpFv7sNe6kx_L9zaRcuhaXWjT79TwMCw,1721
|
|
125
|
+
kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json,sha256=OuD88l7N_wmOVzibBlqq2xrTK0YZGTk9XWV4zSaGifg,2757
|
|
126
|
+
kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json,sha256=FI5iG5Y-SztHfNTg6YFItG0_uJSatD4NBrqj2JhSGzo,2065
|
|
127
|
+
kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json,sha256=5NYSUZajA0OIO9euMrn1z9LFZwQ_14C5x84FZX21_nA,1826
|
|
128
|
+
kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json,sha256=F3Qrh9VRadDEfqvcxJhVHIHQW_Dh9_zYogd_0Knnq9I,1787
|
|
129
|
+
kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json,sha256=qM3xy3btf-FVc9QZbkv34Y2bM64PE3XMogQOvWSx1hA,1757
|
|
130
|
+
kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json,sha256=Q-Jt2lqElO2Bt3mrXzPZSNQl_0G2a73ZyzKW4xgtGms,2661
|
|
131
|
+
kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json,sha256=uyWZDKRWtqR3gDMDBHRq8KIvULjL5tyI5Em_PD9ikv8,3007
|
|
132
|
+
kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json,sha256=-pDyRwIe43LguYUqahnJUBVXoqBhY71QMEb9edj5siM,2668
|
|
133
|
+
kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json,sha256=Ulq94HqjtBGBizeG796jLPVx5PztlzSe8S-hDwNr9Cg,940
|
|
134
|
+
kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json,sha256=5Z4mzrKwNkIFoUipMC_Wt7AGo_kvqIkNOjxf9sL-dVw,1135
|
|
135
|
+
kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json,sha256=fVlM_LTyLzBD1yVnXdJ-aVd9QLTTcLT33RS1Mea32kQ,1010
|
|
136
|
+
kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json,sha256=OENzKfJO8fL3x7fM7uiNsVGivdswLrpldpfJIHMfOAU,1231
|
|
137
|
+
kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json,sha256=nKavif9JJKsSlhZSIAj2WZGhz9Aq_r7SVD6rql6IOIU,1213
|
|
138
|
+
kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json,sha256=hc949DuTczzJwENzM1pSAUFTlk0mIV1bSf5F20aguwA,1215
|
|
139
|
+
kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json,sha256=AuOwEpJI6lnJwJSwa-FLE3-F4LB7FFviU68JBZY3fHw,1230
|
|
140
|
+
kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json,sha256=T6dwl8G5kidb0MYlBjFMqqiY8LKmO30cBifhSGlnF2Y,1460
|
|
141
|
+
kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json,sha256=P9oKnXXyGfUenb0VXyMBjDa_K5x13pcojh-D6fShwJU,1752
|
|
142
|
+
kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json,sha256=4b8ZG47hLWaLn-RvJ9qrIFkCdPrA3ZgZuwMBCLrVXBs,1738
|
|
143
|
+
kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json,sha256=cJmSPP_LZxzAAbC8s-dGEAG2YnSrjJBuQFYJd5gKM0Q,1843
|
|
144
|
+
kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json,sha256=UVIGClmBTuNpbQObF00xXRw508FP_CIimNlFUdXYnxQ,1431
|
|
145
|
+
kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json,sha256=aYNCz5as_q4wUs2ZAP1i3YnhE-rwmfKCwGP7ngwOP50,966
|
|
146
|
+
kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json,sha256=PIUpmJTbX--_VIUJ0GSj2Vvq6NadxwBAs1bsshbl1hs,1892
|
|
147
|
+
kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json,sha256=k5J_4M_WZYOA8fO3KfX3Tc-gw6LyxzytPkldtOjezzE,2842
|
|
148
|
+
kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json,sha256=MRI7eeN9xt4zAIhg5uFvSihLMBIdArpifon1D1PsvV0,3684
|
|
149
|
+
kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json,sha256=mWCJW2wjlXy5nGWEAQp0Vt5X93sffwW4wWd1VO7nBPw,1836
|
|
150
|
+
kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json,sha256=XyKwHjjXdbTxwZm8fXvonw2hWiQVbrgoEzPtBAjLzgo,2684
|
|
151
|
+
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json,sha256=fiayXdiExmcFS7edMf2BT4ApjuOEpfdbnKscMuifoN8,11783
|
|
152
|
+
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json,sha256=TkJwLy2f5rluUI-1KeI8oFBkmGAFS-_BRxdP_iO1i10,10183
|
|
153
|
+
kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json,sha256=w5dr9fL40USpSIF8ir94oPdiD44P1QiUo3gJYlc9y3s,5648
|
|
154
|
+
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json,sha256=SeFE5VnLDVhHp4-4LvA_fOCpz1NTP1VXzYCp8Wg0PQo,16206
|
|
155
|
+
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json,sha256=OLatON85GbtxHDeIni5q19O9KOcefHIMPLLNubEOA1o,10996
|
|
156
|
+
kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json,sha256=ZDkwk_IFhg_tE3Rpq8oB9tkmDYww5Mvyc7Wrjq-5ulA,51193
|
|
157
|
+
kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json,sha256=rL6yIwdb-FkdgQNdPqBfLlMKBMQdaFMBrIwWU3eusX8,4524
|
|
158
|
+
kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json,sha256=HUKqR6Pap_3DGs9otfmKdlXsuqZLmxzNvwJ-rZHNU-k,6154
|
|
159
|
+
kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json,sha256=1HAM6x0LSy4ttk5dtz5ecoBqSz83XvCWnm1Suf0q7_g,6767
|
|
160
|
+
kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json,sha256=NiJC18sEJq-40xPsTsw2GWooomeFeYIxMGlQYyMvpfg,28440
|
|
161
|
+
kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json,sha256=oECSR_ofrnh5m8GsG3Xg9SlT0Gt3_qCxv17bTJqyF-Q,14218
|
|
162
|
+
kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json,sha256=f0ttoX1Odsuaw6EK6BwPJNaF92t51N2m9ZasCe2y18o,6908
|
|
163
|
+
kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json,sha256=Ggi0722kDkUghb_96NWiqXNbg2W8iZIjH0JoN2ybAG8,8205
|
|
164
|
+
kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json,sha256=Lq9pdeknW9o8SFxD60O2nISZbZqEhtXodzQKTe3i5vo,6631
|
|
165
|
+
kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json,sha256=P6lrPAh5_vtAy_2jNiTr0FcpYG1k_oygLoj_URzXxQ4,10786
|
|
166
|
+
kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json,sha256=wL7y7kfhdY-ViutORoTkm9-3MJ0HB0coFVcaJLUGZAE,11176
|
|
167
|
+
kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json,sha256=MfxF1Wul6-yfpjf88FULwJxIlhZzVgogjPCf5OqaTRg,11382
|
|
168
|
+
kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json,sha256=gyfRlHs4ndwMhHhHO7xRXbcfwRQZfJROSXsvkRHLeBI,11132
|
|
169
|
+
kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json,sha256=s1HY13HS35B40n2cbHSGYhVlwNj9BhkiVnayqXGDTdw,10488
|
|
170
|
+
kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json,sha256=vldOVLCwxGy4SEldLXfxcIn84XGaJ5lrgtoh_kbJHaw,10838
|
|
171
|
+
kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json,sha256=uP1q1ho0nDsZbtZs_PQhdDWgO9a-WIlcrDBvWdPHQoM,9175
|
|
172
|
+
kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json,sha256=ZEt4-9kJjwXAF-bLRLOcABUujrtCjVvIrsIow-ifZ1E,9278
|
|
173
|
+
kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json,sha256=LYFgAKU2ALVSNUAjxYMRrwsXqLRamaAcq9-ex_slC6s,9466
|
|
174
|
+
kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json,sha256=EJnzraYtxKTubebsmYErU_pHcwhHc323Rp38b2tGivI,9911
|
|
175
|
+
kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json,sha256=RTr4d41VK4QEwHFA_O4stY6Tp3BK_tcuJDk4W4Qc7ck,10228
|
|
176
|
+
kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json,sha256=jXX2r3jfN-9Nk_tbAbkcZPzlK_6s_h5ck2O2u3Xxpl4,4532
|
|
177
|
+
kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json,sha256=SV39FFu-ZPGEHf2bTTcf2lr79zCWXOUKXfNxQ3pMAH8,4958
|
|
178
|
+
kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json,sha256=OoEVkBlZcOGtZi1F7kFd8Su-91au_cBjbQXb1B7u3Kk,5102
|
|
179
|
+
kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json,sha256=R_TH6VFMfyJwyTyQTUkVzxwb0kiLHYei1CG6zgTCrlY,12958
|
|
180
|
+
kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json,sha256=aqqXsYulM2PAC7bpqtzkg4uwPlnmqwThiz2UyNrOmDI,9832
|
|
181
|
+
kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json,sha256=HykdwKmM-i8p_emXsufqHILhFD1LAxNI0rPgan2FI-U,11013
|
|
182
|
+
kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json,sha256=kVBU1qCAQUfcMe8RoTBTsL1pdupBoe20Scgxgo_J0wI,6145
|
|
183
|
+
kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json,sha256=RtKXcKBZoSXx3GHNpWyYpGhVApNQ3MxJnItmO3mWHSs,8251
|
|
184
|
+
kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json,sha256=PWl5FnEpybN5wJt8xzqhmLdviEhx5NtV7hDOnf52S-k,15605
|
|
185
|
+
kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json,sha256=B0LDPtQoEzO9Q2W5pbX2ORixgUOvEU6fWlYXB6qN9pc,15653
|
|
186
|
+
kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json,sha256=QlU1vIIAEEkEr6ZLbBwr4Ii-fBt6VMWwo3JpUEUr7SA,8461
|
|
187
|
+
kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json,sha256=NBXlb8UXdZzRNoZQxAnzThoT_tAnaXVGRVKkCVgZnwE,8415
|
|
188
|
+
kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json,sha256=nfTQSFWPhhYxRZBOKW9GXdBeIs8yxAK5WOcnwiPvXvQ,8048
|
|
189
|
+
kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json,sha256=Lv_spato7A2JUe-sSMCedu9qQ9ru5-MQrIct6qXkBrI,12725
|
|
190
|
+
kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json,sha256=r7jqB-HnDrQizaO6kup2U1QoSba9Ni20X-Hp0QvvB9c,4547
|
|
191
|
+
kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json,sha256=Lv4EWrf02DY97cb7GtCSEUp1npuzXy0oFsR9XfxIZrE,4405
|
|
192
|
+
kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json,sha256=VHmE3Q3s1OZ3rVHCqD3zGp4ajkr9Cz1D9OmWHSpQwaE,4405
|
|
193
|
+
kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json,sha256=fgeaQKOHvFz7GAVG9lNtG0YIDk3urotYAkpsOf_sEII,11773
|
|
194
|
+
kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json,sha256=q2l1oI32UR0BFzTG7ReHg5rSP9AF9cWMz5kzqZbe5Z0,11836
|
|
195
|
+
kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json,sha256=RDKym90HdXS9yh54y-rI__ZyhBTjNNMrdxW4Dt08sb0,9849
|
|
196
|
+
kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json,sha256=qP7Eak0PHlemZ-eJihPKr3yPwA1zOof1T68shtkoJ6o,8709
|
|
197
|
+
kasa/tests/smart/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
198
|
+
kasa/tests/smart/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
199
|
+
kasa/tests/smart/features/test_brightness.py,sha256=u4gqitJlqEr_9M1QrvefQ7MyA-CuPQDo_d8JH1Gb2CA,1644
|
|
200
|
+
kasa/tests/smart/features/test_colortemp.py,sha256=LBZ-ijLdVXovH_GO3kcD3htp6rn6Zf0yk0qKi0_vKio,992
|
|
201
|
+
kasa/tests/smart/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
202
|
+
kasa/tests/smart/modules/test_contact.py,sha256=a-NRdPgtIHyb97DIVqFyMHUdyUOgcUoPsSH4Y4RKh6Q,698
|
|
203
|
+
kasa/tests/smart/modules/test_fan.py,sha256=miw2oxJ2_1LRFpzEGxzDMo_LRu4w_Q9ofwt6Gyn-BqQ,2076
|
|
204
|
+
kasa/tests/smart/modules/test_firmware.py,sha256=AUImLF49GSVRJbX4P4U0SC4YFkkoQViwHOYaYAy4Cko,3296
|
|
205
|
+
kasa/tests/smart/modules/test_humidity.py,sha256=vxpunr-2N1KiciTE59EcDUMczL_IWjn0wWLUa43nPpQ,715
|
|
206
|
+
kasa/tests/smart/modules/test_light_effect.py,sha256=xp1VzUK9BwQjIxrIYWsVhEsd4R92H9wmOCgcXDoV0dI,1393
|
|
207
|
+
kasa/tests/smart/modules/test_temperature.py,sha256=MJy4T5HSKl0tzgLADvTS1P2V9-Kq6skOEBlb6fVvt8I,1361
|
|
208
|
+
kasa/tests/smart/modules/test_temperaturecontrol.py,sha256=_g7WAp1dkXWWP_8g633Z_LzgEdYDr1xW_XHSg96Pe7k,4145
|
|
209
|
+
kasa/tests/smart/modules/test_waterleak.py,sha256=IeMts3JTj84npChuP3A0sjqt50ZwuhroZOgsYqtN4CU,1156
|
|
210
|
+
kasa/tests/test_aestransport.py,sha256=fbSz7lmya1X6oF0DC3D8Ptf9eNNWTFGTBCd7jqkUq2c,14157
|
|
211
|
+
kasa/tests/test_bulb.py,sha256=cXWocAvA8NZHVk0bB9_c3nsUFBV1tHP5ckVo7QN1irI,11542
|
|
212
|
+
kasa/tests/test_childdevice.py,sha256=FWCfvkk_87QEvIfmheHkIhMM6MnJIaLpBz3flp_uLBs,2648
|
|
213
|
+
kasa/tests/test_cli.py,sha256=iO7JnZvbdnaVYQ2XX_mUVKyCzcf6ZPvXPUY3Cpxxmtg,26215
|
|
214
|
+
kasa/tests/test_common_modules.py,sha256=IoGkKmT2woBBXhovmCUx-xR-HFjwYc4rEO5PqzQ2nRA,6608
|
|
215
|
+
kasa/tests/test_device.py,sha256=ggOKejL5vP9nWmtFOtRJc3BdYnOiNKM1dl-EsUm1_NA,9012
|
|
216
|
+
kasa/tests/test_device_factory.py,sha256=YQ0gsoCXGx0Iy2dY2DvKApQ4rVfrnU4hjlTHVudicws,5646
|
|
217
|
+
kasa/tests/test_device_type.py,sha256=QiAHVsPbs1lR8mXXvq1IJ4n1OAIs0pmMekjVSTxfp1o,872
|
|
218
|
+
kasa/tests/test_deviceconfig.py,sha256=uhsZDe3lJhIoUdXEEBe0JYri1lNf8dbWHN7mJWHX4J0,2318
|
|
219
|
+
kasa/tests/test_dimmer.py,sha256=SPe7H-agkaUuhhefcTR6-uh0-pbTBCgF9aqZDQBTCDE,3860
|
|
220
|
+
kasa/tests/test_discovery.py,sha256=RqxicftylgUr_9dRdvYO5V9iGtEPiqTbk0kZnAUmaCQ,16719
|
|
221
|
+
kasa/tests/test_emeter.py,sha256=DEjU7CR8gMO0uF1fyB7jwmS38kiDtWiQ9fXAPrzyOU8,4718
|
|
222
|
+
kasa/tests/test_feature.py,sha256=hXIw9LgyyLOAHlOh8w2nYH3RM5NfKJbVAN-HJIIcVXY,6853
|
|
223
|
+
kasa/tests/test_httpclient.py,sha256=hFMwW9k8ldbR8x2JusnRJNXtBZjGHMaEVswgbx0rie4,2730
|
|
224
|
+
kasa/tests/test_iotdevice.py,sha256=yKA5K2RLB50DyQ1nHWmCoe6pGhZ3QV3CvB8WeLaiGYs,7703
|
|
225
|
+
kasa/tests/test_klapprotocol.py,sha256=bjXU1uxLdlXJXf0e1nhGAjErDN9-qaWC5oY0k0HCDz0,16974
|
|
226
|
+
kasa/tests/test_lightstrip.py,sha256=GvjrFyWP8A5UahrHDMCetmLzfZKWe1R8jWBdQf3tWI0,2193
|
|
227
|
+
kasa/tests/test_plug.py,sha256=GOfU-mVSSPuakHoATbg5iJVVMbqGZl6ZCrWSpqshAkw,1859
|
|
228
|
+
kasa/tests/test_protocol.py,sha256=eHkr9iF2SnlWnyxzb3ECS68r53GBK6Z1SW37G8QHSv8,19578
|
|
229
|
+
kasa/tests/test_readme_examples.py,sha256=8DX4inQnod_WpRvA8LR9MAxwd-lnJ8gsNgE_XDOvMcs,4899
|
|
230
|
+
kasa/tests/test_smartdevice.py,sha256=WTcFBbIrvw4AVWhkpAh8mwXOrGus9xArxYv_6WlPZEI,7381
|
|
231
|
+
kasa/tests/test_smartprotocol.py,sha256=ZFc5HnQU--VN82S7IPiOO1K5iRUEqFfVPhtcnrSVOlk,10265
|
|
232
|
+
kasa/tests/test_strip.py,sha256=OnfPMX1gifWl1-LG_nMvnKheRJvjiRB7YpbjG53kdqs,4286
|
|
233
|
+
kasa/tests/test_usage.py,sha256=ypM6O_KEpmI3Mw9FRPf045S-FefOKqpM-BF0px6ca6M,2331
|
|
234
|
+
kasa/xortransport.py,sha256=W0wCWqMHUqkPQqj71JRUFzMxZIzkIxUdFqlXgYP_olc,8530
|
|
235
|
+
python_kasa-0.7.0.dev0.dist-info/LICENSE,sha256=Klt9aEsei738epLgYqeikhpdBWwMvU1VAli14Bxlc5c,33218
|
|
236
|
+
python_kasa-0.7.0.dev0.dist-info/METADATA,sha256=m93k6CpCK45nPWkj1XJlydgQXIwihuOkPWwyHf4iwQs,13203
|
|
237
|
+
python_kasa-0.7.0.dev0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
238
|
+
python_kasa-0.7.0.dev0.dist-info/entry_points.txt,sha256=RlTlZyXOxJ_r2Ap7lpuPAWyYUud9RfVBnOklBvUKPVA,37
|
|
239
|
+
python_kasa-0.7.0.dev0.dist-info/RECORD,,
|
kasa/modules/emeter.py
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"""Implementation of the emeter module."""
|
|
2
|
-
from datetime import datetime
|
|
3
|
-
from typing import Dict, List, Optional, Union
|
|
4
|
-
|
|
5
|
-
from ..emeterstatus import EmeterStatus
|
|
6
|
-
from .usage import Usage
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Emeter(Usage):
|
|
10
|
-
"""Emeter module."""
|
|
11
|
-
|
|
12
|
-
@property # type: ignore
|
|
13
|
-
def realtime(self) -> EmeterStatus:
|
|
14
|
-
"""Return current energy readings."""
|
|
15
|
-
return EmeterStatus(self.data["get_realtime"])
|
|
16
|
-
|
|
17
|
-
@property
|
|
18
|
-
def emeter_today(self) -> Optional[float]:
|
|
19
|
-
"""Return today's energy consumption in kWh."""
|
|
20
|
-
raw_data = self.daily_data
|
|
21
|
-
today = datetime.now().day
|
|
22
|
-
data = self._convert_stat_data(raw_data, entry_key="day", key=today)
|
|
23
|
-
return data.get(today)
|
|
24
|
-
|
|
25
|
-
@property
|
|
26
|
-
def emeter_this_month(self) -> Optional[float]:
|
|
27
|
-
"""Return this month's energy consumption in kWh."""
|
|
28
|
-
raw_data = self.monthly_data
|
|
29
|
-
current_month = datetime.now().month
|
|
30
|
-
data = self._convert_stat_data(raw_data, entry_key="month", key=current_month)
|
|
31
|
-
return data.get(current_month)
|
|
32
|
-
|
|
33
|
-
async def erase_stats(self):
|
|
34
|
-
"""Erase all stats.
|
|
35
|
-
|
|
36
|
-
Uses different query than usage meter.
|
|
37
|
-
"""
|
|
38
|
-
return await self.call("erase_emeter_stat")
|
|
39
|
-
|
|
40
|
-
async def get_realtime(self):
|
|
41
|
-
"""Return real-time statistics."""
|
|
42
|
-
return await self.call("get_realtime")
|
|
43
|
-
|
|
44
|
-
async def get_daystat(self, *, year=None, month=None, kwh=True) -> Dict:
|
|
45
|
-
"""Return daily stats for the given year & month.
|
|
46
|
-
|
|
47
|
-
The return value is a dictionary of {day: energy, ...}.
|
|
48
|
-
"""
|
|
49
|
-
data = await self.get_raw_daystat(year=year, month=month)
|
|
50
|
-
data = self._convert_stat_data(data["day_list"], entry_key="day", kwh=kwh)
|
|
51
|
-
return data
|
|
52
|
-
|
|
53
|
-
async def get_monthstat(self, *, year=None, kwh=True) -> Dict:
|
|
54
|
-
"""Return monthly stats for the given year.
|
|
55
|
-
|
|
56
|
-
The return value is a dictionary of {month: energy, ...}.
|
|
57
|
-
"""
|
|
58
|
-
data = await self.get_raw_monthstat(year=year)
|
|
59
|
-
data = self._convert_stat_data(data["month_list"], entry_key="month", kwh=kwh)
|
|
60
|
-
return data
|
|
61
|
-
|
|
62
|
-
def _convert_stat_data(
|
|
63
|
-
self,
|
|
64
|
-
data: List[Dict[str, Union[int, float]]],
|
|
65
|
-
entry_key: str,
|
|
66
|
-
kwh: bool = True,
|
|
67
|
-
key: Optional[int] = None,
|
|
68
|
-
) -> Dict[Union[int, float], Union[int, float]]:
|
|
69
|
-
"""Return emeter information keyed with the day/month.
|
|
70
|
-
|
|
71
|
-
The incoming data is a list of dictionaries::
|
|
72
|
-
|
|
73
|
-
[{'year': int,
|
|
74
|
-
'month': int,
|
|
75
|
-
'day': int, <-- for get_daystat not get_monthstat
|
|
76
|
-
'energy_wh': int, <-- for emeter in some versions (wh)
|
|
77
|
-
'energy': float <-- for emeter in other versions (kwh)
|
|
78
|
-
}, ...]
|
|
79
|
-
|
|
80
|
-
:return: a dictionary keyed by day or month with energy as the value.
|
|
81
|
-
"""
|
|
82
|
-
if not data:
|
|
83
|
-
return {}
|
|
84
|
-
|
|
85
|
-
scale: float = 1
|
|
86
|
-
|
|
87
|
-
if "energy_wh" in data[0]:
|
|
88
|
-
value_key = "energy_wh"
|
|
89
|
-
if kwh:
|
|
90
|
-
scale = 1 / 1000
|
|
91
|
-
else:
|
|
92
|
-
value_key = "energy"
|
|
93
|
-
if not kwh:
|
|
94
|
-
scale = 1000
|
|
95
|
-
|
|
96
|
-
if key is None:
|
|
97
|
-
# Return all the data
|
|
98
|
-
return {entry[entry_key]: entry[value_key] * scale for entry in data}
|
|
99
|
-
|
|
100
|
-
# In this case we want a specific key in the data
|
|
101
|
-
# i.e. the current day or month.
|
|
102
|
-
#
|
|
103
|
-
# Since we usually want the data at the end of the list so we can
|
|
104
|
-
# optimize the search by starting at the end and avoid scaling
|
|
105
|
-
# the data we don't need.
|
|
106
|
-
#
|
|
107
|
-
for entry in reversed(data):
|
|
108
|
-
if entry[entry_key] == key:
|
|
109
|
-
return {entry[entry_key]: entry[value_key] * scale}
|
|
110
|
-
|
|
111
|
-
return {}
|
kasa/smartlightstrip.py
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"""Module for light strips (KL430)."""
|
|
2
|
-
from typing import Any, Dict, List, Optional
|
|
3
|
-
|
|
4
|
-
from .deviceconfig import DeviceConfig
|
|
5
|
-
from .effects import EFFECT_MAPPING_V1, EFFECT_NAMES_V1
|
|
6
|
-
from .protocol import BaseProtocol
|
|
7
|
-
from .smartbulb import SmartBulb
|
|
8
|
-
from .smartdevice import DeviceType, SmartDeviceException, requires_update
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class SmartLightStrip(SmartBulb):
|
|
12
|
-
"""Representation of a TP-Link Smart light strip.
|
|
13
|
-
|
|
14
|
-
Light strips work similarly to bulbs, but use a different service for controlling,
|
|
15
|
-
and expose some extra information (such as length and active effect).
|
|
16
|
-
This class extends :class:`SmartBulb` interface.
|
|
17
|
-
|
|
18
|
-
Examples:
|
|
19
|
-
>>> import asyncio
|
|
20
|
-
>>> strip = SmartLightStrip("127.0.0.1")
|
|
21
|
-
>>> asyncio.run(strip.update())
|
|
22
|
-
>>> print(strip.alias)
|
|
23
|
-
KL430 pantry lightstrip
|
|
24
|
-
|
|
25
|
-
Getting the length of the strip:
|
|
26
|
-
|
|
27
|
-
>>> strip.length
|
|
28
|
-
16
|
|
29
|
-
|
|
30
|
-
Currently active effect:
|
|
31
|
-
|
|
32
|
-
>>> strip.effect
|
|
33
|
-
{'brightness': 50, 'custom': 0, 'enable': 0, 'id': '', 'name': ''}
|
|
34
|
-
|
|
35
|
-
.. note::
|
|
36
|
-
The device supports some features that are not currently implemented,
|
|
37
|
-
feel free to find out how to control them and create a PR!
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
See :class:`SmartBulb` for more examples.
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
LIGHT_SERVICE = "smartlife.iot.lightStrip"
|
|
44
|
-
SET_LIGHT_METHOD = "set_light_state"
|
|
45
|
-
|
|
46
|
-
def __init__(
|
|
47
|
-
self,
|
|
48
|
-
host: str,
|
|
49
|
-
*,
|
|
50
|
-
config: Optional[DeviceConfig] = None,
|
|
51
|
-
protocol: Optional[BaseProtocol] = None,
|
|
52
|
-
) -> None:
|
|
53
|
-
super().__init__(host=host, config=config, protocol=protocol)
|
|
54
|
-
self._device_type = DeviceType.LightStrip
|
|
55
|
-
|
|
56
|
-
@property # type: ignore
|
|
57
|
-
@requires_update
|
|
58
|
-
def length(self) -> int:
|
|
59
|
-
"""Return length of the strip."""
|
|
60
|
-
return self.sys_info["length"]
|
|
61
|
-
|
|
62
|
-
@property # type: ignore
|
|
63
|
-
@requires_update
|
|
64
|
-
def effect(self) -> Dict:
|
|
65
|
-
"""Return effect state.
|
|
66
|
-
|
|
67
|
-
Example:
|
|
68
|
-
{'brightness': 50,
|
|
69
|
-
'custom': 0,
|
|
70
|
-
'enable': 0,
|
|
71
|
-
'id': '',
|
|
72
|
-
'name': ''}
|
|
73
|
-
"""
|
|
74
|
-
return self.sys_info["lighting_effect_state"]
|
|
75
|
-
|
|
76
|
-
@property # type: ignore
|
|
77
|
-
@requires_update
|
|
78
|
-
def effect_list(self) -> Optional[List[str]]:
|
|
79
|
-
"""Return built-in effects list.
|
|
80
|
-
|
|
81
|
-
Example:
|
|
82
|
-
['Aurora', 'Bubbling Cauldron', ...]
|
|
83
|
-
"""
|
|
84
|
-
return EFFECT_NAMES_V1 if self.has_effects else None
|
|
85
|
-
|
|
86
|
-
@property # type: ignore
|
|
87
|
-
@requires_update
|
|
88
|
-
def state_information(self) -> Dict[str, Any]:
|
|
89
|
-
"""Return strip specific state information."""
|
|
90
|
-
info = super().state_information
|
|
91
|
-
|
|
92
|
-
info["Length"] = self.length
|
|
93
|
-
if self.has_effects:
|
|
94
|
-
info["Effect"] = self.effect["name"]
|
|
95
|
-
|
|
96
|
-
return info
|
|
97
|
-
|
|
98
|
-
@requires_update
|
|
99
|
-
async def set_effect(
|
|
100
|
-
self,
|
|
101
|
-
effect: str,
|
|
102
|
-
*,
|
|
103
|
-
brightness: Optional[int] = None,
|
|
104
|
-
transition: Optional[int] = None,
|
|
105
|
-
) -> None:
|
|
106
|
-
"""Set an effect on the device.
|
|
107
|
-
|
|
108
|
-
If brightness or transition is defined,
|
|
109
|
-
its value will be used instead of the effect-specific default.
|
|
110
|
-
|
|
111
|
-
See :meth:`effect_list` for available effects,
|
|
112
|
-
or use :meth:`set_custom_effect` for custom effects.
|
|
113
|
-
|
|
114
|
-
:param str effect: The effect to set
|
|
115
|
-
:param int brightness: The wanted brightness
|
|
116
|
-
:param int transition: The wanted transition time
|
|
117
|
-
"""
|
|
118
|
-
if effect not in EFFECT_MAPPING_V1:
|
|
119
|
-
raise SmartDeviceException(f"The effect {effect} is not a built in effect.")
|
|
120
|
-
effect_dict = EFFECT_MAPPING_V1[effect]
|
|
121
|
-
if brightness is not None:
|
|
122
|
-
effect_dict["brightness"] = brightness
|
|
123
|
-
if transition is not None:
|
|
124
|
-
effect_dict["transition"] = transition
|
|
125
|
-
|
|
126
|
-
await self.set_custom_effect(effect_dict)
|
|
127
|
-
|
|
128
|
-
@requires_update
|
|
129
|
-
async def set_custom_effect(
|
|
130
|
-
self,
|
|
131
|
-
effect_dict: Dict,
|
|
132
|
-
) -> None:
|
|
133
|
-
"""Set a custom effect on the device.
|
|
134
|
-
|
|
135
|
-
:param str effect_dict: The custom effect dict to set
|
|
136
|
-
"""
|
|
137
|
-
if not self.has_effects:
|
|
138
|
-
raise SmartDeviceException("Bulb does not support effects.")
|
|
139
|
-
await self._query_helper(
|
|
140
|
-
"smartlife.iot.lighting_effect",
|
|
141
|
-
"set_lighting_effect",
|
|
142
|
-
effect_dict,
|
|
143
|
-
)
|
kasa/smartplug.py
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"""Module for smart plugs (HS100, HS110, ..)."""
|
|
2
|
-
import logging
|
|
3
|
-
from typing import Any, Dict, Optional
|
|
4
|
-
|
|
5
|
-
from kasa.deviceconfig import DeviceConfig
|
|
6
|
-
from kasa.modules import Antitheft, Cloud, Schedule, Time, Usage
|
|
7
|
-
from kasa.protocol import BaseProtocol
|
|
8
|
-
from kasa.smartdevice import DeviceType, SmartDevice, requires_update
|
|
9
|
-
|
|
10
|
-
_LOGGER = logging.getLogger(__name__)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class SmartPlug(SmartDevice):
|
|
14
|
-
r"""Representation of a TP-Link Smart Switch.
|
|
15
|
-
|
|
16
|
-
To initialize, you have to await :func:`update()` at least once.
|
|
17
|
-
This will allow accessing the properties using the exposed properties.
|
|
18
|
-
|
|
19
|
-
All changes to the device are done using awaitable methods,
|
|
20
|
-
which will not change the cached values,
|
|
21
|
-
but you must await :func:`update()` separately.
|
|
22
|
-
|
|
23
|
-
Errors reported by the device are raised as :class:`SmartDeviceException`\s,
|
|
24
|
-
and should be handled by the user of the library.
|
|
25
|
-
|
|
26
|
-
Examples:
|
|
27
|
-
>>> import asyncio
|
|
28
|
-
>>> plug = SmartPlug("127.0.0.1")
|
|
29
|
-
>>> asyncio.run(plug.update())
|
|
30
|
-
>>> plug.alias
|
|
31
|
-
Kitchen
|
|
32
|
-
|
|
33
|
-
Setting the LED state:
|
|
34
|
-
|
|
35
|
-
>>> asyncio.run(plug.set_led(True))
|
|
36
|
-
>>> asyncio.run(plug.update())
|
|
37
|
-
>>> plug.led
|
|
38
|
-
True
|
|
39
|
-
|
|
40
|
-
For more examples, see the :class:`SmartDevice` class.
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
def __init__(
|
|
44
|
-
self,
|
|
45
|
-
host: str,
|
|
46
|
-
*,
|
|
47
|
-
config: Optional[DeviceConfig] = None,
|
|
48
|
-
protocol: Optional[BaseProtocol] = None,
|
|
49
|
-
) -> None:
|
|
50
|
-
super().__init__(host=host, config=config, protocol=protocol)
|
|
51
|
-
self._device_type = DeviceType.Plug
|
|
52
|
-
self.add_module("schedule", Schedule(self, "schedule"))
|
|
53
|
-
self.add_module("usage", Usage(self, "schedule"))
|
|
54
|
-
self.add_module("antitheft", Antitheft(self, "anti_theft"))
|
|
55
|
-
self.add_module("time", Time(self, "time"))
|
|
56
|
-
self.add_module("cloud", Cloud(self, "cnCloud"))
|
|
57
|
-
|
|
58
|
-
@property # type: ignore
|
|
59
|
-
@requires_update
|
|
60
|
-
def is_on(self) -> bool:
|
|
61
|
-
"""Return whether device is on."""
|
|
62
|
-
sys_info = self.sys_info
|
|
63
|
-
return bool(sys_info["relay_state"])
|
|
64
|
-
|
|
65
|
-
async def turn_on(self, **kwargs):
|
|
66
|
-
"""Turn the switch on."""
|
|
67
|
-
return await self._query_helper("system", "set_relay_state", {"state": 1})
|
|
68
|
-
|
|
69
|
-
async def turn_off(self, **kwargs):
|
|
70
|
-
"""Turn the switch off."""
|
|
71
|
-
return await self._query_helper("system", "set_relay_state", {"state": 0})
|
|
72
|
-
|
|
73
|
-
@property # type: ignore
|
|
74
|
-
@requires_update
|
|
75
|
-
def led(self) -> bool:
|
|
76
|
-
"""Return the state of the led."""
|
|
77
|
-
sys_info = self.sys_info
|
|
78
|
-
return bool(1 - sys_info["led_off"])
|
|
79
|
-
|
|
80
|
-
async def set_led(self, state: bool):
|
|
81
|
-
"""Set the state of the led (night mode)."""
|
|
82
|
-
return await self._query_helper(
|
|
83
|
-
"system", "set_led_off", {"off": int(not state)}
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
@property # type: ignore
|
|
87
|
-
@requires_update
|
|
88
|
-
def state_information(self) -> Dict[str, Any]:
|
|
89
|
-
"""Return switch-specific state information."""
|
|
90
|
-
info = {"LED state": self.led, "On since": self.on_since}
|
|
91
|
-
return info
|
kasa/tapo/__init__.py
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"""Package for supporting tapo-branded and newer kasa devices."""
|
|
2
|
-
from .childdevice import ChildDevice
|
|
3
|
-
from .tapobulb import TapoBulb
|
|
4
|
-
from .tapodevice import TapoDevice
|
|
5
|
-
from .tapoplug import TapoPlug
|
|
6
|
-
|
|
7
|
-
__all__ = ["TapoDevice", "TapoPlug", "TapoBulb", "ChildDevice"]
|
kasa/tapo/childdevice.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"""Child device implementation."""
|
|
2
|
-
from typing import Optional
|
|
3
|
-
|
|
4
|
-
from ..device_type import DeviceType
|
|
5
|
-
from ..deviceconfig import DeviceConfig
|
|
6
|
-
from ..smartprotocol import SmartProtocol, _ChildProtocolWrapper
|
|
7
|
-
from .tapodevice import TapoDevice
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ChildDevice(TapoDevice):
|
|
11
|
-
"""Presentation of a child device.
|
|
12
|
-
|
|
13
|
-
This wraps the protocol communications and sets internal data for the child.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
def __init__(
|
|
17
|
-
self,
|
|
18
|
-
parent: TapoDevice,
|
|
19
|
-
child_id: str,
|
|
20
|
-
config: Optional[DeviceConfig] = None,
|
|
21
|
-
protocol: Optional[SmartProtocol] = None,
|
|
22
|
-
) -> None:
|
|
23
|
-
super().__init__(parent.host, config=parent.config, protocol=parent.protocol)
|
|
24
|
-
self._parent = parent
|
|
25
|
-
self._id = child_id
|
|
26
|
-
self.protocol = _ChildProtocolWrapper(child_id, parent.protocol)
|
|
27
|
-
# TODO: remove the assignment after modularization is done,
|
|
28
|
-
# currently required to allow accessing time-related properties
|
|
29
|
-
self._time = parent._time
|
|
30
|
-
self._device_type = DeviceType.StripSocket
|
|
31
|
-
|
|
32
|
-
async def update(self, update_children: bool = True):
|
|
33
|
-
"""Noop update. The parent updates our internals."""
|
|
34
|
-
|
|
35
|
-
def update_internal_state(self, info):
|
|
36
|
-
"""Set internal state for the child."""
|
|
37
|
-
# TODO: cleanup the _last_update, _sys_info, _info, _data mess.
|
|
38
|
-
self._last_update = self._sys_info = self._info = info
|
|
39
|
-
|
|
40
|
-
def __repr__(self):
|
|
41
|
-
return f"<ChildDevice {self.alias} of {self._parent}>"
|