deebot-client 4.2.0__tar.gz → 5.0.0.dev0__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 (172) hide show
  1. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.pre-commit-config.yaml +1 -1
  2. {deebot-client-4.2.0/deebot_client.egg-info → deebot-client-5.0.0.dev0}/PKG-INFO +2 -2
  3. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/api_client.py +6 -2
  4. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/authentication.py +6 -2
  5. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/capabilities.py +9 -5
  6. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/command.py +14 -9
  7. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/__init__.py +7 -1
  8. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/__init__.py +7 -1
  9. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/advanced_mode.py +1 -0
  10. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/battery.py +2 -0
  11. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/carpet.py +1 -0
  12. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/charge.py +6 -2
  13. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/charge_state.py +6 -2
  14. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/clean.py +8 -4
  15. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/clean_count.py +5 -2
  16. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/clean_logs.py +8 -4
  17. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/clean_preference.py +1 -0
  18. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/common.py +7 -3
  19. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/const.py +1 -0
  20. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/continuous_cleaning.py +1 -0
  21. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/custom.py +6 -2
  22. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/efficiency.py +6 -2
  23. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/error.py +6 -2
  24. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/fan_speed.py +6 -2
  25. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/life_span.py +7 -3
  26. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/map.py +6 -2
  27. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/multimap_state.py +1 -0
  28. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/network.py +6 -2
  29. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/play_sound.py +1 -0
  30. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/pos.py +5 -2
  31. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/relocation.py +2 -0
  32. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/stats.py +6 -2
  33. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/true_detect.py +1 -0
  34. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/voice_assistant_state.py +1 -0
  35. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/volume.py +5 -2
  36. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/water_info.py +6 -2
  37. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/json/work_mode.py +6 -2
  38. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/xml/__init__.py +7 -1
  39. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/xml/common.py +6 -2
  40. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/commands/xml/error.py +8 -2
  41. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/const.py +1 -0
  42. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/device.py +5 -2
  43. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/event_bus.py +56 -4
  44. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/__init__.py +5 -2
  45. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/base.py +1 -0
  46. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/efficiency_mode.py +2 -0
  47. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/fan_speed.py +1 -1
  48. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/map.py +6 -2
  49. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/network.py +1 -1
  50. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/water_info.py +2 -0
  51. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/events/work_mode.py +2 -0
  52. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/exceptions.py +1 -0
  53. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/__init__.py +1 -1
  54. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/2o4lnm.py +2 -0
  55. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/626v6g.py +2 -0
  56. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/85nbtp.py +2 -0
  57. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/9ku8nu.py +2 -0
  58. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/__init__.py +6 -1
  59. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/clojes.py +2 -0
  60. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/fallback.py +2 -0
  61. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/lx3j7m.py +2 -0
  62. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/p1jij8.py +2 -0
  63. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/p95mgv.py +2 -0
  64. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/rss8xk.py +2 -0
  65. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/umwv6z.py +2 -0
  66. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/vi829v.py +2 -0
  67. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/x5d34r.py +2 -0
  68. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/yna5xi.py +2 -0
  69. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/hardware/deebot/zjavof.py +2 -0
  70. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/logging_filter.py +1 -0
  71. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/map.py +46 -53
  72. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/message.py +10 -5
  73. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/messages/__init__.py +1 -1
  74. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/messages/json/__init__.py +5 -2
  75. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/messages/json/battery.py +6 -2
  76. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/messages/json/stats.py +6 -2
  77. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/models.py +7 -5
  78. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/mqtt_client.py +11 -8
  79. deebot-client-5.0.0.dev0/deebot_client/util/continents.py +265 -0
  80. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0/deebot_client.egg-info}/PKG-INFO +2 -2
  81. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client.egg-info/SOURCES.txt +3 -0
  82. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client.egg-info/requires.txt +1 -1
  83. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/pyproject.toml +12 -11
  84. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/requirements.txt +1 -1
  85. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/__init__.py +6 -2
  86. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/__init__.py +11 -7
  87. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_advanced_mode.py +2 -0
  88. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_battery.py +2 -0
  89. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_carpet.py +2 -0
  90. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_charge.py +2 -0
  91. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_charge_state.py +6 -2
  92. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_clean.py +6 -2
  93. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_clean_count.py +2 -0
  94. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_clean_log.py +2 -0
  95. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_clean_preference.py +2 -0
  96. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_common.py +9 -4
  97. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_continuous_cleaning.py +2 -0
  98. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_custom.py +2 -0
  99. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_efficiency.py +2 -0
  100. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_error.py +8 -2
  101. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_fan_speed.py +2 -0
  102. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_life_span.py +2 -0
  103. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_map.py +2 -0
  104. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_mulitmap_state.py +2 -0
  105. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_network.py +2 -0
  106. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_true_detect.py +2 -0
  107. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_voice_assistant_state.py +2 -0
  108. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_volume.py +2 -0
  109. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_water_info.py +2 -0
  110. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/json/test_work_mode.py +2 -0
  111. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/xml/__init__.py +2 -0
  112. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/commands/xml/test_error.py +8 -2
  113. deebot-client-5.0.0.dev0/tests/common.py +12 -0
  114. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/conftest.py +9 -4
  115. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/events/test_water_info.py +2 -0
  116. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/fixtures/base.py +2 -0
  117. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/fixtures/mqtt_server.py +2 -0
  118. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/hardware/test_init.py +9 -5
  119. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/helpers/__init__.py +9 -4
  120. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/helpers/tasks.py +6 -2
  121. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/__init__.py +6 -2
  122. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/json/test_battery.py +2 -0
  123. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/json/test_stats.py +2 -0
  124. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/test_get_messages.py +7 -1
  125. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/test_messages.py +2 -0
  126. deebot-client-5.0.0.dev0/tests/mqtt_util.py +47 -0
  127. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_authentication.py +2 -0
  128. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_command.py +6 -2
  129. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_device.py +7 -2
  130. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_event_bus.py +9 -3
  131. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_map.py +42 -6
  132. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/test_mqtt_client.py +19 -104
  133. deebot-client-5.0.0.dev0/tests/test_mqtt_client_reconnect.py +84 -0
  134. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/util/test_continents.py +9 -6
  135. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/util/test_init.py +2 -0
  136. deebot-client-4.2.0/deebot_client/util/continents.py +0 -264
  137. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.codecov.yml +0 -0
  138. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.coveragerc +0 -0
  139. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.devcontainer.json +0 -0
  140. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.gitattributes +0 -0
  141. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/FUNDING.yml +0 -0
  142. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  143. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  144. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/dependabot.yml +0 -0
  145. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/release-drafter.yml +0 -0
  146. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/workflows/ci.yml +0 -0
  147. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/workflows/codeql-analysis.yml +0 -0
  148. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/workflows/python-publish.yml +0 -0
  149. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.github/workflows/release-drafter.yml +0 -0
  150. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.gitignore +0 -0
  151. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.prettierrc.js +0 -0
  152. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/.yamllint +0 -0
  153. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/LICENSE.txt +0 -0
  154. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/README.md +0 -0
  155. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/__init__.py +0 -0
  156. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/py.typed +0 -0
  157. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client/util/__init__.py +0 -0
  158. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client.egg-info/dependency_links.txt +0 -0
  159. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/deebot_client.egg-info/top_level.txt +0 -0
  160. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/mypy.ini +0 -0
  161. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/pytest.ini +0 -0
  162. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/requirements-dev.txt +0 -0
  163. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/requirements-test.txt +0 -0
  164. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/scripts/check_getLogger.sh +0 -0
  165. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/scripts/run-in-env.sh +0 -0
  166. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/setup.cfg +0 -0
  167. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/__init__.py +0 -0
  168. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/events/__init__.py +0 -0
  169. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/fixtures/__init__.py +0 -0
  170. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/hardware/__init__.py +0 -0
  171. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/messages/json/__init__.py +0 -0
  172. {deebot-client-4.2.0 → deebot-client-5.0.0.dev0}/tests/util/__init__.py +0 -0
