homeassistant-stubs 2025.3.3__py3-none-any.whl → 2025.4.0__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 (334) hide show
  1. homeassistant-stubs/bootstrap.pyi +3 -2
  2. homeassistant-stubs/components/accuweather/const.pyi +3 -1
  3. homeassistant-stubs/components/accuweather/sensor.pyi +1 -1
  4. homeassistant-stubs/components/anova/config_flow.pyi +4 -1
  5. homeassistant-stubs/components/anthemav/media_player.pyi +2 -0
  6. homeassistant-stubs/components/arwn/sensor.pyi +3 -2
  7. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +14 -5
  8. homeassistant-stubs/components/assist_satellite/const.pyi +3 -0
  9. homeassistant-stubs/components/assist_satellite/entity.pyi +6 -4
  10. homeassistant-stubs/components/azure_storage/__init__.pyi +1 -1
  11. homeassistant-stubs/components/azure_storage/backup.pyi +1 -1
  12. homeassistant-stubs/components/azure_storage/config_flow.pyi +7 -0
  13. homeassistant-stubs/components/backup/__init__.pyi +2 -2
  14. homeassistant-stubs/components/backup/agent.pyi +1 -1
  15. homeassistant-stubs/components/backup/backup.pyi +1 -1
  16. homeassistant-stubs/components/backup/config_flow.pyi +7 -0
  17. homeassistant-stubs/components/backup/coordinator.pyi +28 -0
  18. homeassistant-stubs/components/backup/diagnostics.pyi +7 -0
  19. homeassistant-stubs/components/backup/entity.pyi +13 -0
  20. homeassistant-stubs/components/backup/http.pyi +1 -0
  21. homeassistant-stubs/components/backup/manager.pyi +8 -3
  22. homeassistant-stubs/components/backup/sensor.pyi +23 -0
  23. homeassistant-stubs/components/bosch_alarm/__init__.pyi +12 -0
  24. homeassistant-stubs/components/bosch_alarm/alarm_control_panel.pyi +31 -0
  25. homeassistant-stubs/components/bosch_alarm/config_flow.pyi +20 -0
  26. homeassistant-stubs/components/bosch_alarm/const.pyi +4 -0
  27. homeassistant-stubs/components/bring/diagnostics.pyi +5 -0
  28. homeassistant-stubs/components/brother/__init__.pyi +1 -0
  29. homeassistant-stubs/components/brother/coordinator.pyi +1 -0
  30. homeassistant-stubs/components/cloud/backup.pyi +3 -3
  31. homeassistant-stubs/components/cloud/http_api.pyi +6 -3
  32. homeassistant-stubs/components/cloud/tts.pyi +2 -2
  33. homeassistant-stubs/components/comelit/__init__.pyi +11 -0
  34. homeassistant-stubs/components/comelit/alarm_control_panel.pyi +44 -0
  35. homeassistant-stubs/components/comelit/binary_sensor.pyi +22 -0
  36. homeassistant-stubs/components/comelit/climate.pyi +60 -0
  37. homeassistant-stubs/components/comelit/config_flow.pyi +28 -0
  38. homeassistant-stubs/components/comelit/const.pyi +7 -0
  39. homeassistant-stubs/components/comelit/coordinator.pyi +38 -0
  40. homeassistant-stubs/components/comelit/cover.pyi +39 -0
  41. homeassistant-stubs/components/comelit/diagnostics.pyi +10 -0
  42. homeassistant-stubs/components/comelit/humidifier.pyi +61 -0
  43. homeassistant-stubs/components/comelit/light.pyi +28 -0
  44. homeassistant-stubs/components/comelit/sensor.pyi +45 -0
  45. homeassistant-stubs/components/comelit/switch.pyi +27 -0
  46. homeassistant-stubs/components/cover/reproduce_state.pyi +17 -6
  47. homeassistant-stubs/components/demo/valve.pyi +30 -0
  48. homeassistant-stubs/components/discovergy/__init__.pyi +1 -1
  49. homeassistant-stubs/components/energy/data.pyi +1 -0
  50. homeassistant-stubs/components/enigma2/config_flow.pyi +1 -0
  51. homeassistant-stubs/components/esphome/__init__.pyi +1 -1
  52. homeassistant-stubs/components/esphome/assist_satellite.pyi +2 -0
  53. homeassistant-stubs/components/esphome/config_flow.pyi +1 -0
  54. homeassistant-stubs/components/esphome/const.pyi +1 -0
  55. homeassistant-stubs/components/esphome/diagnostics.pyi +0 -1
  56. homeassistant-stubs/components/esphome/event.pyi +2 -0
  57. homeassistant-stubs/components/esphome/manager.pyi +1 -1
  58. homeassistant-stubs/components/fritzbox/climate.pyi +1 -1
  59. homeassistant-stubs/components/frontend/__init__.pyi +9 -10
  60. homeassistant-stubs/components/frontend/storage.pyi +2 -1
  61. homeassistant-stubs/components/gios/__init__.pyi +1 -0
  62. homeassistant-stubs/components/gios/config_flow.pyi +1 -0
  63. homeassistant-stubs/components/gios/coordinator.pyi +2 -2
  64. homeassistant-stubs/components/google/calendar.pyi +3 -2
  65. homeassistant-stubs/components/google_drive/backup.pyi +2 -2
  66. homeassistant-stubs/components/habitica/const.pyi +25 -0
  67. homeassistant-stubs/components/habitica/services.pyi +6 -2
  68. homeassistant-stubs/components/heos/const.pyi +1 -0
  69. homeassistant-stubs/components/heos/coordinator.pyi +5 -5
  70. homeassistant-stubs/components/heos/media_player.pyi +18 -8
  71. homeassistant-stubs/components/home_connect/__init__.pyi +6 -17
  72. homeassistant-stubs/components/home_connect/button.pyi +0 -2
  73. homeassistant-stubs/components/home_connect/const.pyi +1 -6
  74. homeassistant-stubs/components/home_connect/coordinator.pyi +4 -2
  75. homeassistant-stubs/components/home_connect/entity.pyi +7 -2
  76. homeassistant-stubs/components/home_connect/light.pyi +1 -1
  77. homeassistant-stubs/components/home_connect/number.pyi +4 -3
  78. homeassistant-stubs/components/home_connect/select.pyi +7 -3
  79. homeassistant-stubs/components/home_connect/sensor.pyi +3 -1
  80. homeassistant-stubs/components/home_connect/services.pyi +35 -0
  81. homeassistant-stubs/components/home_connect/switch.pyi +2 -1
  82. homeassistant-stubs/components/home_connect/time.pyi +6 -1
  83. homeassistant-stubs/components/homeassistant_hardware/coordinator.pyi +15 -0
  84. homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +2 -1
  85. homeassistant-stubs/components/homeassistant_hardware/update.pyi +68 -0
  86. homeassistant-stubs/components/homeassistant_hardware/util.pyi +6 -1
  87. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +7 -1
  88. homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +1 -1
  89. homeassistant-stubs/components/homeassistant_sky_connect/const.pyi +10 -0
  90. homeassistant-stubs/components/homeassistant_sky_connect/update.pyi +29 -0
  91. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +1 -1
  92. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +1 -1
  93. homeassistant-stubs/components/homeassistant_yellow/const.pyi +4 -0
  94. homeassistant-stubs/components/homeassistant_yellow/update.pyi +29 -0
  95. homeassistant-stubs/components/homee/binary_sensor.pyi +21 -0
  96. homeassistant-stubs/components/homee/button.pyi +1 -0
  97. homeassistant-stubs/components/homee/cover.pyi +1 -0
  98. homeassistant-stubs/components/homee/light.pyi +1 -0
  99. homeassistant-stubs/components/homee/lock.pyi +25 -0
  100. homeassistant-stubs/components/homee/number.pyi +1 -0
  101. homeassistant-stubs/components/homee/select.pyi +23 -0
  102. homeassistant-stubs/components/homee/sensor.pyi +2 -0
  103. homeassistant-stubs/components/homee/switch.pyi +2 -0
  104. homeassistant-stubs/components/homee/valve.pyi +1 -0
  105. homeassistant-stubs/components/homekit/__init__.pyi +3 -1
  106. homeassistant-stubs/components/homekit/accessories.pyi +1 -0
  107. homeassistant-stubs/components/homekit/type_switches.pyi +6 -0
  108. homeassistant-stubs/components/huawei_lte/__init__.pyi +1 -1
  109. homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +7 -7
  110. homeassistant-stubs/components/incomfort/config_flow.pyi +1 -0
  111. homeassistant-stubs/components/iron_os/coordinator.pyi +2 -0
  112. homeassistant-stubs/components/iron_os/number.pyi +2 -0
  113. homeassistant-stubs/components/iron_os/select.pyi +3 -0
  114. homeassistant-stubs/components/jewish_calendar/__init__.pyi +9 -2
  115. homeassistant-stubs/components/jewish_calendar/binary_sensor.pyi +4 -4
  116. homeassistant-stubs/components/jewish_calendar/const.pyi +3 -0
  117. homeassistant-stubs/components/jewish_calendar/entity.pyi +2 -2
  118. homeassistant-stubs/components/jewish_calendar/sensor.pyi +5 -6
  119. homeassistant-stubs/components/jewish_calendar/service.pyi +10 -0
  120. homeassistant-stubs/components/lawn_mower/__init__.pyi +1 -0
  121. homeassistant-stubs/components/linkplay/entity.pyi +0 -1
  122. homeassistant-stubs/components/linkplay/media_player.pyi +3 -2
  123. homeassistant-stubs/components/linkplay/utils.pyi +0 -32
  124. homeassistant-stubs/components/lovelace/__init__.pyi +3 -1
  125. homeassistant-stubs/components/mastodon/__init__.pyi +2 -2
  126. homeassistant-stubs/components/mastodon/config_flow.pyi +2 -1
  127. homeassistant-stubs/components/mastodon/const.pyi +0 -7
  128. homeassistant-stubs/components/mastodon/coordinator.pyi +5 -5
  129. homeassistant-stubs/components/mastodon/diagnostics.pyi +2 -1
  130. homeassistant-stubs/components/mastodon/entity.pyi +1 -1
  131. homeassistant-stubs/components/mastodon/notify.pyi +3 -2
  132. homeassistant-stubs/components/mastodon/sensor.pyi +2 -3
  133. homeassistant-stubs/components/mastodon/services.pyi +1 -0
  134. homeassistant-stubs/components/mastodon/utils.pyi +3 -2
  135. homeassistant-stubs/components/mcp/coordinator.pyi +2 -9
  136. homeassistant-stubs/components/mcp_server/config_flow.pyi +1 -1
  137. homeassistant-stubs/components/mcp_server/const.pyi +1 -2
  138. homeassistant-stubs/components/mcp_server/server.pyi +1 -0
  139. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  140. homeassistant-stubs/components/modbus/climate.pyi +6 -2
  141. homeassistant-stubs/components/modbus/const.pyi +10 -0
  142. homeassistant-stubs/components/mqtt/config_flow.pyi +95 -7
  143. homeassistant-stubs/components/mqtt/const.pyi +65 -0
  144. homeassistant-stubs/components/mqtt/cover.pyi +2 -0
  145. homeassistant-stubs/components/mqtt/entity.pyi +4 -4
  146. homeassistant-stubs/components/mqtt/lawn_mower.pyi +1 -2
  147. homeassistant-stubs/components/mqtt/light/schema_basic.pyi +2 -48
  148. homeassistant-stubs/components/mqtt/light/schema_json.pyi +1 -14
  149. homeassistant-stubs/components/mqtt/light/schema_template.pyi +3 -14
  150. homeassistant-stubs/components/mqtt/models.pyi +25 -1
  151. homeassistant-stubs/components/mqtt/sensor.pyi +6 -5
  152. homeassistant-stubs/components/mqtt/update.pyi +1 -1
  153. homeassistant-stubs/components/mqtt/util.pyi +2 -0
  154. homeassistant-stubs/components/mysensors/__init__.pyi +1 -1
  155. homeassistant-stubs/components/mysensors/binary_sensor.pyi +0 -1
  156. homeassistant-stubs/components/mysensors/climate.pyi +0 -1
  157. homeassistant-stubs/components/mysensors/const.pyi +0 -1
  158. homeassistant-stubs/components/mysensors/cover.pyi +1 -2
  159. homeassistant-stubs/components/mysensors/device_tracker.pyi +0 -1
  160. homeassistant-stubs/components/mysensors/gateway.pyi +1 -1
  161. homeassistant-stubs/components/mysensors/helpers.pyi +1 -3
  162. homeassistant-stubs/components/mysensors/light.pyi +4 -5
  163. homeassistant-stubs/components/mysensors/remote.pyi +0 -1
  164. homeassistant-stubs/components/mysensors/sensor.pyi +0 -1
  165. homeassistant-stubs/components/mysensors/switch.pyi +1 -2
  166. homeassistant-stubs/components/mysensors/text.pyi +0 -1
  167. homeassistant-stubs/components/nam/button.pyi +2 -0
  168. homeassistant-stubs/components/nam/const.pyi +1 -0
  169. homeassistant-stubs/components/nam/sensor.pyi +2 -2
  170. homeassistant-stubs/components/nest/media_source.pyi +5 -0
  171. homeassistant-stubs/components/nextdns/__init__.pyi +1 -1
  172. homeassistant-stubs/components/nextdns/button.pyi +2 -0
  173. homeassistant-stubs/components/nextdns/config_flow.pyi +1 -0
  174. homeassistant-stubs/components/nextdns/switch.pyi +1 -0
  175. homeassistant-stubs/components/nut/__init__.pyi +1 -0
  176. homeassistant-stubs/components/nut/button.pyi +14 -0
  177. homeassistant-stubs/components/nut/entity.pyi +19 -0
  178. homeassistant-stubs/components/nut/sensor.pyi +8 -13
  179. homeassistant-stubs/components/nut/switch.pyi +18 -0
  180. homeassistant-stubs/components/onboarding/views.pyi +2 -1
  181. homeassistant-stubs/components/onedrive/__init__.pyi +4 -0
  182. homeassistant-stubs/components/onedrive/backup.pyi +1 -1
  183. homeassistant-stubs/components/onedrive/services.pyi +15 -0
  184. homeassistant-stubs/components/openai_conversation/__init__.pyi +5 -1
  185. homeassistant-stubs/components/openai_conversation/config_flow.pyi +5 -2
  186. homeassistant-stubs/components/openai_conversation/const.pyi +22 -11
  187. homeassistant-stubs/components/openai_conversation/conversation.pyi +6 -7
  188. homeassistant-stubs/components/overkiz/water_heater/__init__.pyi +1 -0
  189. homeassistant-stubs/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.pyi +41 -0
  190. homeassistant-stubs/components/purpleair/__init__.pyi +5 -10
  191. homeassistant-stubs/components/purpleair/const.pyi +6 -4
  192. homeassistant-stubs/components/purpleair/coordinator.pyi +3 -2
  193. homeassistant-stubs/components/purpleair/diagnostics.pyi +2 -4
  194. homeassistant-stubs/components/purpleair/entity.pyi +2 -3
  195. homeassistant-stubs/components/purpleair/sensor.pyi +4 -5
  196. homeassistant-stubs/components/pyload/__init__.pyi +12 -0
  197. homeassistant-stubs/components/pyload/button.pyi +32 -0
  198. homeassistant-stubs/components/pyload/config_flow.pyi +23 -0
  199. homeassistant-stubs/components/pyload/const.pyi +6 -0
  200. homeassistant-stubs/components/pyload/coordinator.pyi +34 -0
  201. homeassistant-stubs/components/pyload/diagnostics.pyi +10 -0
  202. homeassistant-stubs/components/pyload/entity.pyi +13 -0
  203. homeassistant-stubs/components/pyload/sensor.pyi +33 -0
  204. homeassistant-stubs/components/pyload/switch.pyi +37 -0
  205. homeassistant-stubs/components/qbus/climate.pyi +41 -0
  206. homeassistant-stubs/components/qbus/light.pyi +3 -3
  207. homeassistant-stubs/components/recorder/const.pyi +1 -0
  208. homeassistant-stubs/components/recorder/core.pyi +1 -2
  209. homeassistant-stubs/components/recorder/db_schema.pyi +3 -1
  210. homeassistant-stubs/components/recorder/migration.pyi +16 -2
  211. homeassistant-stubs/components/recorder/models/__init__.pyi +2 -2
  212. homeassistant-stubs/components/recorder/models/statistics.pyi +10 -2
  213. homeassistant-stubs/components/recorder/statistics.pyi +27 -9
  214. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +5 -3
  215. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  216. homeassistant-stubs/components/remote_calendar/__init__.pyi +11 -0
  217. homeassistant-stubs/components/remote_calendar/calendar.pyi +26 -0
  218. homeassistant-stubs/components/remote_calendar/config_flow.pyi +13 -0
  219. homeassistant-stubs/components/remote_calendar/const.pyi +2 -0
  220. homeassistant-stubs/components/remote_calendar/coordinator.pyi +20 -0
  221. homeassistant-stubs/components/remote_calendar/diagnostics.pyi +5 -0
  222. homeassistant-stubs/components/renault/config_flow.pyi +1 -0
  223. homeassistant-stubs/components/reolink/__init__.pyi +1 -1
  224. homeassistant-stubs/components/reolink/binary_sensor.pyi +17 -1
  225. homeassistant-stubs/components/reolink/config_flow.pyi +1 -1
  226. homeassistant-stubs/components/reolink/const.pyi +1 -0
  227. homeassistant-stubs/components/reolink/host.pyi +4 -4
  228. homeassistant-stubs/components/reolink/number.pyi +21 -1
  229. homeassistant-stubs/components/reolink/select.pyi +17 -1
  230. homeassistant-stubs/components/reolink/update.pyi +2 -1
  231. homeassistant-stubs/components/reolink/util.pyi +7 -0
  232. homeassistant-stubs/components/roborock/__init__.pyi +5 -3
  233. homeassistant-stubs/components/roborock/binary_sensor.pyi +4 -1
  234. homeassistant-stubs/components/roborock/button.pyi +11 -1
  235. homeassistant-stubs/components/roborock/config_flow.pyi +7 -3
  236. homeassistant-stubs/components/roborock/const.pyi +7 -1
  237. homeassistant-stubs/components/roborock/coordinator.pyi +18 -3
  238. homeassistant-stubs/components/roborock/entity.pyi +3 -1
  239. homeassistant-stubs/components/roborock/image.pyi +2 -7
  240. homeassistant-stubs/components/roborock/models.pyi +7 -0
  241. homeassistant-stubs/components/roborock/number.pyi +1 -0
  242. homeassistant-stubs/components/roborock/select.pyi +7 -5
  243. homeassistant-stubs/components/roborock/sensor.pyi +14 -1
  244. homeassistant-stubs/components/roborock/switch.pyi +2 -0
  245. homeassistant-stubs/components/roborock/time.pyi +1 -0
  246. homeassistant-stubs/components/roborock/vacuum.pyi +1 -1
  247. homeassistant-stubs/components/sensor/const.pyi +2 -0
  248. homeassistant-stubs/components/sensor/recorder.pyi +15 -3
  249. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  250. homeassistant-stubs/components/shelly/bluetooth/__init__.pyi +4 -2
  251. homeassistant-stubs/components/shelly/button.pyi +22 -7
  252. homeassistant-stubs/components/shelly/climate.pyi +1 -1
  253. homeassistant-stubs/components/shelly/config_flow.pyi +5 -5
  254. homeassistant-stubs/components/shelly/const.pyi +0 -1
  255. homeassistant-stubs/components/shelly/coordinator.pyi +5 -1
  256. homeassistant-stubs/components/shelly/diagnostics.pyi +1 -2
  257. homeassistant-stubs/components/shelly/entity.pyi +1 -3
  258. homeassistant-stubs/components/shelly/event.pyi +1 -1
  259. homeassistant-stubs/components/shelly/number.pyi +1 -1
  260. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  261. homeassistant-stubs/components/shelly/switch.pyi +14 -14
  262. homeassistant-stubs/components/shelly/update.pyi +1 -1
  263. homeassistant-stubs/components/shelly/utils.pyi +6 -2
  264. homeassistant-stubs/components/skybell/config_flow.pyi +3 -0
  265. homeassistant-stubs/components/smlight/__init__.pyi +0 -2
  266. homeassistant-stubs/components/smlight/sensor.pyi +5 -2
  267. homeassistant-stubs/components/smlight/update.pyi +0 -1
  268. homeassistant-stubs/components/squeezebox/browse_media.pyi +6 -11
  269. homeassistant-stubs/components/squeezebox/button.pyi +31 -0
  270. homeassistant-stubs/components/squeezebox/entity.pyi +8 -2
  271. homeassistant-stubs/components/squeezebox/media_player.pyi +3 -5
  272. homeassistant-stubs/components/synology_dsm/__init__.pyi +5 -7
  273. homeassistant-stubs/components/synology_dsm/backup.pyi +3 -4
  274. homeassistant-stubs/components/synology_dsm/binary_sensor.pyi +2 -5
  275. homeassistant-stubs/components/synology_dsm/button.pyi +2 -3
  276. homeassistant-stubs/components/synology_dsm/camera.pyi +2 -4
  277. homeassistant-stubs/components/synology_dsm/config_flow.pyi +3 -2
  278. homeassistant-stubs/components/synology_dsm/coordinator.pyi +15 -5
  279. homeassistant-stubs/components/synology_dsm/diagnostics.pyi +3 -4
  280. homeassistant-stubs/components/synology_dsm/media_source.pyi +3 -1
  281. homeassistant-stubs/components/synology_dsm/repairs.pyi +2 -3
  282. homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -5
  283. homeassistant-stubs/components/synology_dsm/service.pyi +1 -1
  284. homeassistant-stubs/components/synology_dsm/switch.pyi +2 -4
  285. homeassistant-stubs/components/synology_dsm/update.pyi +2 -5
  286. homeassistant-stubs/components/tibber/coordinator.pyi +1 -1
  287. homeassistant-stubs/components/todo/intent.pyi +8 -0
  288. homeassistant-stubs/components/trafikverket_ferry/config_flow.pyi +1 -0
  289. homeassistant-stubs/components/trafikverket_weatherstation/config_flow.pyi +3 -0
  290. homeassistant-stubs/components/tts/__init__.pyi +66 -51
  291. homeassistant-stubs/components/tts/entity.pyi +54 -0
  292. homeassistant-stubs/components/tts/media_source.pyi +1 -1
  293. homeassistant-stubs/components/update/__init__.pyi +2 -2
  294. homeassistant-stubs/components/usb/__init__.pyi +1 -5
  295. homeassistant-stubs/components/usb/utils.pyi +2 -0
  296. homeassistant-stubs/components/vodafone_station/__init__.pyi +11 -0
  297. homeassistant-stubs/components/vodafone_station/button.pyi +31 -0
  298. homeassistant-stubs/components/vodafone_station/config_flow.pyi +29 -0
  299. homeassistant-stubs/components/vodafone_station/const.pyi +9 -0
  300. homeassistant-stubs/components/vodafone_station/coordinator.pyi +43 -0
  301. homeassistant-stubs/components/vodafone_station/device_tracker.pyi +30 -0
  302. homeassistant-stubs/components/vodafone_station/diagnostics.pyi +10 -0
  303. homeassistant-stubs/components/vodafone_station/helpers.pyi +8 -0
  304. homeassistant-stubs/components/vodafone_station/sensor.pyi +38 -0
  305. homeassistant-stubs/components/zwave_js/__init__.pyi +5 -9
  306. homeassistant-stubs/components/zwave_js/api.pyi +15 -0
  307. homeassistant-stubs/components/zwave_js/config_flow.pyi +0 -1
  308. homeassistant-stubs/config_entries.pyi +2 -5
  309. homeassistant-stubs/helpers/backup.pyi +4 -1
  310. homeassistant-stubs/helpers/config_entry_oauth2_flow.pyi +14 -0
  311. homeassistant-stubs/helpers/config_validation.pyi +5 -2
  312. homeassistant-stubs/helpers/frame.pyi +14 -5
  313. homeassistant-stubs/helpers/intent.pyi +13 -4
  314. homeassistant-stubs/helpers/llm.pyi +7 -1
  315. homeassistant-stubs/helpers/script.pyi +1 -1
  316. homeassistant-stubs/helpers/selector.pyi +1 -0
  317. homeassistant-stubs/helpers/template.pyi +14 -1
  318. homeassistant-stubs/loader.pyi +18 -8
  319. homeassistant-stubs/scripts/check_config.pyi +0 -1
  320. homeassistant-stubs/util/logging.pyi +18 -1
  321. homeassistant-stubs/util/unit_conversion.pyi +3 -0
  322. homeassistant-stubs/util/unit_system.pyi +12 -10
  323. homeassistant-stubs/util/yaml/__init__.pyi +3 -4
  324. homeassistant-stubs/util/yaml/dumper.pyi +2 -8
  325. homeassistant-stubs/util/yaml/input.pyi +2 -9
  326. homeassistant-stubs/util/yaml/loader.pyi +4 -72
  327. homeassistant-stubs/util/yaml/objects.pyi +2 -26
  328. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/METADATA +2 -2
  329. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/RECORD +331 -270
  330. homeassistant-stubs/components/mcp_server/llm_api.pyi +0 -15
  331. homeassistant-stubs/components/synology_dsm/models.pyi +0 -10
  332. homeassistant-stubs/util/yaml/const.pyi +0 -1
  333. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/WHEEL +0 -0
  334. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,23 @@
