python-kasa 0.7.6__tar.gz → 0.7.7__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.
Files changed (361) hide show
  1. {python_kasa-0.7.6 → python_kasa-0.7.7}/CHANGELOG.md +32 -1
  2. {python_kasa-0.7.6 → python_kasa-0.7.7}/PKG-INFO +1 -1
  3. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/smartcamerarequests.py +2 -0
  4. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/parse_pcap_klap.py +65 -68
  5. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/__init__.py +5 -4
  6. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/device.py +10 -0
  7. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/discover.py +11 -2
  8. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device.py +2 -2
  9. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device_factory.py +5 -3
  10. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/discover.py +38 -8
  11. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/energy.py +1 -1
  12. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotdevice.py +2 -2
  13. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotplug.py +10 -1
  14. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/ambientlight.py +28 -10
  15. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/motion.py +36 -8
  16. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/module.py +4 -0
  17. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/__init__.py +4 -0
  18. python_kasa-0.7.7/kasa/smart/modules/childprotection.py +41 -0
  19. python_kasa-0.7.7/kasa/smart/modules/triggerlogs.py +34 -0
  20. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartchilddevice.py +3 -4
  21. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_smart.py +16 -4
  22. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200B(US)_1.0_1.12.0.json +11 -3
  23. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(US)_1.0_1.9.0.json +7 -2
  24. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T310(US)_1.0_1.5.0.json +10 -5
  25. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T315(US)_1.0_1.8.0.json +10 -5
  26. python_kasa-0.7.7/kasa/tests/fixtures/smartcamera/C210(EU)_2.0_1.4.3.json +962 -0
  27. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/H200(EU)_1.0_1.3.2.json +177 -8
  28. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/H200(US)_1.0_1.3.6.json +66 -35
  29. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/TC65_1.0_1.3.9.json +135 -7
  30. python_kasa-0.7.7/kasa/tests/iot/modules/test_ambientlight.py +46 -0
  31. python_kasa-0.7.7/kasa/tests/iot/modules/test_motion.py +57 -0
  32. python_kasa-0.7.7/kasa/tests/iot/test_wallswitch.py +9 -0
  33. python_kasa-0.7.7/kasa/tests/smart/modules/test_childprotection.py +43 -0
  34. python_kasa-0.7.7/kasa/tests/smartcamera/__init__.py +0 -0
  35. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_cli.py +9 -1
  36. {python_kasa-0.7.6 → python_kasa-0.7.7}/pyproject.toml +1 -1
  37. {python_kasa-0.7.6 → python_kasa-0.7.7}/.gitignore +0 -0
  38. {python_kasa-0.7.6 → python_kasa-0.7.7}/LICENSE +0 -0
  39. {python_kasa-0.7.6 → python_kasa-0.7.7}/README.md +0 -0
  40. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/README.md +0 -0
  41. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/__init__.py +0 -0
  42. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/benchmark.py +0 -0
  43. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/__init__.py +0 -0
  44. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/data.py +0 -0
  45. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/original.py +0 -0
  46. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/create_module_fixtures.py +0 -0
  47. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/dump_devinfo.py +0 -0
  48. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/generate_supported.py +0 -0
  49. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/__init__.py +0 -0
  50. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/smartrequests.py +0 -0
  51. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/parse_pcap.py +0 -0
  52. {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/perftest.py +0 -0
  53. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/Makefile +0 -0
  54. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/make.bat +0 -0
  55. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/SUPPORTED.md +0 -0
  56. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/_static/copybutton.js +0 -0
  57. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/cli.rst +0 -0
  58. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/codeinfo.md +0 -0
  59. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/conf.py +0 -0
  60. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/contribute.md +0 -0
  61. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/deprecated.md +0 -0
  62. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/connect.md +0 -0
  63. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/device.md +0 -0
  64. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/discover.md +0 -0
  65. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/energy.md +0 -0
  66. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/feature.md +0 -0
  67. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/light.md +0 -0
  68. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/module.md +0 -0
  69. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/strip.md +0 -0
  70. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides.md +0 -0
  71. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/index.md +0 -0
  72. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/library.md +0 -0
  73. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/reference.md +0 -0
  74. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartbulb.rst +0 -0
  75. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartdevice.rst +0 -0
  76. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartdimmer.rst +0 -0
  77. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartlightstrip.rst +0 -0
  78. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartplug.rst +0 -0
  79. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartstrip.rst +0 -0
  80. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/topics.md +0 -0
  81. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/tutorial.md +0 -0
  82. {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/tutorial.py +0 -0
  83. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/aestransport.py +0 -0
  84. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cachedzoneinfo.py +0 -0
  85. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/__init__.py +0 -0
  86. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/__main__.py +0 -0
  87. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/common.py +0 -0
  88. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/feature.py +0 -0
  89. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/lazygroup.py +0 -0
  90. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/light.py +0 -0
  91. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/main.py +0 -0
  92. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/schedule.py +0 -0
  93. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/time.py +0 -0
  94. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/usage.py +0 -0
  95. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/wifi.py +0 -0
  96. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/credentials.py +0 -0
  97. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device_type.py +0 -0
  98. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/deviceconfig.py +0 -0
  99. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/emeterstatus.py +0 -0
  100. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/exceptions.py +0 -0
  101. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/__init__.py +0 -0
  102. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/__init__.py +0 -0
  103. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/camera.py +0 -0
  104. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/childdevice.py +0 -0
  105. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/device.py +0 -0
  106. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/time.py +0 -0
  107. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcamera.py +0 -0
  108. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcameramodule.py +0 -0
  109. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcameraprotocol.py +0 -0
  110. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/sslaestransport.py +0 -0
  111. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/feature.py +0 -0
  112. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/httpclient.py +0 -0
  113. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/__init__.py +0 -0
  114. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/fan.py +0 -0
  115. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/led.py +0 -0
  116. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/light.py +0 -0
  117. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/lighteffect.py +0 -0
  118. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/lightpreset.py +0 -0
  119. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/time.py +0 -0
  120. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/__init__.py +0 -0
  121. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/effects.py +0 -0
  122. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotbulb.py +0 -0
  123. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotdimmer.py +0 -0
  124. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotlightstrip.py +0 -0
  125. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotmodule.py +0 -0
  126. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotstrip.py +0 -0
  127. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iottimezone.py +0 -0
  128. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/__init__.py +0 -0
  129. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/antitheft.py +0 -0
  130. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/cloud.py +0 -0
  131. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/countdown.py +0 -0
  132. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/emeter.py +0 -0
  133. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/led.py +0 -0
  134. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/light.py +0 -0
  135. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/lighteffect.py +0 -0
  136. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/lightpreset.py +0 -0
  137. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/rulemodule.py +0 -0
  138. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/schedule.py +0 -0
  139. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/time.py +0 -0
  140. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/usage.py +0 -0
  141. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iotprotocol.py +0 -0
  142. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/json.py +0 -0
  143. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/klaptransport.py +0 -0
  144. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/modulemapping.py +0 -0
  145. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/modulemapping.pyi +0 -0
  146. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/protocol.py +0 -0
  147. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/py.typed +0 -0
  148. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/__init__.py +0 -0
  149. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/effects.py +0 -0
  150. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/alarm.py +0 -0
  151. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/autooff.py +0 -0
  152. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/batterysensor.py +0 -0
  153. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/brightness.py +0 -0
  154. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/childdevice.py +0 -0
  155. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/cloud.py +0 -0
  156. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/color.py +0 -0
  157. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/colortemperature.py +0 -0
  158. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/contactsensor.py +0 -0
  159. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/devicemodule.py +0 -0
  160. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/energy.py +0 -0
  161. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/fan.py +0 -0
  162. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/firmware.py +0 -0
  163. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/frostprotection.py +0 -0
  164. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/humiditysensor.py +0 -0
  165. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/led.py +0 -0
  166. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/light.py +0 -0
  167. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lighteffect.py +0 -0
  168. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lightpreset.py +0 -0
  169. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lightstripeffect.py +0 -0
  170. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lighttransition.py +0 -0
  171. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/motionsensor.py +0 -0
  172. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/reportmode.py +0 -0
  173. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/temperaturecontrol.py +0 -0
  174. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/temperaturesensor.py +0 -0
  175. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/time.py +0 -0
  176. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/waterleaksensor.py +0 -0
  177. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartdevice.py +0 -0
  178. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartmodule.py +0 -0
  179. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smartprotocol.py +0 -0
  180. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/__init__.py +0 -0
  181. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/conftest.py +0 -0
  182. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/device_fixtures.py +0 -0
  183. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/discovery_fixtures.py +0 -0
  184. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_iot.py +0 -0
  185. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_smartcamera.py +0 -0
  186. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtureinfo.py +0 -0
  187. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
  188. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
  189. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
  190. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
  191. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
  192. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
  193. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
  194. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
  195. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
  196. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
  197. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
  198. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
  199. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
  200. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
  201. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
  202. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
  203. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
  204. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
  205. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
  206. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
  207. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
  208. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
  209. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
  210. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
  211. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
  212. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
  213. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
  214. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
  215. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
  216. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
  217. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
  218. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
  219. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json +0 -0
  220. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
  221. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
  222. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
  223. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
  224. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
  225. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
  226. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
  227. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
  228. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
  229. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
  230. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
  231. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
  232. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
  233. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
  234. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
  235. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
  236. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
  237. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
  238. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
  239. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
  240. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
  241. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
  242. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
  243. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
  244. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json +0 -0
  245. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json +0 -0
  246. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
  247. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
  248. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json +0 -0
  249. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json +0 -0
  250. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json +0 -0
  251. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
  252. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
  253. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
  254. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
  255. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
  256. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
  257. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
  258. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
  259. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
  260. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json +0 -0
  261. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json +0 -0
  262. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json +0 -0
  263. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
  264. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
  265. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
  266. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json +0 -0
  267. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
  268. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json +0 -0
  269. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
  270. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
  271. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
  272. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
  273. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
  274. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
  275. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
  276. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
  277. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
  278. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
  279. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
  280. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
  281. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
  282. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
  283. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.1.3.json +0 -0
  284. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
  285. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
  286. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
  287. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
  288. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
  289. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
  290. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
  291. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
  292. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
  293. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
  294. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
  295. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
  296. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
  297. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
  298. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
  299. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P304M(UK)_1.0_1.0.3.json +0 -0
  300. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
  301. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
  302. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
  303. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
  304. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
  305. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
  306. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
  307. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
  308. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200B(EU)_1.0_1.11.0.json +0 -0
  309. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200D(EU)_1.0_1.11.0.json +0 -0
  310. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200D(EU)_1.0_1.12.0.json +0 -0
  311. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T100(EU)_1.0_1.12.0.json +0 -0
  312. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
  313. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.9.0.json +0 -0
  314. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
  315. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
  316. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
  317. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/C210(EU)_2.0_1.4.2.json +0 -0
  318. {python_kasa-0.7.6/kasa/tests/smart → python_kasa-0.7.7/kasa/tests/iot/modules}/__init__.py +0 -0
  319. {python_kasa-0.7.6/kasa/tests/smart/features → python_kasa-0.7.7/kasa/tests/smart}/__init__.py +0 -0
  320. {python_kasa-0.7.6/kasa/tests/smart/modules → python_kasa-0.7.7/kasa/tests/smart/features}/__init__.py +0 -0
  321. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/features/test_brightness.py +0 -0
  322. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/features/test_colortemp.py +0 -0
  323. {python_kasa-0.7.6/kasa/tests/smartcamera → python_kasa-0.7.7/kasa/tests/smart/modules}/__init__.py +0 -0
  324. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_autooff.py +0 -0
  325. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_contact.py +0 -0
  326. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_fan.py +0 -0
  327. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_firmware.py +0 -0
  328. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_humidity.py +0 -0
  329. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_light_effect.py +0 -0
  330. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
  331. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
  332. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_motionsensor.py +0 -0
  333. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_temperature.py +0 -0
  334. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
  335. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_waterleak.py +0 -0
  336. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smartcamera/test_smartcamera.py +0 -0
  337. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_aestransport.py +0 -0
  338. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_bulb.py +0 -0
  339. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_childdevice.py +0 -0
  340. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_common_modules.py +0 -0
  341. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device.py +0 -0
  342. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device_factory.py +0 -0
  343. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device_type.py +0 -0
  344. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_deviceconfig.py +0 -0
  345. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_dimmer.py +0 -0
  346. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_discovery.py +0 -0
  347. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_emeter.py +0 -0
  348. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_feature.py +0 -0
  349. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_httpclient.py +0 -0
  350. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_iotdevice.py +0 -0
  351. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_klapprotocol.py +0 -0
  352. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_lightstrip.py +0 -0
  353. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_plug.py +0 -0
  354. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_protocol.py +0 -0
  355. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_readme_examples.py +0 -0
  356. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_smartdevice.py +0 -0
  357. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_smartprotocol.py +0 -0
  358. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_sslaestransport.py +0 -0
  359. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_strip.py +0 -0
  360. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_usage.py +0 -0
  361. {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/xortransport.py +0 -0
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.7](https://github.com/python-kasa/python-kasa/tree/0.7.7) (2024-11-04)
4
+
5
+ [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.6...0.7.7)
6
+
7
+ **Release summary:**
8
+
9
+ - Bugfix for child device device creation error with credentials_hash
10
+ - PIR support for iot dimmers and wall switches.
11
+ - Various small enhancements and project improvements.
12
+
13
+ **Implemented enhancements:**
14
+
15
+ - Add PIR&LAS for wall switches mentioning PIR support [\#1227](https://github.com/python-kasa/python-kasa/pull/1227) (@rytilahti)
16
+ - Expose ambient light setting for iot dimmers [\#1210](https://github.com/python-kasa/python-kasa/pull/1210) (@rytilahti)
17
+ - Expose PIR enabled setting for iot dimmers [\#1174](https://github.com/python-kasa/python-kasa/pull/1174) (@rytilahti)
18
+ - Add childprotection module [\#1141](https://github.com/python-kasa/python-kasa/pull/1141) (@rytilahti)
19
+ - Initial trigger logs implementation [\#900](https://github.com/python-kasa/python-kasa/pull/900) (@rytilahti)
20
+
21
+ **Fixed bugs:**
22
+
23
+ - Fix AES child device creation error [\#1220](https://github.com/python-kasa/python-kasa/pull/1220) (@sdb9696)
24
+
25
+ **Project maintenance:**
26
+
27
+ - Update TC65 fixture [\#1225](https://github.com/python-kasa/python-kasa/pull/1225) (@rytilahti)
28
+ - Update smartcamera fixtures from latest dump\_devinfo [\#1224](https://github.com/python-kasa/python-kasa/pull/1224) (@sdb9696)
29
+ - Add component queries to smartcamera devices [\#1223](https://github.com/python-kasa/python-kasa/pull/1223) (@sdb9696)
30
+ - Update try\_connect\_all to be more efficient and report attempts [\#1222](https://github.com/python-kasa/python-kasa/pull/1222) (@sdb9696)
31
+ - Use stacklevel=2 for warnings to report on callsites [\#1219](https://github.com/python-kasa/python-kasa/pull/1219) (@rytilahti)
32
+ - parse\_pcap\_klap: various code cleanups [\#1138](https://github.com/python-kasa/python-kasa/pull/1138) (@rytilahti)
33
+
3
34
  ## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6) (2024-10-29)
4
35
 
5
36
  [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.5...0.7.6)
@@ -45,7 +76,7 @@
45
76
 
46
77
  **Project maintenance:**
47
78
 
48
- - Fix mypy errors in parse_pcap_klap [\#1214](https://github.com/python-kasa/python-kasa/pull/1214) (@sdb9696)
79
+ - Fix mypy errors in parse\_pcap\_klap [\#1214](https://github.com/python-kasa/python-kasa/pull/1214) (@sdb9696)
49
80
  - Make HSV NamedTuple creation more efficient [\#1211](https://github.com/python-kasa/python-kasa/pull/1211) (@sdb9696)
50
81
  - dump\_devinfo: query get\_current\_brt for iot dimmers [\#1209](https://github.com/python-kasa/python-kasa/pull/1209) (@rytilahti)
51
82
  - Add trigger\_logs and double\_click to dump\_devinfo helper [\#1208](https://github.com/python-kasa/python-kasa/pull/1208) (@sdb9696)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-kasa
3
- Version: 0.7.6
3
+ Version: 0.7.7
4
4
  Summary: Python API for TP-Link Kasa and Tapo devices
5
5
  Project-URL: Homepage, https://github.com/python-kasa/python-kasa
6
6
  Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
@@ -52,6 +52,8 @@ SMARTCAMERA_REQUESTS: list[dict] = [
52
52
  {"getVideoCapability": {"video_capability": {"name": "main"}}},
53
53
  {"getTimezone": {"system": {"name": "basic"}}},
54
54
  {"getClockStatus": {"system": {"name": "clock_status"}}},
55
+ {"getAppComponentList": {"app_component": {"name": "app_component_list"}}},
56
+ {"getChildDeviceComponentList": {"childControl": {"start_index": 0}}},
55
57
  # single request only methods
56
58
  {"get": {"function": {"name": ["module_spec"]}}},
57
59
  {"get": {"cet": {"name": ["vhttpd"]}}},
@@ -29,6 +29,18 @@ from kasa.klaptransport import KlapEncryptionSession, KlapTransportV2
29
29
  from kasa.protocol import DEFAULT_CREDENTIALS, get_default_credentials
30
30
 
31
31
 
32
+ def _get_seq_from_query(packet):
33
+ """Return sequence number for the query."""
34
+ query = packet.http.get("request_uri_query")
35
+ if query is None:
36
+ raise Exception("No request_uri_query found")
37
+ # use regex to get: seq=(\d+)
38
+ seq = re.search(r"seq=(\d+)", query)
39
+ if seq is not None:
40
+ return int(seq.group(1))
41
+ raise Exception("Unable to find sequence number")
42
+
43
+
32
44
  def _is_http_response_for_packet(response, packet):
33
45
  """Return True if the *response* contains a response for request in *packet*.
34
46
 
@@ -41,10 +53,7 @@ def _is_http_response_for_packet(response, packet):
41
53
  ):
42
54
  return True
43
55
  # tshark 4.4.0
44
- if response.http.request_uri == packet.http.request_uri:
45
- return True
46
-
47
- return False
56
+ return response.http.request_uri == packet.http.request_uri
48
57
 
49
58
 
50
59
  class MyEncryptionSession(KlapEncryptionSession):
@@ -244,71 +253,59 @@ def main(
244
253
  if packet.ip.src != source_host:
245
254
  continue
246
255
  # we only care about http packets
247
- if hasattr(
248
- packet, "http"
249
- ): # this is redundant, as pyshark is set to only load http packets
250
- if hasattr(packet.http, "request_uri_path"):
251
- uri = packet.http.get("request_uri_path")
252
- elif hasattr(packet.http, "request_uri"):
253
- uri = packet.http.get("request_uri")
254
- else:
255
- uri = None
256
- if hasattr(packet.http, "request_uri_query"):
257
- query = packet.http.get("request_uri_query")
258
- # use regex to get: seq=(\d+)
259
- seq = re.search(r"seq=(\d+)", query)
260
- if seq is not None:
261
- operator.seq = int(
262
- seq.group(1)
263
- ) # grab the sequence number from the query
264
- data = (
265
- # Windows and linux file_data attribute returns different
266
- # pretty format so get the raw field value.
267
- packet.http.get_field_value("file_data", raw=True)
268
- if hasattr(packet.http, "file_data")
269
- else None
270
- )
271
- match uri:
272
- case "/app/request":
273
- if packet.ip.dst != device_ip:
274
- continue
275
- assert isinstance(data, str) # noqa: S101
276
- message = bytes.fromhex(data)
277
- try:
278
- plaintext = operator.decrypt(message)
279
- payload = json.loads(plaintext)
280
- print(json.dumps(payload, indent=2))
281
- packets.append(payload)
282
- except ValueError:
283
- print("Insufficient data to decrypt thus far")
284
-
285
- case "/app/handshake1":
286
- if packet.ip.dst != device_ip:
287
- continue
288
- assert isinstance(data, str) # noqa: S101
289
- message = bytes.fromhex(data)
290
- operator.local_seed = message
291
- response = None
292
- print(
293
- f"got handshake1 in {packet_number}, "
294
- f"looking for the response"
295
- )
296
- while (
297
- True
298
- ): # we are going to now look for the response to this request
299
- response = capture.next()
300
- if _is_http_response_for_packet(response, packet):
301
- print(f"found response in {packet_number}")
302
- break
303
- data = response.http.get_field_value("file_data", raw=True)
304
- message = bytes.fromhex(data)
305
- operator.remote_seed = message[0:16]
306
- operator.remote_auth_hash = message[16:]
307
-
308
- case "/app/handshake2":
309
- continue # we don't care about this
310
- case _:
256
+ # this is redundant, as pyshark is set to only load http packets
257
+ if not hasattr(packet, "http"):
258
+ continue
259
+
260
+ uri = packet.http.get("request_uri_path", packet.http.get("request_uri"))
261
+ if uri is None:
262
+ continue
263
+
264
+ operator.seq = _get_seq_from_query(packet)
265
+
266
+ # Windows and linux file_data attribute returns different
267
+ # pretty format so get the raw field value.
268
+ data = packet.http.get_field_value("file_data", raw=True)
269
+
270
+ match uri:
271
+ case "/app/request":
272
+ if packet.ip.dst != device_ip:
273
+ continue
274
+ message = bytes.fromhex(data)
275
+ try:
276
+ plaintext = operator.decrypt(message)
277
+ payload = json.loads(plaintext)
278
+ print(json.dumps(payload, indent=2))
279
+ packets.append(payload)
280
+ except ValueError:
281
+ print("Insufficient data to decrypt thus far")
282
+
283
+ case "/app/handshake1":
284
+ if packet.ip.dst != device_ip:
311
285
  continue
286
+ message = bytes.fromhex(data)
287
+ operator.local_seed = message
288
+ response = None
289
+ print(
290
+ f"got handshake1 in {packet_number}, "
291
+ f"looking for the response"
292
+ )
293
+ while (
294
+ True
295
+ ): # we are going to now look for the response to this request
296
+ response = capture.next()
297
+ if _is_http_response_for_packet(response, packet):
298
+ print(f"found response in {packet_number}")
299
+ break
300
+ data = response.http.get_field_value("file_data", raw=True)
301
+ message = bytes.fromhex(data)
302
+ operator.remote_seed = message[0:16]
303
+ operator.remote_auth_hash = message[16:]
304
+
305
+ case "/app/handshake2":
306
+ continue # we don't care about this
307
+ case _:
308
+ continue
312
309
  except StopIteration:
313
310
  break
314
311
 
@@ -41,7 +41,7 @@ from kasa.iotprotocol import (
41
41
  _deprecated_TPLinkSmartHomeProtocol, # noqa: F401
42
42
  )
43
43
  from kasa.module import Module
44
- from kasa.protocol import BaseProtocol
44
+ from kasa.protocol import BaseProtocol, BaseTransport
45
45
  from kasa.smartprotocol import SmartProtocol
46
46
 
47
47
  __version__ = version("python-kasa")
@@ -50,6 +50,7 @@ __version__ = version("python-kasa")
50
50
  __all__ = [
51
51
  "Discover",
52
52
  "BaseProtocol",
53
+ "BaseTransport",
53
54
  "IotProtocol",
54
55
  "SmartProtocol",
55
56
  "LightState",
@@ -102,7 +103,7 @@ deprecated_classes = {
102
103
 
103
104
  def __getattr__(name):
104
105
  if name in deprecated_names:
105
- warn(f"{name} is deprecated", DeprecationWarning, stacklevel=1)
106
+ warn(f"{name} is deprecated", DeprecationWarning, stacklevel=2)
106
107
  return globals()[f"_deprecated_{name}"]
107
108
  if name in deprecated_smart_devices:
108
109
  new_class = deprecated_smart_devices[name]
@@ -112,13 +113,13 @@ def __getattr__(name):
112
113
  + f"from package {package_name} instead or use Discover.discover_single()"
113
114
  + " and Device.connect() to support new protocols",
114
115
  DeprecationWarning,
115
- stacklevel=1,
116
+ stacklevel=2,
116
117
  )
117
118
  return new_class
118
119
  if name in deprecated_classes:
119
120
  new_class = deprecated_classes[name]
120
121
  msg = f"{name} is deprecated, use {new_class.__name__} instead"
121
- warn(msg, DeprecationWarning, stacklevel=1)
122
+ warn(msg, DeprecationWarning, stacklevel=2)
122
123
  return new_class
123
124
  raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
124
125
 
@@ -193,3 +193,13 @@ async def update_credentials(dev, username, password):
193
193
  click.confirm("Do you really want to replace the existing credentials?", abort=True)
194
194
 
195
195
  return await dev.update_credentials(username, password)
196
+
197
+
198
+ @device.command(name="logs")
199
+ @pass_dev_or_child
200
+ async def child_logs(dev):
201
+ """Print child device trigger logs."""
202
+ if logs := dev.modules.get(Module.TriggerLogs):
203
+ await dev.update(update_children=True)
204
+ for entry in logs.logs:
205
+ print(entry)
@@ -15,7 +15,7 @@ from kasa import (
15
15
  Discover,
16
16
  UnsupportedDeviceError,
17
17
  )
18
- from kasa.discover import DiscoveryResult
18
+ from kasa.discover import ConnectAttempt, DiscoveryResult
19
19
 
20
20
  from .common import echo, error
21
21
 
@@ -165,8 +165,17 @@ async def config(ctx):
165
165
 
166
166
  credentials = Credentials(username, password) if username and password else None
167
167
 
168
+ host_port = host + (f":{port}" if port else "")
169
+
170
+ def on_attempt(connect_attempt: ConnectAttempt, success: bool) -> None:
171
+ prot, tran, dev = connect_attempt
172
+ key_str = f"{prot.__name__} + {tran.__name__} + {dev.__name__}"
173
+ result = "succeeded" if success else "failed"
174
+ msg = f"Attempt to connect to {host_port} with {key_str} {result}"
175
+ echo(msg)
176
+
168
177
  dev = await Discover.try_connect_all(
169
- host, credentials=credentials, timeout=timeout, port=port
178
+ host, credentials=credentials, timeout=timeout, port=port, on_attempt=on_attempt
170
179
  )
171
180
  if dev:
172
181
  cparams = dev.config.connection_type
@@ -545,7 +545,7 @@ class Device(ABC):
545
545
  msg = f"{name} is deprecated"
546
546
  if module:
547
547
  msg += f", use: {module} in device.modules instead"
548
- warn(msg, DeprecationWarning, stacklevel=1)
548
+ warn(msg, DeprecationWarning, stacklevel=2)
549
549
  return self.device_type == dep_device_type_attr[1]
550
550
  # Other deprecated attributes
551
551
  if (dep_attr := self._deprecated_other_attributes.get(name)) and (
@@ -556,6 +556,6 @@ class Device(ABC):
556
556
  dev_or_mod = self.modules[mod] if mod else self
557
557
  replacing = f"Module.{mod} in device.modules" if mod else replacing_attr
558
558
  msg = f"{name} is deprecated, use: {replacing} instead"
559
- warn(msg, DeprecationWarning, stacklevel=1)
559
+ warn(msg, DeprecationWarning, stacklevel=2)
560
560
  return getattr(dev_or_mod, replacing_attr)
561
561
  raise AttributeError(f"Device has no attribute {name!r}")
@@ -167,7 +167,7 @@ def get_device_class_from_sys_info(sysinfo: dict[str, Any]) -> type[IotDevice]:
167
167
 
168
168
 
169
169
  def get_device_class_from_family(
170
- device_type: str, *, https: bool
170
+ device_type: str, *, https: bool, require_exact: bool = False
171
171
  ) -> type[Device] | None:
172
172
  """Return the device class from the type name."""
173
173
  supported_device_types: dict[str, type[Device]] = {
@@ -185,8 +185,10 @@ def get_device_class_from_family(
185
185
  }
186
186
  lookup_key = f"{device_type}{'.HTTPS' if https else ''}"
187
187
  if (
188
- cls := supported_device_types.get(lookup_key)
189
- ) is None and device_type.startswith("SMART."):
188
+ (cls := supported_device_types.get(lookup_key)) is None
189
+ and device_type.startswith("SMART.")
190
+ and not require_exact
191
+ ):
190
192
  _LOGGER.warning("Unknown SMART device with %s, using SmartDevice", device_type)
191
193
  cls = SmartDevice
192
194
 
@@ -91,7 +91,7 @@ import socket
91
91
  import struct
92
92
  from collections.abc import Awaitable
93
93
  from pprint import pformat as pf
94
- from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, cast
94
+ from typing import TYPE_CHECKING, Any, Callable, Dict, NamedTuple, Optional, Type, cast
95
95
 
96
96
  from aiohttp import ClientSession
97
97
 
@@ -118,6 +118,7 @@ from kasa.exceptions import (
118
118
  TimeoutError,
119
119
  UnsupportedDeviceError,
120
120
  )
121
+ from kasa.experimental import Experimental
121
122
  from kasa.iot.iotdevice import IotDevice
122
123
  from kasa.iotprotocol import REDACTORS as IOT_REDACTORS
123
124
  from kasa.json import dumps as json_dumps
@@ -127,9 +128,21 @@ from kasa.xortransport import XorEncryption
127
128
 
128
129
  _LOGGER = logging.getLogger(__name__)
129
130
 
131
+ if TYPE_CHECKING:
132
+ from kasa import BaseProtocol, BaseTransport
133
+
134
+
135
+ class ConnectAttempt(NamedTuple):
136
+ """Try to connect attempt."""
137
+
138
+ protocol: type
139
+ transport: type
140
+ device: type
141
+
130
142
 
131
143
  OnDiscoveredCallable = Callable[[Device], Awaitable[None]]
132
144
  OnUnsupportedCallable = Callable[[UnsupportedDeviceError], Awaitable[None]]
145
+ OnConnectAttemptCallable = Callable[[ConnectAttempt, bool], None]
133
146
  DeviceDict = Dict[str, Device]
134
147
 
135
148
  NEW_DISCOVERY_REDACTORS: dict[str, Callable[[Any], Any] | None] = {
@@ -535,6 +548,7 @@ class Discover:
535
548
  timeout: int | None = None,
536
549
  credentials: Credentials | None = None,
537
550
  http_client: ClientSession | None = None,
551
+ on_attempt: OnConnectAttemptCallable | None = None,
538
552
  ) -> Device | None:
539
553
  """Try to connect directly to a device with all possible parameters.
540
554
 
@@ -551,13 +565,22 @@ class Discover:
551
565
  """
552
566
  from .device_factory import _connect
553
567
 
554
- candidates = {
568
+ main_device_families = {
569
+ Device.Family.SmartTapoPlug,
570
+ Device.Family.IotSmartPlugSwitch,
571
+ }
572
+ if Experimental.enabled():
573
+ main_device_families.add(Device.Family.SmartIpCamera)
574
+ candidates: dict[
575
+ tuple[type[BaseProtocol], type[BaseTransport], type[Device]],
576
+ tuple[BaseProtocol, DeviceConfig],
577
+ ] = {
555
578
  (type(protocol), type(protocol._transport), device_class): (
556
579
  protocol,
557
580
  config,
558
581
  )
559
582
  for encrypt in Device.EncryptionType
560
- for device_family in Device.Family
583
+ for device_family in main_device_families
561
584
  for https in (True, False)
562
585
  if (
563
586
  conn_params := DeviceConnectionParameters(
@@ -580,19 +603,26 @@ class Discover:
580
603
  and (protocol := get_protocol(config))
581
604
  and (
582
605
  device_class := get_device_class_from_family(
583
- device_family.value, https=https
606
+ device_family.value, https=https, require_exact=True
584
607
  )
585
608
  )
586
609
  }
587
- for protocol, config in candidates.values():
610
+ for key, val in candidates.items():
588
611
  try:
589
- dev = await _connect(config, protocol)
612
+ prot, config = val
613
+ dev = await _connect(config, prot)
590
614
  except Exception:
591
- _LOGGER.debug("Unable to connect with %s", protocol)
615
+ _LOGGER.debug("Unable to connect with %s", prot)
616
+ if on_attempt:
617
+ ca = tuple.__new__(ConnectAttempt, key)
618
+ on_attempt(ca, False)
592
619
  else:
620
+ if on_attempt:
621
+ ca = tuple.__new__(ConnectAttempt, key)
622
+ on_attempt(ca, True)
593
623
  return dev
594
624
  finally:
595
- await protocol.close()
625
+ await prot.close()
596
626
  return None
597
627
 
598
628
  @staticmethod
@@ -182,6 +182,6 @@ class Energy(Module, ABC):
182
182
  def __getattr__(self, name):
183
183
  if attr := self._deprecated_attributes.get(name):
184
184
  msg = f"{name} is deprecated, use {attr} instead"
185
- warn(msg, DeprecationWarning, stacklevel=1)
185
+ warn(msg, DeprecationWarning, stacklevel=2)
186
186
  return getattr(self, attr)
187
187
  raise AttributeError(f"Energy module has no attribute {name!r}")
@@ -472,7 +472,7 @@ class IotDevice(Device):
472
472
  async def get_time(self) -> datetime:
473
473
  """Return current time from the device, if available."""
474
474
  msg = "Use `time` property instead, this call will be removed in the future."
475
- warn(msg, DeprecationWarning, stacklevel=1)
475
+ warn(msg, DeprecationWarning, stacklevel=2)
476
476
  return self.time
477
477
 
478
478
  async def get_timezone(self) -> tzinfo:
@@ -480,7 +480,7 @@ class IotDevice(Device):
480
480
  msg = (
481
481
  "Use `timezone` property instead, this call will be removed in the future."
482
482
  )
483
- warn(msg, DeprecationWarning, stacklevel=1)
483
+ warn(msg, DeprecationWarning, stacklevel=2)
484
484
  return self.timezone
485
485
 
486
486
  @property # type: ignore
@@ -9,7 +9,7 @@ from ..deviceconfig import DeviceConfig
9
9
  from ..module import Module
10
10
  from ..protocol import BaseProtocol
11
11
  from .iotdevice import IotDevice, requires_update
12
- from .modules import Antitheft, Cloud, Led, Schedule, Time, Usage
12
+ from .modules import AmbientLight, Antitheft, Cloud, Led, Motion, Schedule, Time, Usage
13
13
 
14
14
  _LOGGER = logging.getLogger(__name__)
15
15
 
@@ -92,3 +92,12 @@ class IotWallSwitch(IotPlug):
92
92
  ) -> None:
93
93
  super().__init__(host=host, config=config, protocol=protocol)
94
94
  self._device_type = DeviceType.WallSwitch
95
+
96
+ async def _initialize_modules(self) -> None:
97
+ """Initialize modules."""
98
+ await super()._initialize_modules()
99
+ if (dev_name := self.sys_info["dev_name"]) and "PIR" in dev_name:
100
+ self.add_module(Module.IotMotion, Motion(self, "smartlife.iot.PIR"))
101
+ self.add_module(
102
+ Module.IotAmbientLight, AmbientLight(self, "smartlife.iot.LAS")
103
+ )
@@ -1,16 +1,11 @@
1
1
  """Implementation of the ambient light (LAS) module found in some dimmers."""
2
2
 
3
+ import logging
4
+
3
5
  from ...feature import Feature
4
6
  from ..iotmodule import IotModule, merge
5
7
 
6
- # TODO create tests and use the config reply there
7
- # [{"hw_id":0,"enable":0,"dark_index":1,"min_adc":0,"max_adc":2450,
8
- # "level_array":[{"name":"cloudy","adc":490,"value":20},
9
- # {"name":"overcast","adc":294,"value":12},
10
- # {"name":"dawn","adc":222,"value":9},
11
- # {"name":"twilight","adc":222,"value":9},
12
- # {"name":"total darkness","adc":111,"value":4},
13
- # {"name":"custom","adc":2400,"value":97}]}]
8
+ _LOGGER = logging.getLogger(__name__)
14
9
 
15
10
 
16
11
  class AmbientLight(IotModule):
@@ -18,6 +13,19 @@ class AmbientLight(IotModule):
18
13
 
19
14
  def _initialize_features(self):
20
15
  """Initialize features after the initial update."""
16
+ self._add_feature(
17
+ Feature(
18
+ device=self._device,
19
+ container=self,
20
+ id="ambient_light_enabled",
21
+ name="Ambient light enabled",
22
+ icon="mdi:brightness-percent",
23
+ attribute_getter="enabled",
24
+ attribute_setter="set_enabled",
25
+ type=Feature.Type.Switch,
26
+ category=Feature.Category.Config,
27
+ )
28
+ )
21
29
  self._add_feature(
22
30
  Feature(
23
31
  device=self._device,
@@ -41,15 +49,25 @@ class AmbientLight(IotModule):
41
49
 
42
50
  return req
43
51
 
52
+ @property
53
+ def config(self) -> dict:
54
+ """Return current ambient light config."""
55
+ config = self.data["get_config"]
56
+ devs = config["devs"]
57
+ if len(devs) != 1:
58
+ _LOGGER.error("Unexpected number of devs in config: %s", config)
59
+
60
+ return devs[0]
61
+
44
62
  @property
45
63
  def presets(self) -> dict:
46
64
  """Return device-defined presets for brightness setting."""
47
- return self.data["level_array"]
65
+ return self.config["level_array"]
48
66
 
49
67
  @property
50
68
  def enabled(self) -> bool:
51
69
  """Return True if the module is enabled."""
52
- return bool(self.data["enable"])
70
+ return bool(self.config["enable"])
53
71
 
54
72
  @property
55
73
  def ambientlight_brightness(self) -> int:
@@ -2,11 +2,15 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import logging
5
6
  from enum import Enum
6
7
 
7
8
  from ...exceptions import KasaException
9
+ from ...feature import Feature
8
10
  from ..iotmodule import IotModule
9
11
 
12
+ _LOGGER = logging.getLogger(__name__)
13
+
10
14
 
11
15
  class Range(Enum):
12
16
  """Range for motion detection."""
@@ -17,27 +21,51 @@ class Range(Enum):
17
21
  Custom = 3
18
22
 
19
23
 
20
- # TODO: use the config reply in tests
21
- # {"enable":0,"version":"1.0","trigger_index":2,"cold_time":60000,
22
- # "min_adc":0,"max_adc":4095,"array":[80,50,20,0],"err_code":0}}}
23
-
24
-
25
24
  class Motion(IotModule):
26
25
  """Implements the motion detection (PIR) module."""
27
26
 
27
+ def _initialize_features(self):
28
+ """Initialize features after the initial update."""
29
+ # Only add features if the device supports the module
30
+ if "get_config" not in self.data:
31
+ return
32
+
33
+ if "enable" not in self.config:
34
+ _LOGGER.warning("%r initialized, but no enable in response")
35
+ return
36
+
37
+ self._add_feature(
38
+ Feature(
39
+ device=self._device,
40
+ container=self,
41
+ id="pir_enabled",
42
+ name="PIR enabled",
43
+ icon="mdi:motion-sensor",
44
+ attribute_getter="enabled",
45
+ attribute_setter="set_enabled",
46
+ type=Feature.Type.Switch,
47
+ category=Feature.Category.Config,
48
+ )
49
+ )
50
+
28
51
  def query(self):
29
52
  """Request PIR configuration."""
30
53
  return self.query_for_command("get_config")
31
54
 
55
+ @property
56
+ def config(self) -> dict:
57
+ """Return current configuration."""
58
+ return self.data["get_config"]
59
+
32
60
  @property
33
61
  def range(self) -> Range:
34
62
  """Return motion detection range."""
35
- return Range(self.data["trigger_index"])
63
+ return Range(self.config["trigger_index"])
36
64
 
37
65
  @property
38
66
  def enabled(self) -> bool:
39
67
  """Return True if module is enabled."""
40
- return bool(self.data["enable"])
68
+ return bool(self.config["enable"])
41
69
 
42
70
  async def set_enabled(self, state: bool):
43
71
  """Enable/disable PIR."""
@@ -63,7 +91,7 @@ class Motion(IotModule):
63
91
  @property
64
92
  def inactivity_timeout(self) -> int:
65
93
  """Return inactivity timeout in milliseconds."""
66
- return self.data["cold_time"]
94
+ return self.config["cold_time"]
67
95
 
68
96
  async def set_inactivity_timeout(self, timeout: int):
69
97
  """Set inactivity timeout in milliseconds.
@@ -127,6 +127,10 @@ class Module(ABC):
127
127
  WaterleakSensor: Final[ModuleName[smart.WaterleakSensor]] = ModuleName(
128
128
  "WaterleakSensor"
129
129
  )
130
+ ChildProtection: Final[ModuleName[smart.ChildProtection]] = ModuleName(
131
+ "ChildProtection"
132
+ )
133
+ TriggerLogs: Final[ModuleName[smart.TriggerLogs]] = ModuleName("TriggerLogs")
130
134
 
131
135
  # SMARTCAMERA only modules
132
136
  Camera: Final[ModuleName[experimental.Camera]] = ModuleName("Camera")