@@ -11,7 +11,7 @@ default_language_version:
11
11
 
12
12
  repos:
13
13
  - repo: https://github.com/astral-sh/ruff-pre-commit
14
- rev: v0.1.9
14
+ rev: v0.1.14
15
15
  hooks:
16
16
  - id: ruff
17
17
  args:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deebot-client
3
- Version: 4.2.0
3
+ Version: 5.0.0.dev0
4
4
  Summary: Deebot client library in python 3
5
5
  Author-email: Robert Resch <robert@resch.dev>
6
6
  License: GPL-3.0
@@ -18,7 +18,7 @@ Requires-Python: >=3.11.0
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE.txt
20
20
  Requires-Dist: aiohttp~=3.9
21
- Requires-Dist: aiomqtt<2.0,>=1.0.0
21
+ Requires-Dist: aiomqtt<3.0,>=2.0.0
22
22
  Requires-Dist: cachetools<6.0,>=5.0.0
23
23
  Requires-Dist: defusedxml
24
24
  Requires-Dist: numpy<2.0,>=1.23.2
@@ -1,14 +1,18 @@
1
1
  """Api client module."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
6
  from deebot_client.hardware.deebot import get_static_device_info
5
7
 
6
- from .authentication import Authenticator
7
8
  from .const import PATH_API_APPSVR_APP, PATH_API_PIM_PRODUCT_IOT_MAP
8
9
  from .exceptions import ApiError
9
10
  from .logging_filter import get_logger
10
11
  from .models import ApiDeviceInfo, DeviceInfo
11
12
 
13
+ if TYPE_CHECKING:
14
+ from .authentication import Authenticator
15
+
12
16
  _LOGGER = get_logger(__name__)
13
17
 
14
18
 
@@ -1,9 +1,10 @@
1
1
  """Authentication module."""
2
+ from __future__ import annotations
3
+
2
4
  import asyncio
3
- from collections.abc import Callable, Coroutine, Mapping
4
5
  from http import HTTPStatus
5
6
  import time
6
- from typing import Any
7
+ from typing import TYPE_CHECKING, Any
7
8
  from urllib.parse import urljoin
8
9
 
9
10
  from aiohttp import ClientResponseError, hdrs
@@ -14,6 +15,9 @@ from .logging_filter import get_logger
14
15
  from .models import Configuration, Credentials
15
16
  from .util import cancel, create_task, md5
16
17
 
18
+ if TYPE_CHECKING:
19
+ from collections.abc import Callable, Coroutine, Mapping
20
+
17
21
  _LOGGER = get_logger(__name__)
18
22
 
19
23
  _CLIENT_KEY = "1520391301804"
@@ -1,10 +1,10 @@
1
1
  """Device capabilities module."""
2
- from collections.abc import Callable
2
+ from __future__ import annotations
3
+
3
4
  from dataclasses import dataclass, field, fields, is_dataclass
4
5
  from types import MappingProxyType
5
6
  from typing import TYPE_CHECKING, Any, Generic, TypeVar
6
7
 
7
- from deebot_client.command import Command, SetCommand
8
8
  from deebot_client.events import (
9
9
  AdvancedModeEvent,
10
10
  AvailabilityEvent,
@@ -41,19 +41,23 @@ from deebot_client.events import (
41
41
  WorkMode,
42
42
  WorkModeEvent,
43
43
  )
44
- from deebot_client.events.efficiency_mode import EfficiencyMode, EfficiencyModeEvent
45
- from deebot_client.models import CleanAction, CleanMode
46
44
 
47
45
  if TYPE_CHECKING:
46
+ from collections.abc import Callable
47
+
48
48
  from _typeshed import DataclassInstance
49
49
 
50
+ from deebot_client.command import Command, SetCommand
51
+ from deebot_client.events.efficiency_mode import EfficiencyMode, EfficiencyModeEvent
52
+ from deebot_client.models import CleanAction, CleanMode
53
+
50
54
 
51
55
  _T = TypeVar("_T")
52
56
  _EVENT = TypeVar("_EVENT", bound=Event)
53
57
 
54
58
 
55
59
  def _get_events(
56
- capabilities: "DataclassInstance",
60
+ capabilities: DataclassInstance,
57
61
  ) -> MappingProxyType[type[Event], list[Command]]:
58
62
  events = {}
59
63
  for field_ in fields(capabilities):
@@ -1,19 +1,24 @@
1
1
  """Base command."""
2
+ from __future__ import annotations
3
+
2
4
  from abc import ABC, abstractmethod
3
5
  import asyncio
4
6
  from dataclasses import dataclass, field
5
- from types import MappingProxyType
6
- from typing import Any, final
7
+ from typing import TYPE_CHECKING, Any, final
7
8
 
8
9
  from deebot_client.events import AvailabilityEvent
9
10
  from deebot_client.exceptions import DeebotError
10
11
 
11
- from .authentication import Authenticator
12
12
  from .const import PATH_API_IOT_DEVMANAGER, REQUEST_HEADERS, DataType
13
- from .event_bus import EventBus
14
13
  from .logging_filter import get_logger
15
14
  from .message import HandlingResult, HandlingState, Message
16
- from .models import DeviceInfo
15
+
16
+ if TYPE_CHECKING:
17
+ from types import MappingProxyType
18
+
19
+ from .authentication import Authenticator
20
+ from .event_bus import EventBus
21
+ from .models import DeviceInfo
17
22
 
18
23
  _LOGGER = get_logger(__name__)
19
24
 
@@ -22,15 +27,15 @@ _LOGGER = get_logger(__name__)
22
27
  class CommandResult(HandlingResult):
23
28
  """Command result object."""
24
29
 
25
- requested_commands: list["Command"] = field(default_factory=list)
30
+ requested_commands: list[Command] = field(default_factory=list)
26
31
 
27
32
  @classmethod
28
- def success(cls) -> "CommandResult":
33
+ def success(cls) -> CommandResult:
29
34
  """Create result with handling success."""
30
35
  return CommandResult(HandlingState.SUCCESS)
31
36
 
32
37
  @classmethod
33
- def analyse(cls) -> "CommandResult":
38
+ def analyse(cls) -> CommandResult:
34
39
  """Create result with handling analyse."""
35
40
  return CommandResult(HandlingState.ANALYSE)
36
41
 
@@ -252,7 +257,7 @@ class CommandMqttP2P(Command, ABC):
252
257
  """Handle response received over the mqtt channel "p2p"."""
253
258
 
254
259
  @classmethod
255
- def create_from_mqtt(cls, data: dict[str, Any]) -> "CommandMqttP2P":
260
+ def create_from_mqtt(cls, data: dict[str, Any]) -> CommandMqttP2P:
256
261
  """Create a command from the mqtt data."""
257
262
  values: dict[str, Any] = {}
258
263
  if not hasattr(cls, "_mqtt_params"):
@@ -1,5 +1,8 @@
1
1
  """Commands module."""
2
- from deebot_client.command import Command, CommandMqttP2P
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING
5
+
3
6
  from deebot_client.const import DataType
4
7
 
5
8
  from .json import (
@@ -7,6 +10,9 @@ from .json import (
7
10
  COMMANDS_WITH_MQTT_P2P_HANDLING as JSON_COMMANDS_WITH_MQTT_P2P_HANDLING,
8
11
  )
9
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.command import Command, CommandMqttP2P
15
+
10
16
  COMMANDS: dict[DataType, dict[str, type[Command]]] = {DataType.JSON: JSON_COMMANDS}
11
17
 
12
18
  COMMANDS_WITH_MQTT_P2P_HANDLING: dict[DataType, dict[str, type[CommandMqttP2P]]] = {
@@ -1,4 +1,8 @@
1
1
  """Json commands module."""
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING
5
+
2
6
  from deebot_client.command import Command, CommandMqttP2P
3
7
 
4
8
  from .advanced_mode import GetAdvancedMode, SetAdvancedMode
@@ -10,7 +14,6 @@ from .clean import Clean, CleanArea, GetCleanInfo
10
14
  from .clean_count import GetCleanCount, SetCleanCount
11
15
  from .clean_logs import GetCleanLogs
12
16
  from .clean_preference import GetCleanPreference, SetCleanPreference
13
- from .common import JsonCommand
14
17
  from .continuous_cleaning import GetContinuousCleaning, SetContinuousCleaning
15
18
  from .efficiency import GetEfficiencyMode, SetEfficiencyMode
16
19
  from .error import GetError
@@ -36,6 +39,9 @@ from .volume import GetVolume, SetVolume
36
39
  from .water_info import GetWaterInfo, SetWaterInfo
37
40
  from .work_mode import GetWorkMode, SetWorkMode
38
41
 
42
+ if TYPE_CHECKING:
43
+ from .common import JsonCommand
44
+
39
45
  __all__ = [
40
46
  "GetAdvancedMode",
41
47
  "SetAdvancedMode",
@@ -1,4 +1,5 @@
1
1
  """Advanced mode command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import AdvancedModeEvent