1
+ from .const import DEFAULT_NAME as DEFAULT_NAME, DOMAIN as DOMAIN
2
+ from _typeshed import Incomplete
3
+ from collections.abc import Mapping
4
+ from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
5
+ from homeassistant.const import CONF_NAME as CONF_NAME, CONF_PASSWORD as CONF_PASSWORD, CONF_URL as CONF_URL, CONF_USERNAME as CONF_USERNAME, CONF_VERIFY_SSL as CONF_VERIFY_SSL
6
+ from homeassistant.core import HomeAssistant as HomeAssistant
7
+ from homeassistant.helpers.aiohttp_client import async_create_clientsession as async_create_clientsession
8
+ from homeassistant.helpers.selector import TextSelector as TextSelector, TextSelectorConfig as TextSelectorConfig, TextSelectorType as TextSelectorType
9
+ from typing import Any
10
+
11
+ _LOGGER: Incomplete
12
+ STEP_USER_DATA_SCHEMA: Incomplete
13
+ REAUTH_SCHEMA: Incomplete
14
+
15
+ async def validate_input(hass: HomeAssistant, user_input: dict[str, Any]) -> None: ...
16
+
17
+ class PyLoadConfigFlow(ConfigFlow, domain=DOMAIN):
18
+ VERSION: int
19
+ MINOR_VERSION: int
20
+ async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
21
+ async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
22
+ async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
23
+ async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
@@ -0,0 +1,6 @@
1
+ DOMAIN: str
2
+ DEFAULT_NAME: str
3
+ DEFAULT_PORT: int
4
+ MANUFACTURER: str
5
+ SERVICE_NAME: str
6
+ UNIT_DOWNLOADS: str
@@ -0,0 +1,34 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from _typeshed import Incomplete
3
+ from dataclasses import dataclass
4
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
5
+ from homeassistant.const import CONF_USERNAME as CONF_USERNAME
6
+ from homeassistant.core import HomeAssistant as HomeAssistant
7
+ from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed, ConfigEntryNotReady as ConfigEntryNotReady
8
+ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
9
+ from pyloadapi import PyLoadAPI as PyLoadAPI
10
+
11
+ _LOGGER: Incomplete
12
+ SCAN_INTERVAL: Incomplete
13
+
14
+ @dataclass(kw_only=True)
15
+ class PyLoadData:
16
+ pause: bool
17
+ active: int
18
+ queue: int
19
+ total: int
20
+ speed: float
21
+ download: bool
22
+ reconnect: bool
23
+ captcha: bool | None = ...
24
+ proxy: bool | None = ...
25
+ free_space: int
26
+ type PyLoadConfigEntry = ConfigEntry[PyLoadCoordinator]
27
+
28
+ class PyLoadCoordinator(DataUpdateCoordinator[PyLoadData]):
29
+ config_entry: PyLoadConfigEntry
30
+ pyload: Incomplete
31
+ version: str | None
32
+ def __init__(self, hass: HomeAssistant, config_entry: PyLoadConfigEntry, pyload: PyLoadAPI) -> None: ...
33
+ async def _async_update_data(self) -> PyLoadData: ...
34
+ async def _async_setup(self) -> None: ...
@@ -0,0 +1,10 @@
1
+ from .coordinator import PyLoadConfigEntry as PyLoadConfigEntry, PyLoadData as PyLoadData
2
+ from _typeshed import Incomplete
3
+ from homeassistant.components.diagnostics import REDACTED as REDACTED, async_redact_data as async_redact_data
4
+ from homeassistant.const import CONF_PASSWORD as CONF_PASSWORD, CONF_URL as CONF_URL, CONF_USERNAME as CONF_USERNAME
5
+ from homeassistant.core import HomeAssistant as HomeAssistant
6
+ from typing import Any
7
+
8
+ TO_REDACT: Incomplete
9
+
10
+ async def async_get_config_entry_diagnostics(hass: HomeAssistant, config_entry: PyLoadConfigEntry) -> dict[str, Any]: ...
@@ -0,0 +1,13 @@
1
+ from .const import DOMAIN as DOMAIN, MANUFACTURER as MANUFACTURER, SERVICE_NAME as SERVICE_NAME
2
+ from .coordinator import PyLoadCoordinator as PyLoadCoordinator
3
+ from _typeshed import Incomplete
4
+ from homeassistant.components.button import EntityDescription as EntityDescription
5
+ from homeassistant.helpers.device_registry import DeviceEntryType as DeviceEntryType, DeviceInfo as DeviceInfo
6
+ from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
7
+
8
+ class BasePyLoadEntity(CoordinatorEntity[PyLoadCoordinator]):
9
+ _attr_has_entity_name: bool
10
+ _attr_unique_id: Incomplete
11
+ entity_description: Incomplete
12
+ _attr_device_info: Incomplete
13
+ def __init__(self, coordinator: PyLoadCoordinator, entity_description: EntityDescription) -> None: ...
@@ -0,0 +1,33 @@
1
+ from .const import UNIT_DOWNLOADS as UNIT_DOWNLOADS
2
+ from .coordinator import PyLoadConfigEntry as PyLoadConfigEntry, PyLoadData as PyLoadData
3
+ from .entity import BasePyLoadEntity as BasePyLoadEntity
4
+ from collections.abc import Callable as Callable
5
+ from dataclasses import dataclass
6
+ from enum import StrEnum
7
+ from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
8
+ from homeassistant.const import UnitOfDataRate as UnitOfDataRate, UnitOfInformation as UnitOfInformation
9
+ from homeassistant.core import HomeAssistant as HomeAssistant
10
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
11
+ from homeassistant.helpers.typing import StateType as StateType
12
+
13
+ PARALLEL_UPDATES: int
14
+
15
+ class PyLoadSensorEntity(StrEnum):
16
+ ACTIVE = 'active'
17
+ FREE_SPACE = 'free_space'
18
+ QUEUE = 'queue'
19
+ SPEED = 'speed'
20
+ TOTAL = 'total'
21
+
22
+ @dataclass(kw_only=True, frozen=True)
23
+ class PyLoadSensorEntityDescription(SensorEntityDescription):
24
+ value_fn: Callable[[PyLoadData], StateType]
25
+
26
+ SENSOR_DESCRIPTIONS: tuple[PyLoadSensorEntityDescription, ...]
27
+
28
+ async def async_setup_entry(hass: HomeAssistant, entry: PyLoadConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
29
+
30
+ class PyLoadSensor(BasePyLoadEntity, SensorEntity):
31
+ entity_description: PyLoadSensorEntityDescription
32
+ @property
33
+ def native_value(self) -> StateType: ...
@@ -0,0 +1,37 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from .coordinator import PyLoadConfigEntry as PyLoadConfigEntry, PyLoadData as PyLoadData
3
+ from .entity import BasePyLoadEntity as BasePyLoadEntity
4
+ from collections.abc import Awaitable, Callable as Callable
5
+ from dataclasses import dataclass
6
+ from enum import StrEnum
7
+ from homeassistant.components.switch import SwitchDeviceClass as SwitchDeviceClass, SwitchEntity as SwitchEntity, SwitchEntityDescription as SwitchEntityDescription
8
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
10
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
11
+ from pyloadapi import PyLoadAPI as PyLoadAPI
12
+ from typing import Any
13
+
14
+ PARALLEL_UPDATES: int
15
+
16
+ class PyLoadSwitch(StrEnum):
17
+ PAUSE_RESUME_QUEUE = 'download'
18
+ RECONNECT = 'reconnect'
19
+
20
+ @dataclass(kw_only=True, frozen=True)
21
+ class PyLoadSwitchEntityDescription(SwitchEntityDescription):
22
+ turn_on_fn: Callable[[PyLoadAPI], Awaitable[Any]]
23
+ turn_off_fn: Callable[[PyLoadAPI], Awaitable[Any]]
24
+ toggle_fn: Callable[[PyLoadAPI], Awaitable[Any]]
25
+ value_fn: Callable[[PyLoadData], bool]
26
+
27
+ SENSOR_DESCRIPTIONS: tuple[PyLoadSwitchEntityDescription, ...]
28
+
29
+ async def async_setup_entry(hass: HomeAssistant, entry: PyLoadConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
30
+
31
+ class PyLoadSwitchEntity(BasePyLoadEntity, SwitchEntity):
32
+ entity_description: PyLoadSwitchEntityDescription
33
+ @property
34
+ def is_on(self) -> bool | None: ...
35
+ async def async_turn_on(self, **kwargs: Any) -> None: ...
36
+ async def async_turn_off(self, **kwargs: Any) -> None: ...
37
+ async def async_toggle(self, **kwargs: Any) -> None: ...
@@ -0,0 +1,41 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from .coordinator import QbusConfigEntry as QbusConfigEntry
3
+ from .entity import QbusEntity as QbusEntity, add_new_outputs as add_new_outputs
4
+ from _typeshed import Incomplete
5
+ from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, HVACAction as HVACAction, HVACMode as HVACMode
6
+ from homeassistant.components.mqtt import ReceiveMessage as ReceiveMessage
7
+ from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE, UnitOfTemperature as UnitOfTemperature
8
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
10
+ from homeassistant.helpers.debounce import Debouncer as Debouncer
11
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
12
+ from qbusmqttapi.discovery import QbusMqttOutput as QbusMqttOutput
13
+ from typing import Any
14
+
15
+ PARALLEL_UPDATES: int
16
+ STATE_REQUEST_DELAY: int
17
+ _LOGGER: Incomplete
18
+
19
+ async def async_setup_entry(hass: HomeAssistant, entry: QbusConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
20
+
21
+ class QbusClimate(QbusEntity, ClimateEntity):
22
+ _attr_hvac_modes: Incomplete
23
+ _attr_supported_features: Incomplete
24
+ _attr_temperature_unit: Incomplete
25
+ _attr_hvac_action: Incomplete
26
+ _attr_hvac_mode: Incomplete
27
+ _attr_min_temp: float
28
+ _attr_max_temp: float
29
+ _attr_target_temperature_step: float
30
+ _attr_preset_modes: list[str]
31
+ _attr_preset_mode: str
32
+ _request_state_debouncer: Debouncer | None
33
+ def __init__(self, mqtt_output: QbusMqttOutput) -> None: ...
34
+ async def async_added_to_hass(self) -> None: ...
35
+ async def async_set_preset_mode(self, preset_mode: str) -> None: ...
36
+ async def async_set_temperature(self, **kwargs: Any) -> None: ...
37
+ _attr_current_temperature: Incomplete
38
+ _attr_target_temperature: Incomplete
39
+ async def _state_received(self, msg: ReceiveMessage) -> None: ...
40
+ def _set_hvac_action(self) -> None: ...
41
+ async def _async_request_state(self) -> None: ...
@@ -20,6 +20,6 @@ class QbusLight(QbusEntity, LightEntity):
20
20
  async def async_turn_on(self, **kwargs: Any) -> None: ...
21
21
  async def async_turn_off(self, **kwargs: Any) -> None: ...
22
22
  async def _state_received(self, msg: ReceiveMessage) -> None: ...
23
- _attr_is_on: bool
24
- _attr_brightness: int
25
- def _set_state(self, *, percentage: int | None = None, on: bool | None = None) -> None: ...
23
+ _attr_is_on: Incomplete
24
+ _attr_brightness: Incomplete
25
+ def _set_state(self, percentage: int = 0) -> None: ...
@@ -25,6 +25,7 @@ CONTEXT_ID_AS_BINARY_SCHEMA_VERSION: int
25
25
  EVENT_TYPE_IDS_SCHEMA_VERSION: int
26
26
  STATES_META_SCHEMA_VERSION: int
27
27
  LAST_REPORTED_SCHEMA_VERSION: int
28
+ CIRCULAR_MEAN_SCHEMA_VERSION: int
28
29
  LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION: int
29
30
  LEGACY_STATES_EVENT_FOREIGN_KEYS_FIXED_SCHEMA_VERSION: int
30
31
  INTEGRATION_PLATFORM_COMPILE_STATISTICS: str
@@ -6,7 +6,7 @@ from . import migration as migration, statistics as statistics
6
6
  from .const import DB_WORKER_PREFIX as DB_WORKER_PREFIX, DEFAULT_MAX_BIND_VARS as DEFAULT_MAX_BIND_VARS, DOMAIN as DOMAIN, KEEPALIVE_TIME as KEEPALIVE_TIME, LAST_REPORTED_SCHEMA_VERSION as LAST_REPORTED_SCHEMA_VERSION, MARIADB_PYMYSQL_URL_PREFIX as MARIADB_PYMYSQL_URL_PREFIX, MARIADB_URL_PREFIX as MARIADB_URL_PREFIX, MAX_QUEUE_BACKLOG_MIN_VALUE as MAX_QUEUE_BACKLOG_MIN_VALUE, MIN_AVAILABLE_MEMORY_FOR_QUEUE_BACKLOG as MIN_AVAILABLE_MEMORY_FOR_QUEUE_BACKLOG, MYSQLDB_PYMYSQL_URL_PREFIX as MYSQLDB_PYMYSQL_URL_PREFIX, MYSQLDB_URL_PREFIX as MYSQLDB_URL_PREFIX, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX, SupportedDialect as SupportedDialect
7
7
  from .db_schema import Base as Base, EventData as EventData, EventTypes as EventTypes, Events as Events, SCHEMA_VERSION as SCHEMA_VERSION, StateAttributes as StateAttributes, States as States, StatesMeta as StatesMeta, Statistics as Statistics, StatisticsShortTerm as StatisticsShortTerm
8
8
  from .executor import DBInterruptibleThreadPoolExecutor as DBInterruptibleThreadPoolExecutor
9
- from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
9
+ from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
10
10
  from .pool import MutexPool as MutexPool, POOL_SIZE as POOL_SIZE, RecorderPool as RecorderPool
11
11
  from .table_managers.event_data import EventDataManager as EventDataManager
12
12
  from .table_managers.event_types import EventTypeManager as EventTypeManager
@@ -36,7 +36,6 @@ from sqlalchemy.orm.session import Session as Session
36
36
  from typing import Any
37
37
 
38
38
  _LOGGER: Incomplete
39
- DEFAULT_URL: str
40
39
  EXPIRE_AFTER_COMMITS: int
41
40
  SHUTDOWN_TASK: Incomplete
42
41
  COMMIT_TASK: Incomplete
@@ -1,5 +1,5 @@
1
1
  from .const import ALL_DOMAIN_EXCLUDE_ATTRS as ALL_DOMAIN_EXCLUDE_ATTRS, SupportedDialect as SupportedDialect
2
- from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMetaData as StatisticMetaData, bytes_to_ulid_or_none as bytes_to_ulid_or_none, bytes_to_uuid_hex_or_none as bytes_to_uuid_hex_or_none, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp, ulid_to_bytes_or_none as ulid_to_bytes_or_none, uuid_hex_to_bytes_or_none as uuid_hex_to_bytes_or_none
2
+ from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, bytes_to_ulid_or_none as bytes_to_ulid_or_none, bytes_to_uuid_hex_or_none as bytes_to_uuid_hex_or_none, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp, ulid_to_bytes_or_none as ulid_to_bytes_or_none, uuid_hex_to_bytes_or_none as uuid_hex_to_bytes_or_none
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable
5
5
  from datetime import datetime, timedelta
@@ -209,6 +209,7 @@ class StatisticsBase:
209
209
  start: Mapped[datetime | None]
210
210
  start_ts: Mapped[float | None]
211
211
  mean: Mapped[float | None]
212
+ mean_weight: Mapped[float | None]
212
213
  min: Mapped[float | None]
213
214
  max: Mapped[float | None]
214
215
  last_reset: Mapped[datetime | None]
@@ -247,6 +248,7 @@ class _StatisticsMeta:
247
248
  has_mean: Mapped[bool | None]
248
249
  has_sum: Mapped[bool | None]
249
250
  name: Mapped[str | None]
251
+ mean_type: Mapped[StatisticMeanType]
250
252
  @staticmethod
251
253
  def from_meta(meta: StatisticMetaData) -> StatisticsMeta: ...
252
254
 
@@ -3,7 +3,7 @@ from . import Recorder as Recorder
3
3
  from .auto_repairs.statistics.duplicates import delete_statistics_duplicates as delete_statistics_duplicates, delete_statistics_meta_duplicates as delete_statistics_meta_duplicates
4
4
  from .const import CONTEXT_ID_AS_BINARY_SCHEMA_VERSION as CONTEXT_ID_AS_BINARY_SCHEMA_VERSION, EVENT_TYPE_IDS_SCHEMA_VERSION as EVENT_TYPE_IDS_SCHEMA_VERSION, LEGACY_STATES_EVENT_FOREIGN_KEYS_FIXED_SCHEMA_VERSION as LEGACY_STATES_EVENT_FOREIGN_KEYS_FIXED_SCHEMA_VERSION, LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION as LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION, STATES_META_SCHEMA_VERSION as STATES_META_SCHEMA_VERSION, SupportedDialect as SupportedDialect
5
5
  from .db_schema import BIG_INTEGER_SQL as BIG_INTEGER_SQL, Base as Base, CONTEXT_ID_BIN_MAX_LENGTH as CONTEXT_ID_BIN_MAX_LENGTH, DOUBLE_PRECISION_TYPE_SQL as DOUBLE_PRECISION_TYPE_SQL, EventTypes as EventTypes, Events as Events, LEGACY_STATES_ENTITY_ID_LAST_UPDATED_TS_INDEX as LEGACY_STATES_ENTITY_ID_LAST_UPDATED_TS_INDEX, LEGACY_STATES_EVENT_ID_INDEX as LEGACY_STATES_EVENT_ID_INDEX, LegacyBase as LegacyBase, MYSQL_COLLATE as MYSQL_COLLATE, MYSQL_DEFAULT_CHARSET as MYSQL_DEFAULT_CHARSET, MigrationChanges as MigrationChanges, SCHEMA_VERSION as SCHEMA_VERSION, STATISTICS_TABLES as STATISTICS_TABLES, SchemaChanges as SchemaChanges, States as States, StatesMeta as StatesMeta, Statistics as Statistics, StatisticsMeta as StatisticsMeta, StatisticsRuns as StatisticsRuns, StatisticsShortTerm as StatisticsShortTerm, TABLE_STATES as TABLE_STATES
6
- from .models import process_timestamp as process_timestamp
6
+ from .models import StatisticMeanType as StatisticMeanType, process_timestamp as process_timestamp
7
7
  from .models.time import datetime_to_timestamp_or_none as datetime_to_timestamp_or_none
8
8
  from .queries import batch_cleanup_entity_ids as batch_cleanup_entity_ids, delete_duplicate_short_term_statistics_row as delete_duplicate_short_term_statistics_row, delete_duplicate_statistics_row as delete_duplicate_statistics_row, find_entity_ids_to_migrate as find_entity_ids_to_migrate, find_event_type_to_migrate as find_event_type_to_migrate, find_events_context_ids_to_migrate as find_events_context_ids_to_migrate, find_states_context_ids_to_migrate as find_states_context_ids_to_migrate, find_unmigrated_short_term_statistics_rows as find_unmigrated_short_term_statistics_rows, find_unmigrated_statistics_rows as find_unmigrated_statistics_rows, get_migration_changes as get_migration_changes, has_entity_ids_to_migrate as has_entity_ids_to_migrate, has_event_type_to_migrate as has_event_type_to_migrate, has_events_context_ids_to_migrate as has_events_context_ids_to_migrate, has_states_context_ids_to_migrate as has_states_context_ids_to_migrate, has_used_states_entity_ids as has_used_states_entity_ids, has_used_states_event_ids as has_used_states_event_ids, migrate_single_short_term_statistics_row_to_timestamp as migrate_single_short_term_statistics_row_to_timestamp, migrate_single_statistics_row_to_timestamp as migrate_single_statistics_row_to_timestamp
9
9
  from .statistics import cleanup_statistics_timestamp_migration as cleanup_statistics_timestamp_migration, get_start_time as get_start_time
@@ -16,12 +16,13 @@ from dataclasses import dataclass
16
16
  from homeassistant.core import HomeAssistant as HomeAssistant
17
17
  from homeassistant.util.enum import try_parse_enum as try_parse_enum
18
18
  from homeassistant.util.ulid import ulid_at_time as ulid_at_time, ulid_to_bytes as ulid_to_bytes
19
+ from sqlalchemy import ForeignKeyConstraint
19
20
  from sqlalchemy.engine import CursorResult as CursorResult, Engine as Engine
20
21
  from sqlalchemy.orm import DeclarativeBase as DeclarativeBase
21
22
  from sqlalchemy.orm.session import Session as Session
22
23
  from sqlalchemy.schema import AddConstraint
23
24
  from sqlalchemy.sql.lambdas import StatementLambdaElement as StatementLambdaElement
24
- from typing import Any, final
25
+ from typing import Any, TypedDict, final
25
26
 
26
27
  LIVE_MIGRATION_MIN_SCHEMA_VERSION: int
27
28
  MIGRATION_NOTE_OFFLINE: str
@@ -36,6 +37,8 @@ class _ColumnTypesForDialect:
36
37
  big_int_type: str
37
38
  timestamp_type: str
38
39
  context_bin_type: str
40
+ small_int_type: str
41
+ double_type: str
39
42
 
40
43
  _MYSQL_COLUMN_TYPES: Incomplete
41
44
  _POSTGRESQL_COLUMN_TYPES: Incomplete
@@ -75,6 +78,11 @@ def _execute_or_collect_error(session_maker: Callable[[], Session], query: str,
75
78
  def _drop_index(session_maker: Callable[[], Session], table_name: str, index_name: str, quiet: bool | None = None) -> None: ...
76
79
  def _add_columns(session_maker: Callable[[], Session], table_name: str, columns_def: list[str]) -> None: ...
77
80
  def _modify_columns(session_maker: Callable[[], Session], engine: Engine, table_name: str, columns_def: list[str]) -> None: ...
81
+
82
+ class _FKAlterDict(TypedDict):
83
+ old_fk: ForeignKeyConstraint
84
+ columns: list[str]
85
+
78
86
  def _update_states_table_with_foreign_key_options(session_maker: Callable[[], Session], engine: Engine) -> None: ...
79
87
  def _drop_foreign_key_constraints(session_maker: Callable[[], Session], engine: Engine, table: str, column: str) -> None: ...
80
88
  def _restore_foreign_key_constraints(session_maker: Callable[[], Session], engine: Engine, foreign_columns: list[tuple[str, str, str | None, str | None]]) -> None: ...
@@ -245,6 +253,12 @@ class _SchemaVersion47Migrator(_SchemaVersionMigrator, target_version=47):
245
253
  class _SchemaVersion48Migrator(_SchemaVersionMigrator, target_version=48):
246
254
  def _apply_update(self) -> None: ...
247
255
 
256
+ class _SchemaVersion49Migrator(_SchemaVersionMigrator, target_version=49):
257
+ def _apply_update(self) -> None: ...
258
+
259
+ class _SchemaVersion50Migrator(_SchemaVersionMigrator, target_version=50):
260
+ def _apply_update(self) -> None: ...
261
+
248
262
  def _migrate_statistics_columns_to_timestamp_removing_duplicates(hass: HomeAssistant, instance: Recorder, session_maker: Callable[[], Session], engine: Engine) -> None: ...
249
263
  def _correct_table_character_set_and_collation(table: str, session_maker: Callable[[], Session]) -> None: ...
250
264
  def _wipe_old_string_time_columns(instance: Recorder, engine: Engine, session: Session) -> None: ...
@@ -2,7 +2,7 @@ from .context import bytes_to_ulid_or_none as bytes_to_ulid_or_none, bytes_to_uu
2
2
  from .database import DatabaseEngine as DatabaseEngine, DatabaseOptimizer as DatabaseOptimizer, UnsupportedDialect as UnsupportedDialect
3
3
  from .event import extract_event_type_ids as extract_event_type_ids
4
4
  from .state import LazyState as LazyState, extract_metadata_ids as extract_metadata_ids, row_to_compressed_state as row_to_compressed_state
5
- from .statistics import CalendarStatisticPeriod as CalendarStatisticPeriod, FixedStatisticPeriod as FixedStatisticPeriod, RollingWindowStatisticPeriod as RollingWindowStatisticPeriod, StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMetaData as StatisticMetaData, StatisticPeriod as StatisticPeriod, StatisticResult as StatisticResult
5
+ from .statistics import CalendarStatisticPeriod as CalendarStatisticPeriod, FixedStatisticPeriod as FixedStatisticPeriod, RollingWindowStatisticPeriod as RollingWindowStatisticPeriod, StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, StatisticPeriod as StatisticPeriod, StatisticResult as StatisticResult
6
6
  from .time import datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp, process_timestamp_to_utc_isoformat as process_timestamp_to_utc_isoformat, timestamp_to_datetime_or_none as timestamp_to_datetime_or_none
7
7
 
8
- __all__ = ['CalendarStatisticPeriod', 'DatabaseEngine', 'DatabaseOptimizer', 'FixedStatisticPeriod', 'LazyState', 'RollingWindowStatisticPeriod', 'StatisticData', 'StatisticDataTimestamp', 'StatisticMetaData', 'StatisticPeriod', 'StatisticResult', 'UnsupportedDialect', 'bytes_to_ulid_or_none', 'bytes_to_uuid_hex_or_none', 'datetime_to_timestamp_or_none', 'extract_event_type_ids', 'extract_metadata_ids', 'process_timestamp', 'process_timestamp_to_utc_isoformat', 'row_to_compressed_state', 'timestamp_to_datetime_or_none', 'ulid_to_bytes_or_none', 'uuid_hex_to_bytes_or_none']
8
+ __all__ = ['CalendarStatisticPeriod', 'DatabaseEngine', 'DatabaseOptimizer', 'FixedStatisticPeriod', 'LazyState', 'RollingWindowStatisticPeriod', 'StatisticData', 'StatisticDataTimestamp', 'StatisticMeanType', 'StatisticMetaData', 'StatisticPeriod', 'StatisticResult', 'UnsupportedDialect', 'bytes_to_ulid_or_none', 'bytes_to_uuid_hex_or_none', 'datetime_to_timestamp_or_none', 'extract_event_type_ids', 'extract_metadata_ids', 'process_timestamp', 'process_timestamp_to_utc_isoformat', 'row_to_compressed_state', 'timestamp_to_datetime_or_none', 'ulid_to_bytes_or_none', 'uuid_hex_to_bytes_or_none']
@@ -1,5 +1,6 @@
1
1
  from datetime import datetime, timedelta
2
- from typing import Literal, TypedDict
2
+ from enum import IntEnum
3
+ from typing import Literal, NotRequired, TypedDict
3
4
 
4
5
  class StatisticResult(TypedDict):
5
6
  meta: StatisticMetaData
@@ -17,6 +18,7 @@ class StatisticMixIn(TypedDict, total=False):
17
18
  min: float
18
19
  max: float
19
20
  mean: float
21
+ mean_weight: float
20
22
 
21
23
  class StatisticData(StatisticDataBase, StatisticMixIn, total=False):
22
24
  last_reset: datetime | None
@@ -24,8 +26,14 @@ class StatisticData(StatisticDataBase, StatisticMixIn, total=False):
24
26
  class StatisticDataTimestamp(StatisticDataTimestampBase, StatisticMixIn, total=False):
25
27
  last_reset_ts: float | None
26
28
 
29
+ class StatisticMeanType(IntEnum):
30
+ NONE = 0
31
+ ARITHMETIC = 1
32
+ CIRCULAR = 2
33
+
27
34
  class StatisticMetaData(TypedDict):
28
- has_mean: bool
35
+ has_mean: NotRequired[bool]
36
+ mean_type: StatisticMeanType
29
37
  has_sum: bool
30
38
  name: str | None
31
39
  source: str
@@ -2,7 +2,7 @@ import dataclasses
2
2
  from . import Recorder as Recorder
3
3
  from .const import DOMAIN as DOMAIN, EVENT_RECORDER_5MIN_STATISTICS_GENERATED as EVENT_RECORDER_5MIN_STATISTICS_GENERATED, EVENT_RECORDER_HOURLY_STATISTICS_GENERATED as EVENT_RECORDER_HOURLY_STATISTICS_GENERATED, INTEGRATION_PLATFORM_COMPILE_STATISTICS as INTEGRATION_PLATFORM_COMPILE_STATISTICS, INTEGRATION_PLATFORM_LIST_STATISTIC_IDS as INTEGRATION_PLATFORM_LIST_STATISTIC_IDS, INTEGRATION_PLATFORM_UPDATE_STATISTICS_ISSUES as INTEGRATION_PLATFORM_UPDATE_STATISTICS_ISSUES, INTEGRATION_PLATFORM_VALIDATE_STATISTICS as INTEGRATION_PLATFORM_VALIDATE_STATISTICS, MAX_IDS_FOR_INDEXED_GROUP_BY as MAX_IDS_FOR_INDEXED_GROUP_BY, SupportedDialect as SupportedDialect
4
4
  from .db_schema import STATISTICS_TABLES as STATISTICS_TABLES, Statistics as Statistics, StatisticsBase as StatisticsBase, StatisticsMeta as StatisticsMeta, StatisticsRuns as StatisticsRuns, StatisticsShortTerm as StatisticsShortTerm
5
- from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMetaData as StatisticMetaData, StatisticResult as StatisticResult, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp
5
+ from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, StatisticResult as StatisticResult, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp
6
6
  from .util import execute as execute, execute_stmt_lambda_element as execute_stmt_lambda_element, filter_unique_constraint_integrity_error as filter_unique_constraint_integrity_error, get_instance as get_instance, retryable_database_job as retryable_database_job, session_scope as session_scope
7
7
  from _typeshed import Incomplete
8
8
  from collections.abc import Callable as Callable, Iterable, Sequence
@@ -14,15 +14,19 @@ from homeassistant.helpers.recorder import DATA_RECORDER as DATA_RECORDER
14
14
  from homeassistant.helpers.singleton import singleton as singleton
15
15
  from homeassistant.helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
16
16
  from homeassistant.util.collection import chunked_or_all as chunked_or_all
17
+ from homeassistant.util.enum import try_parse_enum as try_parse_enum
17
18
  from homeassistant.util.unit_conversion import AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, ConductivityConverter as ConductivityConverter, DataRateConverter as DataRateConverter, DistanceConverter as DistanceConverter, DurationConverter as DurationConverter, ElectricCurrentConverter as ElectricCurrentConverter, ElectricPotentialConverter as ElectricPotentialConverter, EnergyConverter as EnergyConverter, EnergyDistanceConverter as EnergyDistanceConverter, InformationConverter as InformationConverter, MassConverter as MassConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
18
- from sqlalchemy import Select as Select
19
+ from sqlalchemy import Label as Label, Select as Select
19
20
  from sqlalchemy.engine.row import Row
20
21
  from sqlalchemy.orm.session import Session as Session
21
22
  from sqlalchemy.sql.lambdas import StatementLambdaElement as StatementLambdaElement
22
- from typing import Any, Literal, TypedDict
23
+ from typing import Any, Literal, Required, TypedDict
23
24
 
24
25
  QUERY_STATISTICS: Incomplete
25
26
  QUERY_STATISTICS_SHORT_TERM: Incomplete
27
+
28
+ def query_circular_mean(table: type[StatisticsBase]) -> tuple[Label, Label]: ...
29
+
26
30
  QUERY_STATISTICS_SUMMARY_MEAN: Incomplete
27
31
  QUERY_STATISTICS_SUMMARY_SUM: Incomplete
28
32
  STATISTIC_UNIT_TO_UNIT_CONVERTER: dict[str | None, type[BaseUnitConverter]]
@@ -31,6 +35,12 @@ DATA_SHORT_TERM_STATISTICS_RUN_CACHE: str
31
35
 
32
36
  def mean(values: list[float]) -> float | None: ...
33
37
 
38
+ DEG_TO_RAD: Incomplete
39
+ RAD_TO_DEG: Incomplete
40
+
41
+ def weighted_circular_mean(values: Iterable[tuple[float, float]]) -> float: ...
42
+ def circular_mean(values: list[float]) -> float: ...
43
+
34
44
  _LOGGER: Incomplete
35
45
 
36
46
  @dataclasses.dataclass(slots=True)
@@ -96,18 +106,26 @@ async def async_list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str]
96
106
  def _statistic_by_id_from_metadata(hass: HomeAssistant, metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, dict[str, Any]]: ...
97
107
  def _flatten_list_statistic_ids_metadata_result(result: dict[str, dict[str, Any]]) -> list[dict]: ...
98
108
  def list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None) -> list[dict]: ...
99
- def _reduce_statistics(stats: dict[str, list[StatisticsRow]], same_period: Callable[[float, float], bool], period_start_end: Callable[[float], tuple[float, float]], period: timedelta, types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
109
+ def _reduce_statistics(stats: dict[str, list[StatisticsRow]], same_period: Callable[[float, float], bool], period_start_end: Callable[[float], tuple[float, float]], period: timedelta, types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']], metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, list[StatisticsRow]]: ...
100
110
  def reduce_day_ts_factory() -> tuple[Callable[[float, float], bool], Callable[[float], tuple[float, float]]]: ...
101
- def _reduce_statistics_per_day(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
111
+ def _reduce_statistics_per_day(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']], metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, list[StatisticsRow]]: ...
102
112
  def reduce_week_ts_factory() -> tuple[Callable[[float, float], bool], Callable[[float], tuple[float, float]]]: ...
103
- def _reduce_statistics_per_week(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
113
+ def _reduce_statistics_per_week(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']], metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, list[StatisticsRow]]: ...
104
114
  def _find_month_end_time(timestamp: datetime) -> datetime: ...
105
115
  def reduce_month_ts_factory() -> tuple[Callable[[float, float], bool], Callable[[float], tuple[float, float]]]: ...
106
- def _reduce_statistics_per_month(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
116
+ def _reduce_statistics_per_month(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']], metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, list[StatisticsRow]]: ...
107
117
  def _generate_statistics_during_period_stmt(start_time: datetime, end_time: datetime | None, metadata_ids: list[int] | None, table: type[StatisticsBase], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> StatementLambdaElement: ...
108
118
  def _generate_max_mean_min_statistic_in_sub_period_stmt(columns: Select, start_time: datetime | None, end_time: datetime | None, table: type[StatisticsBase], metadata_id: int) -> StatementLambdaElement: ...
109
- def _get_max_mean_min_statistic_in_sub_period(session: Session, result: dict[str, float], start_time: datetime | None, end_time: datetime | None, table: type[StatisticsBase], types: set[Literal['max', 'mean', 'min', 'change']], metadata_id: int) -> None: ...
110
- def _get_max_mean_min_statistic(session: Session, head_start_time: datetime | None, head_end_time: datetime | None, main_start_time: datetime | None, main_end_time: datetime | None, tail_start_time: datetime | None, tail_end_time: datetime | None, tail_only: bool, metadata_id: int, types: set[Literal['max', 'mean', 'min', 'change']]) -> dict[str, float | None]: ...
119
+
120
+ class _MaxMinMeanStatisticSubPeriod(TypedDict, total=False):
121
+ max: float
122
+ mean_acc: float
123
+ min: float
124
+ duration: float
125
+ circular_means: Required[list[tuple[float, float]]]
126
+
127
+ def _get_max_mean_min_statistic_in_sub_period(session: Session, result: _MaxMinMeanStatisticSubPeriod, start_time: datetime | None, end_time: datetime | None, table: type[StatisticsBase], types: set[Literal['max', 'mean', 'min', 'change']], metadata: tuple[int, StatisticMetaData]) -> None: ...
128
+ def _get_max_mean_min_statistic(session: Session, head_start_time: datetime | None, head_end_time: datetime | None, main_start_time: datetime | None, main_end_time: datetime | None, tail_start_time: datetime | None, tail_end_time: datetime | None, tail_only: bool, metadata: tuple[int, StatisticMetaData], types: set[Literal['max', 'mean', 'min', 'change']]) -> dict[str, float | None]: ...
111
129
  def _first_statistic(session: Session, table: type[StatisticsBase], metadata_id: int) -> datetime | None: ...
112
130
  def _last_statistic(session: Session, table: type[StatisticsBase], metadata_id: int) -> datetime | None: ...
113
131
  def _get_oldest_sum_statistic(session: Session, head_start_time: datetime | None, main_start_time: datetime | None, tail_start_time: datetime | None, oldest_stat: datetime | None, oldest_5_min_stat: datetime | None, tail_only: bool, metadata_id: int) -> float | None: ...
@@ -1,9 +1,11 @@
1
+ from ..const import CIRCULAR_MEAN_SCHEMA_VERSION as CIRCULAR_MEAN_SCHEMA_VERSION
1
2
  from ..core import Recorder as Recorder
2
3
  from ..db_schema import StatisticsMeta as StatisticsMeta
3
- from ..models import StatisticMetaData as StatisticMetaData
4
+ from ..models import StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData
4
5
  from ..util import execute_stmt_lambda_element as execute_stmt_lambda_element
5
6
  from _typeshed import Incomplete
6
7
  from lru import LRU
8
+ from sqlalchemy.orm import InstrumentedAttribute as InstrumentedAttribute
7
9
  from sqlalchemy.orm.session import Session as Session
8
10
  from sqlalchemy.sql.lambdas import StatementLambdaElement as StatementLambdaElement
9
11
  from typing import Final, Literal
@@ -15,11 +17,11 @@ INDEX_ID: Final[int]
15
17
  INDEX_STATISTIC_ID: Final[int]
16
18
  INDEX_SOURCE: Final[int]
17
19
  INDEX_UNIT_OF_MEASUREMENT: Final[int]
18
- INDEX_HAS_MEAN: Final[int]
19
20
  INDEX_HAS_SUM: Final[int]
20
21
  INDEX_NAME: Final[int]
22
+ INDEX_MEAN_TYPE: Final[int]
21
23
 
22
- def _generate_get_metadata_stmt(statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> StatementLambdaElement: ...
24
+ def _generate_get_metadata_stmt(statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None, schema_version: int = 0) -> StatementLambdaElement: ...
23
25
 
24
26
  class StatisticsMetaManager:
25
27
  recorder: Incomplete
@@ -1,4 +1,4 @@
1
- from .models import StatisticPeriod as StatisticPeriod
1
+ from .models import StatisticMeanType as StatisticMeanType, StatisticPeriod as StatisticPeriod
2
2
  from .statistics import STATISTIC_UNIT_TO_UNIT_CONVERTER as STATISTIC_UNIT_TO_UNIT_CONVERTER, async_add_external_statistics as async_add_external_statistics, async_change_statistics_unit as async_change_statistics_unit, async_import_statistics as async_import_statistics, async_list_statistic_ids as async_list_statistic_ids, list_statistic_ids as list_statistic_ids, statistic_during_period as statistic_during_period, statistics_during_period as statistics_during_period, update_statistics_issues as update_statistics_issues, validate_statistics as validate_statistics
3
3
  from .util import PERIOD_SCHEMA as PERIOD_SCHEMA, get_instance as get_instance, resolve_period as resolve_period
4
4
  from _typeshed import Incomplete
@@ -0,0 +1,11 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from .coordinator import RemoteCalendarConfigEntry as RemoteCalendarConfigEntry, RemoteCalendarDataUpdateCoordinator as RemoteCalendarDataUpdateCoordinator
3
+ from _typeshed import Incomplete
4
+ from homeassistant.const import Platform as Platform
5
+ from homeassistant.core import HomeAssistant as HomeAssistant
6
+
7
+ _LOGGER: Incomplete
8
+ PLATFORMS: list[Platform]
9
+
10
+ async def async_setup_entry(hass: HomeAssistant, entry: RemoteCalendarConfigEntry) -> bool: ...
11
+ async def async_unload_entry(hass: HomeAssistant, entry: RemoteCalendarConfigEntry) -> bool: ...
@@ -0,0 +1,26 @@
1
+ from . import RemoteCalendarConfigEntry as RemoteCalendarConfigEntry
2
+ from .const import CONF_CALENDAR_NAME as CONF_CALENDAR_NAME
3
+ from .coordinator import RemoteCalendarDataUpdateCoordinator as RemoteCalendarDataUpdateCoordinator
4
+ from _typeshed import Incomplete
5
+ from datetime import datetime
6
+ from homeassistant.components.calendar import CalendarEntity as CalendarEntity, CalendarEvent as CalendarEvent
7
+ from homeassistant.core import HomeAssistant as HomeAssistant
8
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
9
+ from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
10
+ from ical.event import Event as Event
11
+
12
+ _LOGGER: Incomplete
13
+ PARALLEL_UPDATES: int
14
+
15
+ async def async_setup_entry(hass: HomeAssistant, entry: RemoteCalendarConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
16
+
17
+ class RemoteCalendarEntity(CoordinatorEntity[RemoteCalendarDataUpdateCoordinator], CalendarEntity):
18
+ _attr_has_entity_name: bool
19
+ _attr_name: Incomplete
20
+ _attr_unique_id: Incomplete
21
+ def __init__(self, coordinator: RemoteCalendarDataUpdateCoordinator, entry: RemoteCalendarConfigEntry) -> None: ...
22
+ @property
23
+ def event(self) -> CalendarEvent | None: ...
24
+ async def async_get_events(self, hass: HomeAssistant, start_date: datetime, end_date: datetime) -> list[CalendarEvent]: ...
25
+
26
+ def _get_calendar_event(event: Event) -> CalendarEvent: ...
@@ -0,0 +1,13 @@
1
+ from .const import CONF_CALENDAR_NAME as CONF_CALENDAR_NAME, DOMAIN as DOMAIN
2
+ from _typeshed import Incomplete
3
+ from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
4
+ from homeassistant.const import CONF_URL as CONF_URL
5
+ from homeassistant.helpers.httpx_client import get_async_client as get_async_client
6
+ from typing import Any
7
+
8
+ _LOGGER: Incomplete
9
+ STEP_USER_DATA_SCHEMA: Incomplete
10
+
11
+ class RemoteCalendarConfigFlow(ConfigFlow, domain=DOMAIN):
12
+ VERSION: int
13
+ async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
@@ -0,0 +1,2 @@
1
+ DOMAIN: str
2
+ CONF_CALENDAR_NAME: str
@@ -0,0 +1,20 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from _typeshed import Incomplete
3
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
4
+ from homeassistant.const import CONF_URL as CONF_URL
5
+ from homeassistant.core import HomeAssistant as HomeAssistant
6
+ from homeassistant.helpers.httpx_client import get_async_client as get_async_client
7
+ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
8
+ from ical.calendar import Calendar
9
+
10
+ type RemoteCalendarConfigEntry = ConfigEntry[RemoteCalendarDataUpdateCoordinator]
11
+ _LOGGER: Incomplete
12
+ SCAN_INTERVAL: Incomplete
13
+
14
+ class RemoteCalendarDataUpdateCoordinator(DataUpdateCoordinator[Calendar]):
15
+ config_entry: RemoteCalendarConfigEntry
16
+ ics: str
17
+ _client: Incomplete
18
+ _url: Incomplete
19
+ def __init__(self, hass: HomeAssistant, config_entry: RemoteCalendarConfigEntry) -> None: ...
20
+ async def _async_update_data(self) -> Calendar: ...
@@ -0,0 +1,5 @@
1
+ from . import RemoteCalendarConfigEntry as RemoteCalendarConfigEntry
2
+ from homeassistant.core import HomeAssistant as HomeAssistant
3
+ from typing import Any
4
+
5
+ async def async_get_config_entry_diagnostics(hass: HomeAssistant, entry: RemoteCalendarConfigEntry) -> dict[str, Any]: ...
@@ -6,6 +6,7 @@ from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowRes
6
6
  from homeassistant.const import CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME
7
7
  from typing import Any
8
8
 
9
+ _LOGGER: Incomplete
9
10
  USER_SCHEMA: Incomplete
10
11
  REAUTH_SCHEMA: Incomplete
11
12
 
@@ -1,4 +1,4 @@
1
- from .const import CONF_SUPPORTS_PRIVACY_MODE as CONF_SUPPORTS_PRIVACY_MODE, CONF_USE_HTTPS as CONF_USE_HTTPS, DOMAIN as DOMAIN
1
+ from .const import CONF_BC_PORT as CONF_BC_PORT, CONF_SUPPORTS_PRIVACY_MODE as CONF_SUPPORTS_PRIVACY_MODE, CONF_USE_HTTPS as CONF_USE_HTTPS, DOMAIN as DOMAIN
2
2
  from .exceptions import PasswordIncompatible as PasswordIncompatible, ReolinkException as ReolinkException, UserNotAdmin as UserNotAdmin
3
3
  from .host import ReolinkHost as ReolinkHost
4
4
  from .services import async_setup_services as async_setup_services