homeassistant-stubs 2024.2.4__py3-none-any.whl → 2024.3.0b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. homeassistant-stubs/bootstrap.pyi +20 -4
  2. homeassistant-stubs/components/aftership/const.pyi +0 -1
  3. homeassistant-stubs/components/aftership/sensor.pyi +2 -2
  4. homeassistant-stubs/components/airthings_ble/config_flow.pyi +1 -0
  5. homeassistant-stubs/components/airzone_cloud/sensor.pyi +1 -1
  6. homeassistant-stubs/components/alexa/config.pyi +2 -0
  7. homeassistant-stubs/components/amberelectric/sensor.pyi +0 -1
  8. homeassistant-stubs/components/androidtv/entity.pyi +30 -0
  9. homeassistant-stubs/components/androidtv/media_player.pyi +5 -23
  10. homeassistant-stubs/components/anthemav/media_player.pyi +0 -1
  11. homeassistant-stubs/components/apple_tv/__init__.pyi +68 -0
  12. homeassistant-stubs/components/apple_tv/browse_media.pyi +5 -0
  13. homeassistant-stubs/components/apple_tv/config_flow.pyi +63 -0
  14. homeassistant-stubs/components/apple_tv/const.pyi +4 -0
  15. homeassistant-stubs/components/apple_tv/media_player.pyi +93 -0
  16. homeassistant-stubs/components/apple_tv/remote.pyi +23 -0
  17. homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
  18. homeassistant-stubs/components/assist_pipeline/const.pyi +1 -1
  19. homeassistant-stubs/components/assist_pipeline/error.pyi +4 -0
  20. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +5 -5
  21. homeassistant-stubs/components/asterisk_mbox/__init__.pyi +1 -0
  22. homeassistant-stubs/components/asuswrt/router.pyi +1 -1
  23. homeassistant-stubs/components/auth/__init__.pyi +2 -2
  24. homeassistant-stubs/components/automation/__init__.pyi +2 -1
  25. homeassistant-stubs/components/axis/binary_sensor.pyi +4 -0
  26. homeassistant-stubs/components/backup/manager.pyi +5 -3
  27. homeassistant-stubs/components/backup/websocket.pyi +4 -2
  28. homeassistant-stubs/components/blue_current/__init__.pyi +4 -3
  29. homeassistant-stubs/components/blue_current/entity.pyi +5 -2
  30. homeassistant-stubs/components/bluetooth/manager.pyi +2 -2
  31. homeassistant-stubs/components/bluetooth/match.pyi +3 -0
  32. homeassistant-stubs/components/bmw_connected_drive/device_tracker.pyi +1 -0
  33. homeassistant-stubs/components/braviatv/coordinator.pyi +2 -0
  34. homeassistant-stubs/components/braviatv/media_player.pyi +5 -0
  35. homeassistant-stubs/components/brother/sensor.pyi +3 -3
  36. homeassistant-stubs/components/camera/media_source.pyi +1 -0
  37. homeassistant-stubs/components/cert_expiry/sensor.pyi +0 -1
  38. homeassistant-stubs/components/climate/__init__.pyi +3 -1
  39. homeassistant-stubs/components/cloud/const.pyi +2 -0
  40. homeassistant-stubs/components/cloud/google_config.pyi +7 -5
  41. homeassistant-stubs/components/cloud/http_api.pyi +1 -1
  42. homeassistant-stubs/components/cloud/prefs.pyi +6 -2
  43. homeassistant-stubs/components/cloud/tts.pyi +3 -2
  44. homeassistant-stubs/components/config/area_registry.pyi +1 -1
  45. homeassistant-stubs/components/config/auth.pyi +2 -2
  46. homeassistant-stubs/components/config/auth_provider_homeassistant.pyi +2 -2
  47. homeassistant-stubs/components/config/automation.pyi +2 -2
  48. homeassistant-stubs/components/config/config_entries.pyi +5 -4
  49. homeassistant-stubs/components/config/core.pyi +2 -2
  50. homeassistant-stubs/components/config/device_registry.pyi +1 -1
  51. homeassistant-stubs/components/config/entity_registry.pyi +1 -1
  52. homeassistant-stubs/components/config/floor_registry.pyi +12 -0
  53. homeassistant-stubs/components/config/label_registry.pyi +12 -0
  54. homeassistant-stubs/components/config/scene.pyi +2 -2
  55. homeassistant-stubs/components/config/script.pyi +2 -2
  56. homeassistant-stubs/components/cover/intent.pyi +2 -2
  57. homeassistant-stubs/components/cpuspeed/sensor.pyi +0 -1
  58. homeassistant-stubs/components/crownstone/light.pyi +1 -1
  59. homeassistant-stubs/components/demo/fan.pyi +1 -0
  60. homeassistant-stubs/components/dhcp/__init__.pyi +24 -32
  61. homeassistant-stubs/components/dlna_dmr/media_player.pyi +8 -3
  62. homeassistant-stubs/components/dnsip/sensor.pyi +1 -1
  63. homeassistant-stubs/components/dunehd/media_player.pyi +5 -2
  64. homeassistant-stubs/components/ecovacs/binary_sensor.pyi +3 -3
  65. homeassistant-stubs/components/ecovacs/button.pyi +5 -5
  66. homeassistant-stubs/components/ecovacs/controller.pyi +6 -3
  67. homeassistant-stubs/components/ecovacs/entity.pyi +11 -9
  68. homeassistant-stubs/components/ecovacs/image.pyi +2 -2
  69. homeassistant-stubs/components/ecovacs/lawn_mower.pyi +28 -0
  70. homeassistant-stubs/components/ecovacs/number.pyi +3 -3
  71. homeassistant-stubs/components/ecovacs/select.pyi +3 -3
  72. homeassistant-stubs/components/ecovacs/sensor.pyi +6 -6
  73. homeassistant-stubs/components/ecovacs/switch.pyi +4 -4
  74. homeassistant-stubs/components/ecovacs/vacuum.pyi +3 -3
  75. homeassistant-stubs/components/emulated_hue/config.pyi +1 -1
  76. homeassistant-stubs/components/enphase_envoy/sensor.pyi +39 -4
  77. homeassistant-stubs/components/esphome/bluetooth.pyi +1 -1
  78. homeassistant-stubs/components/esphome/camera.pyi +2 -2
  79. homeassistant-stubs/components/esphome/entry_data.pyi +3 -5
  80. homeassistant-stubs/components/esphome/manager.pyi +6 -7
  81. homeassistant-stubs/components/esphome/sensor.pyi +4 -2
  82. homeassistant-stubs/components/esphome/update.pyi +0 -1
  83. homeassistant-stubs/components/esphome/voice_assistant.pyi +1 -1
  84. homeassistant-stubs/components/fastdotcom/sensor.pyi +0 -1
  85. homeassistant-stubs/components/filesize/sensor.pyi +0 -1
  86. homeassistant-stubs/components/flexit_bacnet/climate.pyi +4 -2
  87. homeassistant-stubs/components/flexit_bacnet/number.pyi +31 -0
  88. homeassistant-stubs/components/fritz/common.pyi +2 -1
  89. homeassistant-stubs/components/fully_kiosk/media_player.pyi +2 -1
  90. homeassistant-stubs/components/generic_thermostat/climate.pyi +1 -1
  91. homeassistant-stubs/components/goalzero/__init__.pyi +1 -0
  92. homeassistant-stubs/components/gpsd/sensor.pyi +15 -9
  93. homeassistant-stubs/components/group/__init__.pyi +1 -1
  94. homeassistant-stubs/components/group/light.pyi +3 -3
  95. homeassistant-stubs/components/hardkernel/__init__.pyi +1 -1
  96. homeassistant-stubs/components/hardware/hardware.pyi +2 -2
  97. homeassistant-stubs/components/hardware/websocket_api.pyi +1 -1
  98. homeassistant-stubs/components/homeassistant_green/__init__.pyi +1 -1
  99. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +2 -1
  100. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +3 -2
  101. homeassistant-stubs/components/homekit/__init__.pyi +1 -1
  102. homeassistant-stubs/components/homekit/accessories.pyi +1 -1
  103. homeassistant-stubs/components/homekit/config_flow.pyi +13 -4
  104. homeassistant-stubs/components/homekit/type_cameras.pyi +1 -1
  105. homeassistant-stubs/components/homekit/type_covers.pyi +1 -1
  106. homeassistant-stubs/components/homekit/type_humidifiers.pyi +1 -1
  107. homeassistant-stubs/components/homekit/type_triggers.pyi +3 -1
  108. homeassistant-stubs/components/homekit_controller/alarm_control_panel.pyi +0 -1
  109. homeassistant-stubs/components/homekit_controller/button.pyi +8 -4
  110. homeassistant-stubs/components/homekit_controller/utils.pyi +4 -0
  111. homeassistant-stubs/components/huawei_lte/binary_sensor.pyi +0 -6
  112. homeassistant-stubs/components/huawei_lte/switch.pyi +0 -4
  113. homeassistant-stubs/components/idasen_desk/sensor.pyi +2 -1
  114. homeassistant-stubs/components/image/__init__.pyi +13 -3
  115. homeassistant-stubs/components/image/media_source.pyi +18 -0
  116. homeassistant-stubs/components/imap/coordinator.pyi +8 -0
  117. homeassistant-stubs/components/imap/diagnostics.pyi +13 -0
  118. homeassistant-stubs/components/intent/__init__.pyi +1 -0
  119. homeassistant-stubs/components/islamic_prayer_times/config_flow.pyi +1 -1
  120. homeassistant-stubs/components/knx/config_flow.pyi +1 -1
  121. homeassistant-stubs/components/knx/schema.pyi +3 -18
  122. homeassistant-stubs/components/knx/validation.pyi +19 -0
  123. homeassistant-stubs/components/lamarzocco/calendar.pyi +21 -0
  124. homeassistant-stubs/components/lamarzocco/entity.pyi +7 -4
  125. homeassistant-stubs/components/lamarzocco/number.pyi +26 -1
  126. homeassistant-stubs/components/light/__init__.pyi +3 -0
  127. homeassistant-stubs/components/local_todo/todo.pyi +3 -1
  128. homeassistant-stubs/components/logbook/__init__.pyi +1 -1
  129. homeassistant-stubs/components/logbook/helpers.pyi +2 -2
  130. homeassistant-stubs/components/logbook/models.pyi +2 -2
  131. homeassistant-stubs/components/mailbox/__init__.pyi +1 -0
  132. homeassistant-stubs/components/matter/light.pyi +6 -5
  133. homeassistant-stubs/components/media_player/intent.pyi +11 -0
  134. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  135. homeassistant-stubs/components/modbus/climate.pyi +1 -0
  136. homeassistant-stubs/components/modbus/validators.pyi +4 -4
  137. homeassistant-stubs/components/mqtt/__init__.pyi +3 -3
  138. homeassistant-stubs/components/mqtt/climate.pyi +1 -8
  139. homeassistant-stubs/components/mqtt/const.pyi +2 -0
  140. homeassistant-stubs/components/mqtt/event.pyi +1 -1
  141. homeassistant-stubs/components/mqtt/image.pyi +1 -1
  142. homeassistant-stubs/components/mqtt/mixins.pyi +2 -2
  143. homeassistant-stubs/components/mqtt/models.pyi +10 -0
  144. homeassistant-stubs/components/mqtt/tag.pyi +1 -1
  145. homeassistant-stubs/components/myuplink/__init__.pyi +2 -1
  146. homeassistant-stubs/components/myuplink/binary_sensor.pyi +24 -0
  147. homeassistant-stubs/components/myuplink/config_flow.pyi +7 -0
  148. homeassistant-stubs/components/myuplink/coordinator.pyi +1 -2
  149. homeassistant-stubs/components/myuplink/diagnostics.pyi +11 -0
  150. homeassistant-stubs/components/myuplink/helpers.pyi +6 -0
  151. homeassistant-stubs/components/myuplink/number.pyi +30 -0
  152. homeassistant-stubs/components/myuplink/sensor.pyi +20 -3
  153. homeassistant-stubs/components/myuplink/switch.pyi +29 -0
  154. homeassistant-stubs/components/myuplink/update.pyi +20 -0
  155. homeassistant-stubs/components/notion/__init__.pyi +10 -6
  156. homeassistant-stubs/components/notion/config_flow.pyi +11 -3
  157. homeassistant-stubs/components/notion/const.pyi +2 -0
  158. homeassistant-stubs/components/notion/diagnostics.pyi +2 -2
  159. homeassistant-stubs/components/notion/model.pyi +1 -1
  160. homeassistant-stubs/components/notion/util.pyi +7 -0
  161. homeassistant-stubs/components/rainmachine/util.pyi +1 -1
  162. homeassistant-stubs/components/raspberry_pi/__init__.pyi +1 -1
  163. homeassistant-stubs/components/recorder/__init__.pyi +1 -1
  164. homeassistant-stubs/components/recorder/core.pyi +1 -0
  165. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -5
  166. homeassistant-stubs/components/repairs/issue_handler.pyi +1 -1
  167. homeassistant-stubs/components/rfxtrx/__init__.pyi +3 -1
  168. homeassistant-stubs/components/samsungtv/__init__.pyi +1 -1
  169. homeassistant-stubs/components/samsungtv/config_flow.pyi +1 -0
  170. homeassistant-stubs/components/sensor/recorder.pyi +0 -2
  171. homeassistant-stubs/components/shelly/binary_sensor.pyi +1 -1
  172. homeassistant-stubs/components/shelly/button.pyi +1 -1
  173. homeassistant-stubs/components/shelly/climate.pyi +1 -3
  174. homeassistant-stubs/components/shelly/entity.pyi +1 -2
  175. homeassistant-stubs/components/shelly/number.pyi +1 -1
  176. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  177. homeassistant-stubs/components/shelly/switch.pyi +4 -5
  178. homeassistant-stubs/components/shelly/utils.pyi +2 -0
  179. homeassistant-stubs/components/shelly/valve.pyi +1 -1
  180. homeassistant-stubs/components/ssdp/__init__.pyi +1 -0
  181. homeassistant-stubs/components/statistics/sensor.pyi +4 -1
  182. homeassistant-stubs/components/system_health/__init__.pyi +1 -1
  183. homeassistant-stubs/components/systemmonitor/__init__.pyi +3 -0
  184. homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +48 -0
  185. homeassistant-stubs/components/systemmonitor/config_flow.pyi +2 -0
  186. homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
  187. homeassistant-stubs/components/systemmonitor/coordinator.pyi +14 -10
  188. homeassistant-stubs/components/systemmonitor/diagnostics.pyi +7 -0
  189. homeassistant-stubs/components/systemmonitor/repairs.pyi +15 -0
  190. homeassistant-stubs/components/systemmonitor/sensor.pyi +5 -4
  191. homeassistant-stubs/components/systemmonitor/util.pyi +6 -5
  192. homeassistant-stubs/components/technove/helpers.pyi +9 -0
  193. homeassistant-stubs/components/technove/switch.pyi +33 -0
  194. homeassistant-stubs/components/tedee/config_flow.pyi +1 -0
  195. homeassistant-stubs/components/tedee/sensor.pyi +1 -1
  196. homeassistant-stubs/components/tibber/sensor.pyi +3 -4
  197. homeassistant-stubs/components/tplink/config_flow.pyi +2 -2
  198. homeassistant-stubs/components/tplink/light.pyi +1 -0
  199. homeassistant-stubs/components/tplink_omada/binary_sensor.pyi +2 -2
  200. homeassistant-stubs/components/tplink_omada/config_flow.pyi +1 -1
  201. homeassistant-stubs/components/tplink_omada/controller.pyi +1 -1
  202. homeassistant-stubs/components/tplink_omada/coordinator.pyi +1 -1
  203. homeassistant-stubs/components/tplink_omada/update.pyi +1 -1
  204. homeassistant-stubs/components/tractive/device_tracker.pyi +0 -1
  205. homeassistant-stubs/components/unifi/__init__.pyi +1 -1
  206. homeassistant-stubs/components/unifi/button.pyi +1 -1
  207. homeassistant-stubs/components/unifi/config_flow.pyi +2 -2
  208. homeassistant-stubs/components/unifi/device_tracker.pyi +6 -6
  209. homeassistant-stubs/components/unifi/diagnostics.pyi +1 -1
  210. homeassistant-stubs/components/unifi/entity.pyi +13 -13
  211. homeassistant-stubs/components/unifi/hub/__init__.pyi +2 -0
  212. homeassistant-stubs/components/unifi/hub/api.pyi +10 -0
  213. homeassistant-stubs/components/unifi/{controller.pyi → hub/hub.pyi} +9 -19
  214. homeassistant-stubs/components/unifi/hub/websocket.pyi +25 -0
  215. homeassistant-stubs/components/unifi/image.pyi +4 -4
  216. homeassistant-stubs/components/unifi/sensor.pyi +14 -14
  217. homeassistant-stubs/components/unifi/switch.pyi +14 -14
  218. homeassistant-stubs/components/unifi/update.pyi +1 -1
  219. homeassistant-stubs/components/unifiprotect/__init__.pyi +1 -1
  220. homeassistant-stubs/components/unifiprotect/const.pyi +1 -0
  221. homeassistant-stubs/components/unifiprotect/data.pyi +3 -2
  222. homeassistant-stubs/components/unifiprotect/media_source.pyi +6 -3
  223. homeassistant-stubs/components/unifiprotect/repairs.pyi +8 -2
  224. homeassistant-stubs/components/usb/__init__.pyi +1 -1
  225. homeassistant-stubs/components/vacuum/intent.pyi +8 -0
  226. homeassistant-stubs/components/vallox/__init__.pyi +5 -23
  227. homeassistant-stubs/components/vallox/fan.pyi +1 -1
  228. homeassistant-stubs/components/valve/intent.pyi +6 -0
  229. homeassistant-stubs/components/wake_word/models.pyi +4 -2
  230. homeassistant-stubs/components/water_heater/__init__.pyi +2 -0
  231. homeassistant-stubs/components/websocket_api/http.pyi +1 -0
  232. homeassistant-stubs/components/wiz/light.pyi +3 -2
  233. homeassistant-stubs/components/xiaomi_ble/const.pyi +9 -0
  234. homeassistant-stubs/components/xiaomi_ble/device_trigger.pyi +1 -1
  235. homeassistant-stubs/components/xiaomi_ble/event.pyi +1 -1
  236. homeassistant-stubs/components/yalexs_ble/__init__.pyi +1 -1
  237. homeassistant-stubs/components/yalexs_ble/config_flow.pyi +1 -1
  238. homeassistant-stubs/components/zwave_js/climate.pyi +4 -0
  239. homeassistant-stubs/components/zwave_js/sensor.pyi +0 -1
  240. homeassistant-stubs/config.pyi +4 -2
  241. homeassistant-stubs/config_entries.pyi +38 -22
  242. homeassistant-stubs/core.pyi +8 -7
  243. homeassistant-stubs/data_entry_flow.pyi +1 -0
  244. homeassistant-stubs/helpers/area_registry.pyi +9 -4
  245. homeassistant-stubs/helpers/collection.pyi +19 -0
  246. homeassistant-stubs/helpers/config_validation.pyi +4 -0
  247. homeassistant-stubs/helpers/data_entry_flow.pyi +2 -1
  248. homeassistant-stubs/helpers/debounce.pyi +3 -1
  249. homeassistant-stubs/helpers/device_registry.pyi +13 -6
  250. homeassistant-stubs/helpers/entity.pyi +4 -2
  251. homeassistant-stubs/helpers/entity_component.pyi +1 -1
  252. homeassistant-stubs/helpers/entity_platform.pyi +7 -3
  253. homeassistant-stubs/helpers/entity_registry.pyi +10 -4
  254. homeassistant-stubs/helpers/event.pyi +28 -2
  255. homeassistant-stubs/helpers/floor_registry.pyi +59 -0
  256. homeassistant-stubs/helpers/icon.pyi +1 -1
  257. homeassistant-stubs/helpers/integration_platform.pyi +12 -8
  258. homeassistant-stubs/helpers/intent.pyi +8 -2
  259. homeassistant-stubs/helpers/json.pyi +1 -0
  260. homeassistant-stubs/helpers/label_registry.pyi +59 -0
  261. homeassistant-stubs/helpers/redact.pyi +13 -0
  262. homeassistant-stubs/helpers/service.pyi +1 -0
  263. homeassistant-stubs/helpers/storage.pyi +7 -3
  264. homeassistant-stubs/helpers/template.pyi +7 -0
  265. homeassistant-stubs/helpers/translation.pyi +18 -4
  266. homeassistant-stubs/helpers/update_coordinator.pyi +1 -0
  267. homeassistant-stubs/loader.pyi +24 -11
  268. homeassistant-stubs/setup.pyi +9 -3
  269. homeassistant-stubs/util/async_.pyi +3 -3
  270. homeassistant-stubs/util/file.pyi +2 -2
  271. homeassistant-stubs/util/yaml/loader.pyi +3 -0
  272. {homeassistant_stubs-2024.2.4.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/METADATA +2 -2
  273. {homeassistant_stubs-2024.2.4.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/RECORD +275 -239
  274. {homeassistant_stubs-2024.2.4.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/LICENSE +0 -0
  275. {homeassistant_stubs-2024.2.4.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
1
- from .controller import UniFiController as UniFiController
1
+ from .hub import UnifiHub as UnifiHub
2
2
  from _typeshed import Incomplete
3
3
  from collections.abc import Mapping
4
4
  from homeassistant.components.diagnostics import REDACTED as REDACTED, async_redact_data as async_redact_data
@@ -1,7 +1,7 @@
1
1
  import abc
2
2
  import aiounifi
3
3
  from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, DOMAIN as DOMAIN
4
- from .controller import UniFiController as UniFiController
4
+ from .hub import UnifiHub as UnifiHub
5
5
  from _typeshed import Incomplete
6
6
  from abc import abstractmethod
7
7
  from aiounifi.interfaces.api_handlers import APIHandler, CallbackType, ItemEvent, UnsubscribeType
@@ -18,25 +18,25 @@ from typing import Generic, TypeVar
18
18
  HandlerT = TypeVar('HandlerT', bound=APIHandler)
19
19
  SubscriptionT = Callable[[CallbackType, ItemEvent], UnsubscribeType]
20
20
 
21
- def async_device_available_fn(controller: UniFiController, obj_id: str) -> bool: ...
22
- def async_wlan_available_fn(controller: UniFiController, obj_id: str) -> bool: ...
23
- def async_device_device_info_fn(controller: UniFiController, obj_id: str) -> DeviceInfo: ...
24
- def async_wlan_device_info_fn(controller: UniFiController, obj_id: str) -> DeviceInfo: ...
25
- def async_client_device_info_fn(controller: UniFiController, obj_id: str) -> DeviceInfo: ...
21
+ def async_device_available_fn(hub: UnifiHub, obj_id: str) -> bool: ...
22
+ def async_wlan_available_fn(hub: UnifiHub, obj_id: str) -> bool: ...
23
+ def async_device_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
24
+ def async_wlan_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
25
+ def async_client_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
26
26
 
27
27
  @dataclass(frozen=True)
28
28
  class UnifiDescription(Generic[HandlerT, ApiItemT]):
29
- allowed_fn: Callable[[UniFiController, str], bool]
29
+ allowed_fn: Callable[[UnifiHub, str], bool]
30
30
  api_handler_fn: Callable[[aiounifi.Controller], HandlerT]
31
- available_fn: Callable[[UniFiController, str], bool]
32
- device_info_fn: Callable[[UniFiController, str], DeviceInfo | None]
31
+ available_fn: Callable[[UnifiHub, str], bool]
32
+ device_info_fn: Callable[[UnifiHub, str], DeviceInfo | None]
33
33
  event_is_on: tuple[EventKey, ...] | None
34
34
  event_to_subscribe: tuple[EventKey, ...] | None
35
35
  name_fn: Callable[[ApiItemT], str | None]
36
36
  object_fn: Callable[[aiounifi.Controller, str], ApiItemT]
37
37
  should_poll: bool
38
- supported_fn: Callable[[UniFiController, str], bool | None]
39
- unique_id_fn: Callable[[UniFiController, str], str]
38
+ supported_fn: Callable[[UnifiHub, str], bool | None]
39
+ unique_id_fn: Callable[[UnifiHub, str], str]
40
40
  def __init__(self, allowed_fn, api_handler_fn, available_fn, device_info_fn, event_is_on, event_to_subscribe, name_fn, object_fn, should_poll, supported_fn, unique_id_fn) -> None: ...
41
41
 
42
42
  @dataclass(frozen=True)
@@ -47,13 +47,13 @@ class UnifiEntity(Entity, Generic[HandlerT, ApiItemT], metaclass=abc.ABCMeta):
47
47
  entity_description: UnifiEntityDescription[HandlerT, ApiItemT]
48
48
  _attr_unique_id: str
49
49
  _obj_id: Incomplete
50
- controller: Incomplete
50
+ hub: Incomplete
51
51
  _removed: bool
52
52
  _attr_available: Incomplete
53
53
  _attr_device_info: Incomplete
54
54
  _attr_should_poll: Incomplete
55
55
  _attr_name: Incomplete
56
- def __init__(self, obj_id: str, controller: UniFiController, description: UnifiEntityDescription[HandlerT, ApiItemT]) -> None: ...
56
+ def __init__(self, obj_id: str, hub: UnifiHub, description: UnifiEntityDescription[HandlerT, ApiItemT]) -> None: ...
57
57
  async def async_added_to_hass(self) -> None: ...
58
58
  def async_signalling_callback(self, event: ItemEvent, obj_id: str) -> None: ...
59
59
  def async_signal_reachable_callback(self) -> None: ...
@@ -0,0 +1,2 @@
1
+ from .api import get_unifi_api as get_unifi_api
2
+ from .hub import UnifiHub as UnifiHub
@@ -0,0 +1,10 @@
1
+ import aiounifi
2
+ from ..const import CONF_SITE_ID as CONF_SITE_ID, LOGGER as LOGGER
3
+ from ..errors import AuthenticationRequired as AuthenticationRequired, CannotConnect as CannotConnect
4
+ from homeassistant.const import CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_USERNAME as CONF_USERNAME, CONF_VERIFY_SSL as CONF_VERIFY_SSL
5
+ from homeassistant.core import HomeAssistant as HomeAssistant
6
+ from homeassistant.helpers import aiohttp_client as aiohttp_client
7
+ from types import MappingProxyType
8
+ from typing import Any
9
+
10
+ async def get_unifi_api(hass: HomeAssistant, config: MappingProxyType[str, Any]) -> aiounifi.Controller: ...
@@ -1,32 +1,25 @@
1
1
  import aiounifi
2
- from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, CONF_ALLOW_BANDWIDTH_SENSORS as CONF_ALLOW_BANDWIDTH_SENSORS, CONF_ALLOW_UPTIME_SENSORS as CONF_ALLOW_UPTIME_SENSORS, CONF_BLOCK_CLIENT as CONF_BLOCK_CLIENT, CONF_CLIENT_SOURCE as CONF_CLIENT_SOURCE, CONF_DETECTION_TIME as CONF_DETECTION_TIME, CONF_DPI_RESTRICTIONS as CONF_DPI_RESTRICTIONS, CONF_IGNORE_WIRED_BUG as CONF_IGNORE_WIRED_BUG, CONF_SITE_ID as CONF_SITE_ID, CONF_SSID_FILTER as CONF_SSID_FILTER, CONF_TRACK_CLIENTS as CONF_TRACK_CLIENTS, CONF_TRACK_DEVICES as CONF_TRACK_DEVICES, CONF_TRACK_WIRED_CLIENTS as CONF_TRACK_WIRED_CLIENTS, DEFAULT_ALLOW_BANDWIDTH_SENSORS as DEFAULT_ALLOW_BANDWIDTH_SENSORS, DEFAULT_ALLOW_UPTIME_SENSORS as DEFAULT_ALLOW_UPTIME_SENSORS, DEFAULT_DETECTION_TIME as DEFAULT_DETECTION_TIME, DEFAULT_DPI_RESTRICTIONS as DEFAULT_DPI_RESTRICTIONS, DEFAULT_IGNORE_WIRED_BUG as DEFAULT_IGNORE_WIRED_BUG, DEFAULT_TRACK_CLIENTS as DEFAULT_TRACK_CLIENTS, DEFAULT_TRACK_DEVICES as DEFAULT_TRACK_DEVICES, DEFAULT_TRACK_WIRED_CLIENTS as DEFAULT_TRACK_WIRED_CLIENTS, LOGGER as LOGGER, PLATFORMS as PLATFORMS, UNIFI_WIRELESS_CLIENTS as UNIFI_WIRELESS_CLIENTS
3
- from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription
4
- from .errors import AuthenticationRequired as AuthenticationRequired, CannotConnect as CannotConnect
2
+ from ..const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, CONF_ALLOW_BANDWIDTH_SENSORS as CONF_ALLOW_BANDWIDTH_SENSORS, CONF_ALLOW_UPTIME_SENSORS as CONF_ALLOW_UPTIME_SENSORS, CONF_BLOCK_CLIENT as CONF_BLOCK_CLIENT, CONF_CLIENT_SOURCE as CONF_CLIENT_SOURCE, CONF_DETECTION_TIME as CONF_DETECTION_TIME, CONF_DPI_RESTRICTIONS as CONF_DPI_RESTRICTIONS, CONF_IGNORE_WIRED_BUG as CONF_IGNORE_WIRED_BUG, CONF_SITE_ID as CONF_SITE_ID, CONF_SSID_FILTER as CONF_SSID_FILTER, CONF_TRACK_CLIENTS as CONF_TRACK_CLIENTS, CONF_TRACK_DEVICES as CONF_TRACK_DEVICES, CONF_TRACK_WIRED_CLIENTS as CONF_TRACK_WIRED_CLIENTS, DEFAULT_ALLOW_BANDWIDTH_SENSORS as DEFAULT_ALLOW_BANDWIDTH_SENSORS, DEFAULT_ALLOW_UPTIME_SENSORS as DEFAULT_ALLOW_UPTIME_SENSORS, DEFAULT_DETECTION_TIME as DEFAULT_DETECTION_TIME, DEFAULT_DPI_RESTRICTIONS as DEFAULT_DPI_RESTRICTIONS, DEFAULT_IGNORE_WIRED_BUG as DEFAULT_IGNORE_WIRED_BUG, DEFAULT_TRACK_CLIENTS as DEFAULT_TRACK_CLIENTS, DEFAULT_TRACK_DEVICES as DEFAULT_TRACK_DEVICES, DEFAULT_TRACK_WIRED_CLIENTS as DEFAULT_TRACK_WIRED_CLIENTS, PLATFORMS as PLATFORMS, UNIFI_WIRELESS_CLIENTS as UNIFI_WIRELESS_CLIENTS
3
+ from ..entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription
4
+ from .websocket import UnifiWebsocket as UnifiWebsocket
5
5
  from _typeshed import Incomplete
6
6
  from datetime import datetime
7
7
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
- from homeassistant.const import CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_USERNAME as CONF_USERNAME, CONF_VERIFY_SSL as CONF_VERIFY_SSL, Platform as Platform
8
+ from homeassistant.const import CONF_HOST as CONF_HOST, Platform as Platform
9
9
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
10
- from homeassistant.helpers import aiohttp_client as aiohttp_client
11
10
  from homeassistant.helpers.device_registry import DeviceEntry as DeviceEntry, DeviceEntryType as DeviceEntryType, DeviceInfo as DeviceInfo
12
11
  from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect, async_dispatcher_send as async_dispatcher_send
13
12
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
14
13
  from homeassistant.helpers.entity_registry import async_entries_for_config_entry as async_entries_for_config_entry
15
14
  from homeassistant.helpers.event import async_call_later as async_call_later, async_track_time_interval as async_track_time_interval
16
- from types import MappingProxyType
17
- from typing import Any
18
15
 
19
- RETRY_TIMER: int
20
16
  CHECK_HEARTBEAT_INTERVAL: Incomplete
21
- CHECK_WEBSOCKET_INTERVAL: Incomplete
22
17
 
23
- class UniFiController:
18
+ class UnifiHub:
24
19
  hass: Incomplete
25
20
  config_entry: Incomplete
26
21
  api: Incomplete
27
- ws_task: Incomplete
28
- _cancel_websocket_check: Incomplete
29
- available: bool
22
+ websocket: Incomplete
30
23
  wireless_clients: Incomplete
31
24
  site: Incomplete
32
25
  is_admin: bool
@@ -51,8 +44,11 @@ class UniFiController:
51
44
  def load_config_entry_options(self) -> None: ...
52
45
  @property
53
46
  def host(self) -> str: ...
47
+ @property
48
+ def available(self) -> bool: ...
54
49
  @staticmethod
55
50
  def register_platform(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity], descriptions: tuple[UnifiEntityDescription, ...], requires_admin: bool = False) -> None: ...
51
+ def _async_should_add_entity(self, description: UnifiEntityDescription, obj_id: str) -> bool: ...
56
52
  def register_platform_add_entities(self, unifi_platform_entity: type[UnifiEntity], descriptions: tuple[UnifiEntityDescription, ...], async_add_entities: AddEntitiesCallback) -> None: ...
57
53
  @property
58
54
  def signal_reachable(self) -> str: ...
@@ -69,11 +65,5 @@ class UniFiController:
69
65
  def async_update_device_registry(self) -> DeviceEntry: ...
70
66
  @staticmethod
71
67
  async def async_config_entry_updated(hass: HomeAssistant, config_entry: ConfigEntry) -> None: ...
72
- def start_websocket(self) -> None: ...
73
- def reconnect(self, log: bool = False) -> None: ...
74
- async def async_reconnect(self) -> None: ...
75
- def _async_watch_websocket(self, now: datetime) -> None: ...
76
68
  def shutdown(self, event: Event) -> None: ...
77
69
  async def async_reset(self) -> bool: ...
78
-
79
- async def get_unifi_controller(hass: HomeAssistant, config: MappingProxyType[str, Any]) -> aiounifi.Controller: ...
@@ -0,0 +1,25 @@
1
+ import aiounifi
2
+ from ..const import LOGGER as LOGGER
3
+ from _typeshed import Incomplete
4
+ from datetime import datetime
5
+ from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
6
+ from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
7
+ from homeassistant.helpers.event import async_track_time_interval as async_track_time_interval
8
+
9
+ RETRY_TIMER: int
10
+ CHECK_WEBSOCKET_INTERVAL: Incomplete
11
+
12
+ class UnifiWebsocket:
13
+ hass: Incomplete
14
+ api: Incomplete
15
+ signal: Incomplete
16
+ ws_task: Incomplete
17
+ _cancel_websocket_check: Incomplete
18
+ available: bool
19
+ def __init__(self, hass: HomeAssistant, api: aiounifi.Controller, signal: str) -> None: ...
20
+ def start(self) -> None: ...
21
+ def stop(self) -> None: ...
22
+ async def stop_and_wait(self) -> None: ...
23
+ def start_websocket(self) -> None: ...
24
+ def reconnect(self, log: bool = False) -> None: ...
25
+ def _async_watch_websocket(self, now: datetime) -> None: ...
@@ -1,5 +1,5 @@
1
- from .controller import UniFiController as UniFiController
2
1
  from .entity import HandlerT as HandlerT, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_wlan_available_fn as async_wlan_available_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
2
+ from .hub import UnifiHub as UnifiHub
3
3
  from _typeshed import Incomplete
4
4
  from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
5
5
  from aiounifi.models.api import ApiItemT
@@ -13,11 +13,11 @@ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callb
13
13
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
14
14
  from typing import Generic
15
15
 
16
- def async_wlan_qr_code_image_fn(controller: UniFiController, wlan: Wlan) -> bytes: ...
16
+ def async_wlan_qr_code_image_fn(hub: UnifiHub, wlan: Wlan) -> bytes: ...
17
17
 
18
18
  @dataclass(frozen=True)
19
19
  class UnifiImageEntityDescriptionMixin(Generic[HandlerT, ApiItemT]):
20
- image_fn: Callable[[UniFiController, ApiItemT], bytes]
20
+ image_fn: Callable[[UnifiHub, ApiItemT], bytes]
21
21
  value_fn: Callable[[ApiItemT], str | None]
22
22
  def __init__(self, image_fn, value_fn) -> None: ...
23
23
 
@@ -34,7 +34,7 @@ class UnifiImageEntity(UnifiEntity[HandlerT, ApiItemT], ImageEntity):
34
34
  _attr_content_type: str
35
35
  current_image: bytes | None
36
36
  previous_value: str | None
37
- def __init__(self, obj_id: str, controller: UniFiController, description: UnifiEntityDescription[HandlerT, ApiItemT]) -> None: ...
37
+ def __init__(self, obj_id: str, hub: UnifiHub, description: UnifiEntityDescription[HandlerT, ApiItemT]) -> None: ...
38
38
  def image(self) -> bytes | None: ...
39
39
  _attr_image_last_updated: Incomplete
40
40
  def async_update_state(self, event: ItemEvent, obj_id: str) -> None: ...
@@ -1,6 +1,6 @@
1
1
  from .const import DEVICE_STATES as DEVICE_STATES
2
- from .controller import UniFiController as UniFiController
3
2
  from .entity import HandlerT as HandlerT, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_client_device_info_fn as async_client_device_info_fn, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn, async_wlan_available_fn as async_wlan_available_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
3
+ from .hub import UnifiHub as UnifiHub
4
4
  from _typeshed import Incomplete
5
5
  from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
6
6
  from aiounifi.models.api import ApiItemT
@@ -20,28 +20,28 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEnti
20
20
  from homeassistant.helpers.typing import StateType as StateType
21
21
  from typing import Generic
22
22
 
23
- def async_bandwidth_sensor_allowed_fn(controller: UniFiController, obj_id: str) -> bool: ...
24
- def async_uptime_sensor_allowed_fn(controller: UniFiController, obj_id: str) -> bool: ...
25
- def async_client_rx_value_fn(controller: UniFiController, client: Client) -> float: ...
26
- def async_client_tx_value_fn(controller: UniFiController, client: Client) -> float: ...
27
- def async_client_uptime_value_fn(controller: UniFiController, client: Client) -> datetime: ...
28
- def async_wlan_client_value_fn(controller: UniFiController, wlan: Wlan) -> int: ...
29
- def async_device_uptime_value_fn(controller: UniFiController, device: Device) -> datetime | None: ...
23
+ def async_bandwidth_sensor_allowed_fn(hub: UnifiHub, obj_id: str) -> bool: ...
24
+ def async_uptime_sensor_allowed_fn(hub: UnifiHub, obj_id: str) -> bool: ...
25
+ def async_client_rx_value_fn(hub: UnifiHub, client: Client) -> float: ...
26
+ def async_client_tx_value_fn(hub: UnifiHub, client: Client) -> float: ...
27
+ def async_client_uptime_value_fn(hub: UnifiHub, client: Client) -> datetime: ...
28
+ def async_wlan_client_value_fn(hub: UnifiHub, wlan: Wlan) -> int: ...
29
+ def async_device_uptime_value_fn(hub: UnifiHub, device: Device) -> datetime | None: ...
30
30
  def async_device_uptime_value_changed_fn(old: StateType | date | datetime | Decimal, new: datetime | float | str | None) -> bool: ...
31
- def async_device_outlet_power_supported_fn(controller: UniFiController, obj_id: str) -> bool: ...
32
- def async_device_outlet_supported_fn(controller: UniFiController, obj_id: str) -> bool: ...
33
- def async_client_is_connected_fn(controller: UniFiController, obj_id: str) -> bool: ...
31
+ def async_device_outlet_power_supported_fn(hub: UnifiHub, obj_id: str) -> bool: ...
32
+ def async_device_outlet_supported_fn(hub: UnifiHub, obj_id: str) -> bool: ...
33
+ def async_client_is_connected_fn(hub: UnifiHub, obj_id: str) -> bool: ...
34
34
 
35
35
  @dataclass(frozen=True)
36
36
  class UnifiSensorEntityDescriptionMixin(Generic[HandlerT, ApiItemT]):
37
- value_fn: Callable[[UniFiController, ApiItemT], datetime | float | str | None]
37
+ value_fn: Callable[[UnifiHub, ApiItemT], datetime | float | str | None]
38
38
  def __init__(self, value_fn) -> None: ...
39
39
 
40
- def async_device_state_value_fn(controller: UniFiController, device: Device) -> str: ...
40
+ def async_device_state_value_fn(hub: UnifiHub, device: Device) -> str: ...
41
41
 
42
42
  @dataclass(frozen=True)
43
43
  class UnifiSensorEntityDescription(SensorEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT], UnifiSensorEntityDescriptionMixin[HandlerT, ApiItemT]):
44
- is_connected_fn: Callable[[UniFiController, str], bool] | None = ...
44
+ is_connected_fn: Callable[[UnifiHub, str], bool] | None = ...
45
45
  value_changed_fn: Callable[[StateType | date | datetime | Decimal, datetime | float | str | None], bool] = ...
46
46
  def __init__(self, value_fn, allowed_fn, api_handler_fn, available_fn, device_info_fn, event_is_on, event_to_subscribe, name_fn, object_fn, should_poll, supported_fn, unique_id_fn, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, is_connected_fn, value_changed_fn) -> None: ...
47
47
 
@@ -1,7 +1,7 @@
1
1
  import aiounifi
2
2
  from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER
3
- from .controller import UNIFI_DOMAIN as UNIFI_DOMAIN, UniFiController as UniFiController
4
3
  from .entity import HandlerT as HandlerT, SubscriptionT as SubscriptionT, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_client_device_info_fn as async_client_device_info_fn, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
4
+ from .hub import UnifiHub as UnifiHub
5
5
  from _typeshed import Incomplete
6
6
  from aiounifi.interfaces.api_handlers import ItemEvent
7
7
  from aiounifi.models.api import ApiItemT
@@ -20,22 +20,22 @@ from typing import Any, Generic
20
20
  CLIENT_BLOCKED: Incomplete
21
21
  CLIENT_UNBLOCKED: Incomplete
22
22
 
23
- def async_block_client_allowed_fn(controller: UniFiController, obj_id: str) -> bool: ...
24
- def async_dpi_group_is_on_fn(controller: UniFiController, dpi_group: DPIRestrictionGroup) -> bool: ...
25
- def async_dpi_group_device_info_fn(controller: UniFiController, obj_id: str) -> DeviceInfo: ...
26
- def async_port_forward_device_info_fn(controller: UniFiController, obj_id: str) -> DeviceInfo: ...
27
- async def async_block_client_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
28
- async def async_dpi_group_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
29
- def async_outlet_supports_switching_fn(controller: UniFiController, obj_id: str) -> bool: ...
30
- async def async_outlet_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
31
- async def async_poe_port_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
32
- async def async_port_forward_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
33
- async def async_wlan_control_fn(controller: UniFiController, obj_id: str, target: bool) -> None: ...
23
+ def async_block_client_allowed_fn(hub: UnifiHub, obj_id: str) -> bool: ...
24
+ def async_dpi_group_is_on_fn(hub: UnifiHub, dpi_group: DPIRestrictionGroup) -> bool: ...
25
+ def async_dpi_group_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
26
+ def async_port_forward_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
27
+ async def async_block_client_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
28
+ async def async_dpi_group_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
29
+ def async_outlet_supports_switching_fn(hub: UnifiHub, obj_id: str) -> bool: ...
30
+ async def async_outlet_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
31
+ async def async_poe_port_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
32
+ async def async_port_forward_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
33
+ async def async_wlan_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
34
34
 
35
35
  @dataclass(frozen=True)
36
36
  class UnifiSwitchEntityDescriptionMixin(Generic[HandlerT, ApiItemT]):
37
- control_fn: Callable[[UniFiController, str, bool], Coroutine[Any, Any, None]]
38
- is_on_fn: Callable[[UniFiController, ApiItemT], bool]
37
+ control_fn: Callable[[UnifiHub, str, bool], Coroutine[Any, Any, None]]
38
+ is_on_fn: Callable[[UnifiHub, ApiItemT], bool]
39
39
  def __init__(self, control_fn, is_on_fn) -> None: ...
40
40
 
41
41
  @dataclass(frozen=True)
@@ -1,6 +1,6 @@
1
1
  import aiounifi
2
- from .controller import UniFiController as UniFiController
3
2
  from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn
3
+ from .hub import UnifiHub as UnifiHub
4
4
  from _typeshed import Incomplete
5
5
  from aiounifi.interfaces.api_handlers import ItemEvent
6
6
  from aiounifi.interfaces.devices import Devices
@@ -1,4 +1,4 @@
1
- from .const import CONF_ALLOW_EA as CONF_ALLOW_EA, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEVICES_THAT_ADOPT as DEVICES_THAT_ADOPT, DOMAIN as DOMAIN, MIN_REQUIRED_PROTECT_V as MIN_REQUIRED_PROTECT_V, OUTDATED_LOG_MESSAGE as OUTDATED_LOG_MESSAGE, PLATFORMS as PLATFORMS
1
+ from .const import AUTH_RETRIES as AUTH_RETRIES, CONF_ALLOW_EA as CONF_ALLOW_EA, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEVICES_THAT_ADOPT as DEVICES_THAT_ADOPT, DOMAIN as DOMAIN, MIN_REQUIRED_PROTECT_V as MIN_REQUIRED_PROTECT_V, OUTDATED_LOG_MESSAGE as OUTDATED_LOG_MESSAGE, PLATFORMS as PLATFORMS
2
2
  from .data import ProtectData as ProtectData, async_ufp_instance_for_config_entry_ids as async_ufp_instance_for_config_entry_ids
3
3
  from .discovery import async_start_discovery as async_start_discovery
4
4
  from .migrate import async_migrate_data as async_migrate_data
@@ -2,6 +2,7 @@ from _typeshed import Incomplete
2
2
  from homeassistant.const import Platform as Platform
3
3
 
4
4
  DOMAIN: str
5
+ AUTH_RETRIES: int
5
6
  ATTR_EVENT_SCORE: str
6
7
  ATTR_EVENT_ID: str
7
8
  ATTR_WIDTH: str
@@ -1,8 +1,8 @@
1
- from .const import CONF_DISABLE_RTSP as CONF_DISABLE_RTSP, CONF_MAX_MEDIA as CONF_MAX_MEDIA, DEFAULT_MAX_MEDIA as DEFAULT_MAX_MEDIA, DEVICES_THAT_ADOPT as DEVICES_THAT_ADOPT, DISPATCH_ADD as DISPATCH_ADD, DISPATCH_ADOPT as DISPATCH_ADOPT, DISPATCH_CHANNELS as DISPATCH_CHANNELS, DOMAIN as DOMAIN
1
+ from .const import AUTH_RETRIES as AUTH_RETRIES, CONF_DISABLE_RTSP as CONF_DISABLE_RTSP, CONF_MAX_MEDIA as CONF_MAX_MEDIA, DEFAULT_MAX_MEDIA as DEFAULT_MAX_MEDIA, DEVICES_THAT_ADOPT as DEVICES_THAT_ADOPT, DISPATCH_ADD as DISPATCH_ADD, DISPATCH_ADOPT as DISPATCH_ADOPT, DISPATCH_CHANNELS as DISPATCH_CHANNELS, DOMAIN as DOMAIN
2
2
  from .utils import async_get_devices_by_type as async_get_devices_by_type
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable, Generator, Iterable
5
- from datetime import timedelta
5
+ from datetime import datetime, timedelta
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
7
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
8
8
  from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
@@ -43,6 +43,7 @@ class ProtectData:
43
43
  def _async_update_device(self, device: ProtectAdoptableDeviceModel | NVR, changed_data: dict[str, Any]) -> None: ...
44
44
  def _async_process_ws_message(self, message: WSSubscriptionMessage) -> None: ...
45
45
  def _async_process_updates(self, updates: Bootstrap | None) -> None: ...
46
+ def _async_poll(self, now: datetime) -> None: ...
46
47
  def async_subscribe_device_id(self, mac: str, update_callback: Callable[[ProtectDeviceType], None]) -> CALLBACK_TYPE: ...
47
48
  def async_unsubscribe_device_id(self, mac: str, update_callback: Callable[[ProtectDeviceType], None]) -> None: ...
48
49
  def _async_signal_device_update(self, device: ProtectDeviceType) -> None: ...
@@ -22,6 +22,7 @@ class SimpleEventType(str, Enum):
22
22
  RING: str
23
23
  MOTION: str
24
24
  SMART: str
25
+ AUDIO: str
25
26
 
26
27
  class IdentifierType(str, Enum):
27
28
  EVENT: str
@@ -32,14 +33,16 @@ class IdentifierTimeType(str, Enum):
32
33
  RECENT: str
33
34
  RANGE: str
34
35
 
35
- EVENT_MAP: Incomplete
36
+ EVENT_MAP: dict[SimpleEventType, set[EventType]]
36
37
  EVENT_NAME_MAP: Incomplete
37
38
 
38
- def get_ufp_event(event_type: SimpleEventType) -> EventType | None: ...
39
+ def get_ufp_event(event_type: SimpleEventType) -> set[EventType]: ...
39
40
  async def async_get_media_source(hass: HomeAssistant) -> MediaSource: ...
40
41
  def _get_month_start_end(start: datetime) -> tuple[datetime, datetime]: ...
41
42
  def _bad_identifier(identifier: str, err: Exception | None = None) -> NoReturn: ...
42
43
  def _format_duration(duration: timedelta) -> str: ...
44
+ def _get_object_name(event: Event | dict[str, Any]) -> str: ...
45
+ def _get_audio_name(event: Event | dict[str, Any]) -> str: ...
43
46
 
44
47
  class ProtectMediaSource(MediaSource):
45
48
  name: str
@@ -54,7 +57,7 @@ class ProtectMediaSource(MediaSource):
54
57
  def async_get_registry(self) -> er.EntityRegistry: ...
55
58
  def _breadcrumb(self, data: ProtectData, base_title: str, camera: Camera | None = None, event_type: SimpleEventType | None = None, count: int | None = None) -> str: ...
56
59
  async def _build_event(self, data: ProtectData, event: dict[str, Any] | Event, thumbnail_only: bool = False) -> BrowseMediaSource: ...
57
- async def _build_events(self, data: ProtectData, start: datetime, end: datetime, camera_id: str | None = None, event_type: EventType | None = None, reserve: bool = False) -> list[BrowseMediaSource]: ...
60
+ async def _build_events(self, data: ProtectData, start: datetime, end: datetime, camera_id: str | None = None, event_types: set[EventType] | None = None, reserve: bool = False) -> list[BrowseMediaSource]: ...
58
61
  async def _build_recent(self, data: ProtectData, camera_id: str, event_type: SimpleEventType, days: int, build_children: bool = False) -> BrowseMediaSource: ...
59
62
  async def _build_month(self, data: ProtectData, camera_id: str, event_type: SimpleEventType, start: date, build_children: bool = False) -> BrowseMediaSource: ...
60
63
  async def _build_days(self, data: ProtectData, camera_id: str, event_type: SimpleEventType, start: date, is_all: bool = True, build_children: bool = False) -> BrowseMediaSource: ...
@@ -9,13 +9,19 @@ from pyunifiprotect import ProtectApiClient as ProtectApiClient
9
9
 
10
10
  _LOGGER: Incomplete
11
11
 
12
- class EAConfirm(RepairsFlow):
12
+ class ProtectRepair(RepairsFlow):
13
13
  _api: ProtectApiClient
14
14
  _entry: ConfigEntry
15
15
  def __init__(self, api: ProtectApiClient, entry: ConfigEntry) -> None: ...
16
- def _async_get_placeholders(self) -> dict[str, str] | None: ...
16
+ def _async_get_placeholders(self) -> dict[str, str]: ...
17
+
18
+ class EAConfirm(ProtectRepair):
17
19
  async def async_step_init(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
18
20
  async def async_step_start(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
19
21
  async def async_step_confirm(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
20
22
 
23
+ class CloudAccount(ProtectRepair):
24
+ async def async_step_init(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
25
+ async def async_step_confirm(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
26
+
21
27
  async def async_create_fix_flow(hass: HomeAssistant, issue_id: str, data: dict[str, str | int | float | None] | None) -> RepairsFlow: ...
@@ -36,7 +36,7 @@ class USBDiscovery:
36
36
  def __init__(self, hass: HomeAssistant, usb: list[USBMatcher]) -> None: ...
37
37
  async def async_setup(self) -> None: ...
38
38
  async def async_start(self, event: Event) -> None: ...
39
- async def async_stop(self, event: Event) -> None: ...
39
+ def async_stop(self, event: Event) -> None: ...
40
40
  async def _async_start_monitor(self) -> None: ...
41
41
  def _device_discovered(self, device: Device) -> None: ...
42
42
  def async_register_scan_request_callback(self, _callback: CALLBACK_TYPE) -> CALLBACK_TYPE: ...
@@ -0,0 +1,8 @@
1
+ from . import DOMAIN as DOMAIN, SERVICE_RETURN_TO_BASE as SERVICE_RETURN_TO_BASE, SERVICE_START as SERVICE_START
2
+ from homeassistant.core import HomeAssistant as HomeAssistant
3
+ from homeassistant.helpers import intent as intent
4
+
5
+ INTENT_VACUUM_START: str
6
+ INTENT_VACUUM_RETURN_TO_BASE: str
7
+
8
+ async def async_setup_intents(hass: HomeAssistant) -> None: ...
@@ -1,17 +1,13 @@
1
1
  import voluptuous as vol
2
- from .const import DEFAULT_FAN_SPEED_AWAY as DEFAULT_FAN_SPEED_AWAY, DEFAULT_FAN_SPEED_BOOST as DEFAULT_FAN_SPEED_BOOST, DEFAULT_FAN_SPEED_HOME as DEFAULT_FAN_SPEED_HOME, DEFAULT_NAME as DEFAULT_NAME, DOMAIN as DOMAIN, METRIC_KEY_PROFILE_FAN_SPEED_AWAY as METRIC_KEY_PROFILE_FAN_SPEED_AWAY, METRIC_KEY_PROFILE_FAN_SPEED_BOOST as METRIC_KEY_PROFILE_FAN_SPEED_BOOST, METRIC_KEY_PROFILE_FAN_SPEED_HOME as METRIC_KEY_PROFILE_FAN_SPEED_HOME, STATE_SCAN_INTERVAL as STATE_SCAN_INTERVAL
2
+ from .const import DEFAULT_FAN_SPEED_AWAY as DEFAULT_FAN_SPEED_AWAY, DEFAULT_FAN_SPEED_BOOST as DEFAULT_FAN_SPEED_BOOST, DEFAULT_FAN_SPEED_HOME as DEFAULT_FAN_SPEED_HOME, DEFAULT_NAME as DEFAULT_NAME, DOMAIN as DOMAIN, STATE_SCAN_INTERVAL as STATE_SCAN_INTERVAL
3
3
  from _typeshed import Incomplete
4
- from dataclasses import dataclass
5
- from datetime import date
6
4
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
5
  from homeassistant.const import CONF_HOST as CONF_HOST, CONF_NAME as CONF_NAME, Platform as Platform
8
6
  from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall
9
7
  from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
10
- from homeassistant.helpers.typing import StateType as StateType
11
8
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity, DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
12
- from typing import Any, NamedTuple
13
- from uuid import UUID
14
- from vallox_websocket_api import PROFILE as VALLOX_PROFILE, Vallox
9
+ from typing import NamedTuple
10
+ from vallox_websocket_api import MetricData, Vallox
15
11
 
16
12
  _LOGGER: Incomplete
17
13
  CONFIG_SCHEMA: Incomplete
@@ -28,21 +24,7 @@ SERVICE_SET_PROFILE_FAN_SPEED_AWAY: str
28
24
  SERVICE_SET_PROFILE_FAN_SPEED_BOOST: str
29
25
  SERVICE_TO_METHOD: Incomplete
30
26
 
31
- @dataclass
32
- class ValloxState:
33
- metric_cache: dict[str, Any] = ...
34
- profile: VALLOX_PROFILE = ...
35
- def get_metric(self, metric_key: str) -> StateType: ...
36
- @property
37
- def model(self) -> str | None: ...
38
- @property
39
- def sw_version(self) -> str: ...
40
- @property
41
- def uuid(self) -> UUID | None: ...
42
- def get_next_filter_change_date(self) -> date | None: ...
43
- def __init__(self, metric_cache, profile) -> None: ...
44
-
45
- class ValloxDataUpdateCoordinator(DataUpdateCoordinator[ValloxState]): ...
27
+ class ValloxDataUpdateCoordinator(DataUpdateCoordinator[MetricData]): ...
46
28
 
47
29
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
48
30
  async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
@@ -50,7 +32,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: .
50
32
  class ValloxServiceHandler:
51
33
  _client: Incomplete
52
34
  _coordinator: Incomplete
53
- def __init__(self, client: Vallox, coordinator: DataUpdateCoordinator[ValloxState]) -> None: ...
35
+ def __init__(self, client: Vallox, coordinator: DataUpdateCoordinator[MetricData]) -> None: ...
54
36
  async def async_set_profile_fan_speed_home(self, fan_speed: int = ...) -> bool: ...
55
37
  async def async_set_profile_fan_speed_away(self, fan_speed: int = ...) -> bool: ...
56
38
  async def async_set_profile_fan_speed_boost(self, fan_speed: int = ...) -> bool: ...
@@ -41,4 +41,4 @@ class ValloxFanEntity(ValloxEntity, FanEntity):
41
41
  async def async_set_percentage(self, percentage: int) -> None: ...
42
42
  async def _async_set_power(self, mode: bool) -> bool: ...
43
43
  async def _async_set_preset_mode_internal(self, preset_mode: str) -> bool: ...
44
- async def _async_set_percentage_internal(self, percentage: int) -> bool: ...
44
+ async def _async_set_percentage_internal(self, percentage: int, preset_mode: str | None = None) -> bool: ...
@@ -0,0 +1,6 @@
1
+ from . import ATTR_POSITION as ATTR_POSITION, DOMAIN as DOMAIN
2
+ from homeassistant.const import SERVICE_SET_VALVE_POSITION as SERVICE_SET_VALVE_POSITION
3
+ from homeassistant.core import HomeAssistant as HomeAssistant
4
+ from homeassistant.helpers import intent as intent
5
+
6
+ async def async_setup_intents(hass: HomeAssistant) -> None: ...
@@ -4,11 +4,13 @@ from dataclasses import dataclass
4
4
  class WakeWord:
5
5
  id: str
6
6
  name: str
7
- def __init__(self, id, name) -> None: ...
7
+ phrase: str | None = ...
8
+ def __init__(self, id, name, phrase) -> None: ...
8
9
 
9
10
  @dataclass
10
11
  class DetectionResult:
11
12
  wake_word_id: str
13
+ wake_word_phrase: str
12
14
  timestamp: int | None
13
15
  queued_audio: list[tuple[bytes, int]] | None = ...
14
- def __init__(self, wake_word_id, timestamp, queued_audio) -> None: ...
16
+ def __init__(self, wake_word_id, wake_word_phrase, timestamp, queued_audio) -> None: ...
@@ -5,6 +5,7 @@ from functools import cached_property as cached_property
5
5
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
6
6
  from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_TEMPERATURE as ATTR_TEMPERATURE, PRECISION_TENTHS as PRECISION_TENTHS, PRECISION_WHOLE as PRECISION_WHOLE, SERVICE_TURN_OFF as SERVICE_TURN_OFF, SERVICE_TURN_ON as SERVICE_TURN_ON, STATE_OFF as STATE_OFF, STATE_ON as STATE_ON, UnitOfTemperature as UnitOfTemperature
7
7
  from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall
8
+ from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
8
9
  from homeassistant.helpers.config_validation import PLATFORM_SCHEMA as PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE as PLATFORM_SCHEMA_BASE
9
10
  from homeassistant.helpers.deprecation import DeprecatedConstantEnum as DeprecatedConstantEnum, all_with_deprecated_constants as all_with_deprecated_constants, check_if_deprecated_constant as check_if_deprecated_constant, dir_with_deprecated_constants as dir_with_deprecated_constants
10
11
  from homeassistant.helpers.entity import Entity as Entity, EntityDescription as EntityDescription
@@ -109,6 +110,7 @@ class WaterHeaterEntity(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_):
109
110
  async def async_turn_off(self, **kwargs: Any) -> None: ...
110
111
  def set_operation_mode(self, operation_mode: str) -> None: ...
111
112
  async def async_set_operation_mode(self, operation_mode: str) -> None: ...
113
+ async def async_handle_set_operation_mode(self, operation_mode: str) -> None: ...
112
114
  def turn_away_mode_on(self) -> None: ...
113
115
  async def async_turn_away_mode_on(self) -> None: ...
114
116
  def turn_away_mode_off(self) -> None: ...
@@ -14,6 +14,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_
14
14
  from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
15
15
  from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
16
16
  from homeassistant.helpers.event import async_call_later as async_call_later
17
+ from homeassistant.util.async_ import create_eager_task as create_eager_task
17
18
  from homeassistant.util.json import json_loads as json_loads
18
19
  from typing import Any, Final
19
20
 
@@ -2,7 +2,7 @@ from .const import DOMAIN as DOMAIN
2
2
  from .entity import WizToggleEntity as WizToggleEntity
3
3
  from .models import WizData as WizData
4
4
  from _typeshed import Incomplete
5
- from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP as ATTR_COLOR_TEMP, ATTR_EFFECT as ATTR_EFFECT, ATTR_RGBWW_COLOR as ATTR_RGBWW_COLOR, ATTR_RGBW_COLOR as ATTR_RGBW_COLOR, ColorMode as ColorMode, LightEntity as LightEntity, LightEntityFeature as LightEntityFeature
5
+ from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP as ATTR_COLOR_TEMP, ATTR_EFFECT as ATTR_EFFECT, ATTR_RGBWW_COLOR as ATTR_RGBWW_COLOR, ATTR_RGBW_COLOR as ATTR_RGBW_COLOR, ColorMode as ColorMode, LightEntity as LightEntity, LightEntityFeature as LightEntityFeature, filter_supported_color_modes as filter_supported_color_modes
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
7
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
8
8
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
@@ -18,14 +18,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
18
18
 
19
19
  class WizBulbEntity(WizToggleEntity, LightEntity):
20
20
  _attr_name: Incomplete
21
+ _fixed_color_mode: ColorMode | None
21
22
  _attr_supported_color_modes: Incomplete
23
+ _attr_color_mode: Incomplete
22
24
  _attr_effect_list: Incomplete
23
25
  _attr_min_mireds: Incomplete
24
26
  _attr_max_mireds: Incomplete
25
27
  _attr_supported_features: Incomplete
26
28
  def __init__(self, wiz_data: WizData, name: str) -> None: ...
27
29
  _attr_brightness: Incomplete
28
- _attr_color_mode: Incomplete
29
30
  _attr_color_temp: Incomplete
30
31
  _attr_rgbww_color: Incomplete
31
32
  _attr_rgbw_color: Incomplete
@@ -12,12 +12,21 @@ EVENT_SUBTYPE: Final[str]
12
12
  EVENT_PROPERTIES: Final[str]
13
13
  XIAOMI_BLE_EVENT: Final[str]
14
14
  EVENT_CLASS_BUTTON: Final[str]
15
+ EVENT_CLASS_DIMMER: Final[str]
15
16
  EVENT_CLASS_MOTION: Final[str]
17
+ EVENT_CLASS_CUBE: Final[str]
16
18
  BUTTON: Final[str]
19
+ CUBE: Final[str]
20
+ DIMMER: Final[str]
17
21
  DOUBLE_BUTTON: Final[str]
18
22
  TRIPPLE_BUTTON: Final[str]
23
+ REMOTE: Final[str]
24
+ REMOTE_FAN: Final[str]
25
+ REMOTE_VENFAN: Final[str]
26
+ REMOTE_BATHROOM: Final[str]
19
27
  MOTION: Final[str]
20
28
  BUTTON_PRESS: Final[str]
29
+ BUTTON_PRESS_LONG: Final[str]
21
30
  BUTTON_PRESS_DOUBLE_LONG: Final[str]
22
31
  DOUBLE_BUTTON_PRESS_DOUBLE_LONG: Final[str]
23
32
  TRIPPLE_BUTTON_PRESS_DOUBLE_LONG: Final[str]
@@ -1,4 +1,4 @@
1
- from .const import BUTTON as BUTTON, BUTTON_PRESS as BUTTON_PRESS, BUTTON_PRESS_DOUBLE_LONG as BUTTON_PRESS_DOUBLE_LONG, CONF_SUBTYPE as CONF_SUBTYPE, DOMAIN as DOMAIN, DOUBLE_BUTTON as DOUBLE_BUTTON, DOUBLE_BUTTON_PRESS_DOUBLE_LONG as DOUBLE_BUTTON_PRESS_DOUBLE_LONG, EVENT_CLASS as EVENT_CLASS, EVENT_CLASS_BUTTON as EVENT_CLASS_BUTTON, EVENT_CLASS_MOTION as EVENT_CLASS_MOTION, EVENT_TYPE as EVENT_TYPE, MOTION as MOTION, MOTION_DEVICE as MOTION_DEVICE, TRIPPLE_BUTTON as TRIPPLE_BUTTON, TRIPPLE_BUTTON_PRESS_DOUBLE_LONG as TRIPPLE_BUTTON_PRESS_DOUBLE_LONG, XIAOMI_BLE_EVENT as XIAOMI_BLE_EVENT
1
+ from .const import BUTTON as BUTTON, BUTTON_PRESS as BUTTON_PRESS, BUTTON_PRESS_DOUBLE_LONG as BUTTON_PRESS_DOUBLE_LONG, BUTTON_PRESS_LONG as BUTTON_PRESS_LONG, CONF_SUBTYPE as CONF_SUBTYPE, CUBE as CUBE, DIMMER as DIMMER, DOMAIN as DOMAIN, DOUBLE_BUTTON as DOUBLE_BUTTON, DOUBLE_BUTTON_PRESS_DOUBLE_LONG as DOUBLE_BUTTON_PRESS_DOUBLE_LONG, EVENT_CLASS as EVENT_CLASS, EVENT_CLASS_BUTTON as EVENT_CLASS_BUTTON, EVENT_CLASS_CUBE as EVENT_CLASS_CUBE, EVENT_CLASS_DIMMER as EVENT_CLASS_DIMMER, EVENT_CLASS_MOTION as EVENT_CLASS_MOTION, EVENT_TYPE as EVENT_TYPE, MOTION as MOTION, MOTION_DEVICE as MOTION_DEVICE, REMOTE as REMOTE, REMOTE_BATHROOM as REMOTE_BATHROOM, REMOTE_FAN as REMOTE_FAN, REMOTE_VENFAN as REMOTE_VENFAN, TRIPPLE_BUTTON as TRIPPLE_BUTTON, TRIPPLE_BUTTON_PRESS_DOUBLE_LONG as TRIPPLE_BUTTON_PRESS_DOUBLE_LONG, XIAOMI_BLE_EVENT as XIAOMI_BLE_EVENT
2
2
  from _typeshed import Incomplete
3
3
  from dataclasses import dataclass
4
4
  from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA as DEVICE_TRIGGER_BASE_SCHEMA
@@ -1,5 +1,5 @@
1
1
  from . import format_discovered_event_class as format_discovered_event_class, format_event_dispatcher_name as format_event_dispatcher_name
2
- from .const import DOMAIN as DOMAIN, EVENT_CLASS_BUTTON as EVENT_CLASS_BUTTON, EVENT_CLASS_MOTION as EVENT_CLASS_MOTION, EVENT_PROPERTIES as EVENT_PROPERTIES, EVENT_TYPE as EVENT_TYPE, XiaomiBleEvent as XiaomiBleEvent
2
+ from .const import DOMAIN as DOMAIN, EVENT_CLASS_BUTTON as EVENT_CLASS_BUTTON, EVENT_CLASS_CUBE as EVENT_CLASS_CUBE, EVENT_CLASS_DIMMER as EVENT_CLASS_DIMMER, EVENT_CLASS_MOTION as EVENT_CLASS_MOTION, EVENT_PROPERTIES as EVENT_PROPERTIES, EVENT_TYPE as EVENT_TYPE, XiaomiBleEvent as XiaomiBleEvent
3
3
  from .coordinator import XiaomiActiveBluetoothProcessorCoordinator as XiaomiActiveBluetoothProcessorCoordinator
4
4
  from _typeshed import Incomplete
5
5
  from homeassistant.components.event import EventDeviceClass as EventDeviceClass, EventEntity as EventEntity, EventEntityDescription as EventEntityDescription
@@ -4,7 +4,7 @@ from .util import async_find_existing_service_info as async_find_existing_servic
4
4
  from homeassistant.components import bluetooth as bluetooth
5
5
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
6
6
  from homeassistant.const import CONF_ADDRESS as CONF_ADDRESS, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, Platform as Platform
7
- from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
7
+ from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, CoreState as CoreState, Event as Event, HomeAssistant as HomeAssistant, callback as callback
8
8
  from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed, ConfigEntryNotReady as ConfigEntryNotReady
9
9
  from yalexs_ble import ConnectionInfo as ConnectionInfo, LockInfo as LockInfo, LockState as LockState
10
10