4
5
 
@@ -1,4 +1,6 @@
1
1
  """Battery commands."""
2
+ from __future__ import annotations
3
+
2
4
  from deebot_client.messages.json import OnBattery
3
5
 
4
6
  from .common import JsonCommandWithMessageHandling
@@ -1,4 +1,5 @@
1
1
  """Carpet pressure command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import CarpetAutoFanBoostEvent
4
5
 
@@ -1,7 +1,8 @@
1
1
  """Charge commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.event_bus import EventBus
5
6
  from deebot_client.events import StateEvent
6
7
  from deebot_client.logging_filter import get_logger
7
8
  from deebot_client.message import HandlingResult
@@ -10,6 +11,9 @@ from deebot_client.models import State
10
11
  from .common import ExecuteCommand
11
12
  from .const import CODE
12
13
 
14
+ if TYPE_CHECKING:
15
+ from deebot_client.event_bus import EventBus
16
+
13
17
  _LOGGER = get_logger(__name__)
14
18
 
15
19
 
@@ -1,7 +1,8 @@
1
1
  """Charge state commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.event_bus import EventBus
5
6
  from deebot_client.events import StateEvent
6
7
  from deebot_client.message import HandlingResult, MessageBodyDataDict
7
8
  from deebot_client.models import State
@@ -9,6 +10,9 @@ from deebot_client.models import State
9
10
  from .common import JsonCommandWithMessageHandling
10
11
  from .const import CODE
11
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
12
16
 
13
17
  class GetChargeState(JsonCommandWithMessageHandling, MessageBodyDataDict):
14
18
  """Get charge state command."""
@@ -1,9 +1,8 @@
1
1
  """Clean commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.authentication import Authenticator
5
- from deebot_client.command import CommandResult
6
- from deebot_client.event_bus import EventBus
7
6
  from deebot_client.events import StateEvent
8
7
  from deebot_client.logging_filter import get_logger
9
8
  from deebot_client.message import HandlingResult, MessageBodyDataDict
@@ -11,6 +10,11 @@ from deebot_client.models import CleanAction, CleanMode, DeviceInfo, State
11
10
 
12
11
  from .common import ExecuteCommand, JsonCommandWithMessageHandling
13
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.authentication import Authenticator
15
+ from deebot_client.command import CommandResult
16
+ from deebot_client.event_bus import EventBus
17
+
14
18
  _LOGGER = get_logger(__name__)
15
19
 
16
20
 
@@ -1,15 +1,18 @@
1
1
  """Clean count command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from types import MappingProxyType
4
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
5
6
 
6
7
  from deebot_client.command import InitParam
7
- from deebot_client.event_bus import EventBus
8
8
  from deebot_client.events import CleanCountEvent
9
9
  from deebot_client.message import HandlingResult
10
10
 
11
11
  from .common import JsonGetCommand, JsonSetCommand
12
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
13
16
 
14
17
  class GetCleanCount(JsonGetCommand):
15
18
  """Get clean count command."""
@@ -1,16 +1,20 @@
1
1
  """clean log commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.authentication import Authenticator
5
6
  from deebot_client.command import CommandResult
6
7
  from deebot_client.const import PATH_API_LG_LOG, REQUEST_HEADERS
7
- from deebot_client.event_bus import EventBus
8
8
  from deebot_client.events import CleanJobStatus, CleanLogEntry, CleanLogEvent
9
9
  from deebot_client.logging_filter import get_logger
10
- from deebot_client.models import DeviceInfo
11
10
 
12
11
  from .common import JsonCommand
13
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.authentication import Authenticator
15
+ from deebot_client.event_bus import EventBus
16
+ from deebot_client.models import DeviceInfo
17
+
14
18
  _LOGGER = get_logger(__name__)
15
19
 
16
20
 
@@ -1,4 +1,5 @@
1
1
  """Clean preference command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import CleanPreferenceEvent
4
5
 
@@ -1,8 +1,10 @@
1
1
  """Base commands."""
2
+ from __future__ import annotations
3
+
2
4
  from abc import ABC, abstractmethod
3
5
  from datetime import datetime
4
6
  from types import MappingProxyType
5
- from typing import Any
7
+ from typing import TYPE_CHECKING, Any
6
8
 
7
9
  from deebot_client.command import (
8
10
  Command,
@@ -12,8 +14,6 @@ from deebot_client.command import (
12
14
  SetCommand,
13
15
  )
14
16
  from deebot_client.const import DataType
15
- from deebot_client.event_bus import EventBus
16
- from deebot_client.events import EnableEvent
17
17
  from deebot_client.logging_filter import get_logger
18
18
  from deebot_client.message import (
19
19
  HandlingResult,
@@ -24,6 +24,10 @@ from deebot_client.message import (
24
24
 
25
25
  from .const import CODE
26
26
 
27
+ if TYPE_CHECKING:
28
+ from deebot_client.event_bus import EventBus
29
+ from deebot_client.events import EnableEvent
30
+
27
31
  _LOGGER = get_logger(__name__)
28
32
 
29
33
 
@@ -1,3 +1,4 @@
1
1
  """Command constants module."""
2
+ from __future__ import annotations
2
3
 
3
4
  CODE = "code"
@@ -1,4 +1,5 @@
1
1
  """Continuous cleaning (break point) command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import ContinuousCleaningEvent
4
5
 
@@ -1,13 +1,17 @@
1
1
  """Custom command module."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
6
  from deebot_client.command import CommandResult
5
7
  from deebot_client.commands.json.common import JsonCommand
6
- from deebot_client.event_bus import EventBus
7
8
  from deebot_client.events import CustomCommandEvent
8
9
  from deebot_client.logging_filter import get_logger
9
10
  from deebot_client.message import HandlingState
10
11
 
12
+ if TYPE_CHECKING:
13
+ from deebot_client.event_bus import EventBus
14
+
11
15
  _LOGGER = get_logger(__name__)
12
16
 
13
17
 
@@ -1,14 +1,18 @@
1
1
  """Efficiency mode command module."""
2
+ from __future__ import annotations
3
+
2
4
  from types import MappingProxyType
3
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
4
6
 
5
7
  from deebot_client.command import InitParam
6
- from deebot_client.event_bus import EventBus
7
8
  from deebot_client.events import EfficiencyMode, EfficiencyModeEvent
8
9
  from deebot_client.message import HandlingResult
9
10
 
10
11
  from .common import JsonGetCommand, JsonSetCommand
11
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
12
16
 
13
17
  class GetEfficiencyMode(JsonGetCommand):
14
18
  """Get efficiency mode command."""
@@ -1,14 +1,18 @@
1
1
  """Error commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
6
  from deebot_client.const import ERROR_CODES
5
- from deebot_client.event_bus import EventBus
6
7
  from deebot_client.events import ErrorEvent, StateEvent
7
8
  from deebot_client.message import HandlingResult, MessageBodyDataDict
8
9
  from deebot_client.models import State
9
10
 
10
11
  from .common import JsonCommandWithMessageHandling
11
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
12
16
 
13
17
  class GetError(JsonCommandWithMessageHandling, MessageBodyDataDict):
14
18
  """Get error command."""
@@ -1,14 +1,18 @@
1
1
  """(fan) speed commands."""
2
+ from __future__ import annotations
3
+
2
4
  from types import MappingProxyType
3
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
4
6
 
5
7
  from deebot_client.command import InitParam
6
- from deebot_client.event_bus import EventBus
7
8
  from deebot_client.events import FanSpeedEvent, FanSpeedLevel
8
9
  from deebot_client.message import HandlingResult
9
10
 
10
11
  from .common import JsonGetCommand, JsonSetCommand
11
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
12
16
 
13
17
  class GetFanSpeed(JsonGetCommand):
14
18
  """Get fan speed command."""
@@ -1,15 +1,19 @@
1
1
  """Life span commands."""
2
+ from __future__ import annotations
3
+
2
4
  from types import MappingProxyType
3
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
4
6
 
5
7
  from deebot_client.command import CommandMqttP2P, InitParam
6
- from deebot_client.event_bus import EventBus
7
8
  from deebot_client.events import LifeSpan, LifeSpanEvent
8
9
  from deebot_client.message import HandlingResult, HandlingState, MessageBodyDataList
9
- from deebot_client.util import LST
10
10
 
11
11
  from .common import ExecuteCommand, JsonCommandWithMessageHandling
12
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+ from deebot_client.util import LST
16
+
13
17
 
14
18
  class GetLifeSpan(JsonCommandWithMessageHandling, MessageBodyDataList):
15
19
  """Get life span command."""
@@ -1,9 +1,10 @@
1
1
  """Maps commands."""
2
+ from __future__ import annotations
3
+
2
4
  from types import MappingProxyType
3
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
4
6
 
5
7
  from deebot_client.command import Command, CommandResult
6
- from deebot_client.event_bus import EventBus
7
8
  from deebot_client.events import (
8
9
  MajorMapEvent,
9
10
  MapSetEvent,
@@ -17,6 +18,9 @@ from deebot_client.message import HandlingResult, HandlingState, MessageBodyData
17
18
 
18
19
  from .common import JsonCommandWithMessageHandling
19
20
 
21
+ if TYPE_CHECKING:
22
+ from deebot_client.event_bus import EventBus
23
+
20
24
 
21
25
  class GetCachedMapInfo(JsonCommandWithMessageHandling, MessageBodyDataDict):
22
26
  """Get cached map info command."""
@@ -1,4 +1,5 @@
1
1
  """Multimap state command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import MultimapStateEvent
4
5
 
@@ -1,12 +1,16 @@
1
1
  """Network commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.event_bus import EventBus
5
6
  from deebot_client.events import NetworkInfoEvent
6
7
  from deebot_client.message import HandlingResult, MessageBodyDataDict
7
8
 
8
9
  from .common import JsonCommandWithMessageHandling
9
10
 
11
+ if TYPE_CHECKING:
12
+ from deebot_client.event_bus import EventBus
13
+
10
14
 
11
15
  class GetNetInfo(JsonCommandWithMessageHandling, MessageBodyDataDict):
12
16
  """Get network info command."""
@@ -1,4 +1,5 @@
1
1
  """Play sound commands."""
2
+ from __future__ import annotations
2
3
 
3
4
  from .common import ExecuteCommand
4
5
 
@@ -1,13 +1,16 @@
1
1
  """Position command module."""
2
+ from __future__ import annotations
2
3
 
3
- from typing import Any
4
+ from typing import TYPE_CHECKING, Any
4
5
 
5
- from deebot_client.event_bus import EventBus
6
6
  from deebot_client.events import Position, PositionsEvent, PositionType
7
7
  from deebot_client.message import HandlingResult, MessageBodyDataDict
8
8
 
9
9
  from .common import JsonCommandWithMessageHandling
10
10
 
11
+ if TYPE_CHECKING:
12
+ from deebot_client.event_bus import EventBus
13
+
11
14
 
12
15
  class GetPos(JsonCommandWithMessageHandling, MessageBodyDataDict):
13
16
  """Get volume command."""
@@ -1,4 +1,6 @@
1
1
  """Relocate commands."""
2
+ from __future__ import annotations
3
+
2
4
  from .common import ExecuteCommand
3
5
 
4
6
 
@@ -1,12 +1,16 @@
1
1
  """Stats commands."""
2
- from typing import Any
2
+ from __future__ import annotations
3
+
4
+ from typing import TYPE_CHECKING, Any
3
5
 
4
- from deebot_client.event_bus import EventBus
5
6
  from deebot_client.events import StatsEvent, TotalStatsEvent
6
7
  from deebot_client.message import HandlingResult, MessageBodyDataDict
7
8
 
8
9
  from .common import JsonCommandWithMessageHandling
9
10
 
11
+ if TYPE_CHECKING:
12
+ from deebot_client.event_bus import EventBus
13
+
10
14
 
11
15
  class GetStats(JsonCommandWithMessageHandling, MessageBodyDataDict):
12
16
  """Get stats command."""
@@ -1,4 +1,5 @@
1
1
  """True detect command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import TrueDetectEvent
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Voice assistant state command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from deebot_client.events import VoiceAssistantStateEvent
4
5
 
@@ -1,15 +1,18 @@
1
1
  """Volume command module."""
2
+ from __future__ import annotations
2
3
 
3
4
  from types import MappingProxyType
4
- from typing import Any
5
+ from typing import TYPE_CHECKING, Any
5
6
 
6
7
  from deebot_client.command import InitParam
7
- from deebot_client.event_bus import EventBus
8
8
  from deebot_client.events import VolumeEvent
9
9
  from deebot_client.message import HandlingResult
10
10
 
11
11
  from .common import JsonGetCommand, JsonSetCommand
12
12
 
13
+ if TYPE_CHECKING:
14
+ from deebot_client.event_bus import EventBus
15
+
13
16
 
14
17
  class GetVolume(JsonGetCommand):
15
18
  """Get volume command."""