homeassistant-stubs 2025.3.4__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 (332) 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 +0 -6
  74. homeassistant-stubs/components/home_connect/entity.pyi +1 -1
  75. homeassistant-stubs/components/home_connect/light.pyi +1 -1
  76. homeassistant-stubs/components/home_connect/number.pyi +1 -1
  77. homeassistant-stubs/components/home_connect/select.pyi +1 -1
  78. homeassistant-stubs/components/home_connect/services.pyi +35 -0
  79. homeassistant-stubs/components/home_connect/switch.pyi +2 -1
  80. homeassistant-stubs/components/home_connect/time.pyi +6 -1
  81. homeassistant-stubs/components/homeassistant_hardware/coordinator.pyi +15 -0
  82. homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +2 -1
  83. homeassistant-stubs/components/homeassistant_hardware/update.pyi +68 -0
  84. homeassistant-stubs/components/homeassistant_hardware/util.pyi +6 -1
  85. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +7 -1
  86. homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +1 -1
  87. homeassistant-stubs/components/homeassistant_sky_connect/const.pyi +10 -0
  88. homeassistant-stubs/components/homeassistant_sky_connect/update.pyi +29 -0
  89. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +1 -1
  90. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +1 -1
  91. homeassistant-stubs/components/homeassistant_yellow/const.pyi +4 -0
  92. homeassistant-stubs/components/homeassistant_yellow/update.pyi +29 -0
  93. homeassistant-stubs/components/homee/binary_sensor.pyi +21 -0
  94. homeassistant-stubs/components/homee/button.pyi +1 -0
  95. homeassistant-stubs/components/homee/cover.pyi +1 -0
  96. homeassistant-stubs/components/homee/light.pyi +1 -0
  97. homeassistant-stubs/components/homee/lock.pyi +25 -0
  98. homeassistant-stubs/components/homee/number.pyi +1 -0
  99. homeassistant-stubs/components/homee/select.pyi +23 -0
  100. homeassistant-stubs/components/homee/sensor.pyi +2 -0
  101. homeassistant-stubs/components/homee/switch.pyi +2 -0
  102. homeassistant-stubs/components/homee/valve.pyi +1 -0
  103. homeassistant-stubs/components/homekit/__init__.pyi +3 -1
  104. homeassistant-stubs/components/homekit/accessories.pyi +1 -0
  105. homeassistant-stubs/components/homekit/type_switches.pyi +6 -0
  106. homeassistant-stubs/components/huawei_lte/__init__.pyi +1 -1
  107. homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +7 -7
  108. homeassistant-stubs/components/incomfort/config_flow.pyi +1 -0
  109. homeassistant-stubs/components/iron_os/coordinator.pyi +2 -0
  110. homeassistant-stubs/components/iron_os/number.pyi +2 -0
  111. homeassistant-stubs/components/iron_os/select.pyi +3 -0
  112. homeassistant-stubs/components/jewish_calendar/__init__.pyi +9 -2
  113. homeassistant-stubs/components/jewish_calendar/binary_sensor.pyi +4 -4
  114. homeassistant-stubs/components/jewish_calendar/const.pyi +3 -0
  115. homeassistant-stubs/components/jewish_calendar/entity.pyi +2 -2
  116. homeassistant-stubs/components/jewish_calendar/sensor.pyi +5 -6
  117. homeassistant-stubs/components/jewish_calendar/service.pyi +10 -0
  118. homeassistant-stubs/components/lawn_mower/__init__.pyi +1 -0
  119. homeassistant-stubs/components/linkplay/entity.pyi +0 -1
  120. homeassistant-stubs/components/linkplay/media_player.pyi +3 -2
  121. homeassistant-stubs/components/linkplay/utils.pyi +0 -32
  122. homeassistant-stubs/components/lovelace/__init__.pyi +3 -1
  123. homeassistant-stubs/components/mastodon/__init__.pyi +2 -2
  124. homeassistant-stubs/components/mastodon/config_flow.pyi +2 -1
  125. homeassistant-stubs/components/mastodon/const.pyi +0 -7
  126. homeassistant-stubs/components/mastodon/coordinator.pyi +5 -5
  127. homeassistant-stubs/components/mastodon/diagnostics.pyi +2 -1
  128. homeassistant-stubs/components/mastodon/entity.pyi +1 -1
  129. homeassistant-stubs/components/mastodon/notify.pyi +3 -2
  130. homeassistant-stubs/components/mastodon/sensor.pyi +2 -3
  131. homeassistant-stubs/components/mastodon/services.pyi +1 -0
  132. homeassistant-stubs/components/mastodon/utils.pyi +3 -2
  133. homeassistant-stubs/components/mcp/coordinator.pyi +2 -9
  134. homeassistant-stubs/components/mcp_server/config_flow.pyi +1 -1
  135. homeassistant-stubs/components/mcp_server/const.pyi +1 -2
  136. homeassistant-stubs/components/mcp_server/server.pyi +1 -0
  137. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  138. homeassistant-stubs/components/modbus/climate.pyi +6 -2
  139. homeassistant-stubs/components/modbus/const.pyi +10 -0
  140. homeassistant-stubs/components/mqtt/config_flow.pyi +95 -7
  141. homeassistant-stubs/components/mqtt/const.pyi +65 -0
  142. homeassistant-stubs/components/mqtt/cover.pyi +2 -0
  143. homeassistant-stubs/components/mqtt/entity.pyi +4 -4
  144. homeassistant-stubs/components/mqtt/lawn_mower.pyi +1 -2
  145. homeassistant-stubs/components/mqtt/light/schema_basic.pyi +2 -48
  146. homeassistant-stubs/components/mqtt/light/schema_json.pyi +1 -14
  147. homeassistant-stubs/components/mqtt/light/schema_template.pyi +3 -14
  148. homeassistant-stubs/components/mqtt/models.pyi +25 -1
  149. homeassistant-stubs/components/mqtt/sensor.pyi +6 -5
  150. homeassistant-stubs/components/mqtt/update.pyi +1 -1
  151. homeassistant-stubs/components/mqtt/util.pyi +2 -0
  152. homeassistant-stubs/components/mysensors/__init__.pyi +1 -1
  153. homeassistant-stubs/components/mysensors/binary_sensor.pyi +0 -1
  154. homeassistant-stubs/components/mysensors/climate.pyi +0 -1
  155. homeassistant-stubs/components/mysensors/const.pyi +0 -1
  156. homeassistant-stubs/components/mysensors/cover.pyi +1 -2
  157. homeassistant-stubs/components/mysensors/device_tracker.pyi +0 -1
  158. homeassistant-stubs/components/mysensors/gateway.pyi +1 -1
  159. homeassistant-stubs/components/mysensors/helpers.pyi +1 -3
  160. homeassistant-stubs/components/mysensors/light.pyi +4 -5
  161. homeassistant-stubs/components/mysensors/remote.pyi +0 -1
  162. homeassistant-stubs/components/mysensors/sensor.pyi +0 -1
  163. homeassistant-stubs/components/mysensors/switch.pyi +1 -2
  164. homeassistant-stubs/components/mysensors/text.pyi +0 -1
  165. homeassistant-stubs/components/nam/button.pyi +2 -0
  166. homeassistant-stubs/components/nam/const.pyi +1 -0
  167. homeassistant-stubs/components/nam/sensor.pyi +2 -2
  168. homeassistant-stubs/components/nest/media_source.pyi +5 -0
  169. homeassistant-stubs/components/nextdns/__init__.pyi +1 -1
  170. homeassistant-stubs/components/nextdns/button.pyi +2 -0
  171. homeassistant-stubs/components/nextdns/config_flow.pyi +1 -0
  172. homeassistant-stubs/components/nextdns/switch.pyi +1 -0
  173. homeassistant-stubs/components/nut/__init__.pyi +1 -0
  174. homeassistant-stubs/components/nut/button.pyi +14 -0
  175. homeassistant-stubs/components/nut/entity.pyi +19 -0
  176. homeassistant-stubs/components/nut/sensor.pyi +8 -13
  177. homeassistant-stubs/components/nut/switch.pyi +18 -0
  178. homeassistant-stubs/components/onboarding/views.pyi +2 -1
  179. homeassistant-stubs/components/onedrive/__init__.pyi +4 -0
  180. homeassistant-stubs/components/onedrive/backup.pyi +1 -1
  181. homeassistant-stubs/components/onedrive/services.pyi +15 -0
  182. homeassistant-stubs/components/openai_conversation/__init__.pyi +5 -1
  183. homeassistant-stubs/components/openai_conversation/config_flow.pyi +5 -2
  184. homeassistant-stubs/components/openai_conversation/const.pyi +22 -11
  185. homeassistant-stubs/components/openai_conversation/conversation.pyi +6 -7
  186. homeassistant-stubs/components/overkiz/water_heater/__init__.pyi +1 -0
  187. homeassistant-stubs/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.pyi +41 -0
  188. homeassistant-stubs/components/purpleair/__init__.pyi +5 -10
  189. homeassistant-stubs/components/purpleair/const.pyi +6 -4
  190. homeassistant-stubs/components/purpleair/coordinator.pyi +3 -2
  191. homeassistant-stubs/components/purpleair/diagnostics.pyi +2 -4
  192. homeassistant-stubs/components/purpleair/entity.pyi +2 -3
  193. homeassistant-stubs/components/purpleair/sensor.pyi +4 -5
  194. homeassistant-stubs/components/pyload/__init__.pyi +12 -0
  195. homeassistant-stubs/components/pyload/button.pyi +32 -0
  196. homeassistant-stubs/components/pyload/config_flow.pyi +23 -0
  197. homeassistant-stubs/components/pyload/const.pyi +6 -0
  198. homeassistant-stubs/components/pyload/coordinator.pyi +34 -0
  199. homeassistant-stubs/components/pyload/diagnostics.pyi +10 -0
  200. homeassistant-stubs/components/pyload/entity.pyi +13 -0
  201. homeassistant-stubs/components/pyload/sensor.pyi +33 -0
  202. homeassistant-stubs/components/pyload/switch.pyi +37 -0
  203. homeassistant-stubs/components/qbus/climate.pyi +41 -0
  204. homeassistant-stubs/components/qbus/light.pyi +3 -3
  205. homeassistant-stubs/components/recorder/const.pyi +1 -0
  206. homeassistant-stubs/components/recorder/core.pyi +1 -2
  207. homeassistant-stubs/components/recorder/db_schema.pyi +3 -1
  208. homeassistant-stubs/components/recorder/migration.pyi +16 -2
  209. homeassistant-stubs/components/recorder/models/__init__.pyi +2 -2
  210. homeassistant-stubs/components/recorder/models/statistics.pyi +10 -2
  211. homeassistant-stubs/components/recorder/statistics.pyi +27 -9
  212. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +5 -3
  213. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  214. homeassistant-stubs/components/remote_calendar/__init__.pyi +11 -0
  215. homeassistant-stubs/components/remote_calendar/calendar.pyi +26 -0
  216. homeassistant-stubs/components/remote_calendar/config_flow.pyi +13 -0
  217. homeassistant-stubs/components/remote_calendar/const.pyi +2 -0
  218. homeassistant-stubs/components/remote_calendar/coordinator.pyi +20 -0
  219. homeassistant-stubs/components/remote_calendar/diagnostics.pyi +5 -0
  220. homeassistant-stubs/components/renault/config_flow.pyi +1 -0
  221. homeassistant-stubs/components/reolink/__init__.pyi +1 -1
  222. homeassistant-stubs/components/reolink/binary_sensor.pyi +17 -1
  223. homeassistant-stubs/components/reolink/config_flow.pyi +1 -1
  224. homeassistant-stubs/components/reolink/const.pyi +1 -0
  225. homeassistant-stubs/components/reolink/host.pyi +4 -4
  226. homeassistant-stubs/components/reolink/number.pyi +21 -1
  227. homeassistant-stubs/components/reolink/select.pyi +17 -1
  228. homeassistant-stubs/components/reolink/update.pyi +2 -1
  229. homeassistant-stubs/components/reolink/util.pyi +7 -0
  230. homeassistant-stubs/components/roborock/__init__.pyi +5 -3
  231. homeassistant-stubs/components/roborock/binary_sensor.pyi +4 -1
  232. homeassistant-stubs/components/roborock/button.pyi +11 -1
  233. homeassistant-stubs/components/roborock/config_flow.pyi +7 -3
  234. homeassistant-stubs/components/roborock/const.pyi +7 -1
  235. homeassistant-stubs/components/roborock/coordinator.pyi +18 -3
  236. homeassistant-stubs/components/roborock/entity.pyi +3 -1
  237. homeassistant-stubs/components/roborock/image.pyi +2 -7
  238. homeassistant-stubs/components/roborock/models.pyi +7 -0
  239. homeassistant-stubs/components/roborock/number.pyi +1 -0
  240. homeassistant-stubs/components/roborock/select.pyi +7 -5
  241. homeassistant-stubs/components/roborock/sensor.pyi +14 -1
  242. homeassistant-stubs/components/roborock/switch.pyi +2 -0
  243. homeassistant-stubs/components/roborock/time.pyi +1 -0
  244. homeassistant-stubs/components/roborock/vacuum.pyi +1 -1
  245. homeassistant-stubs/components/sensor/const.pyi +2 -0
  246. homeassistant-stubs/components/sensor/recorder.pyi +15 -3
  247. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  248. homeassistant-stubs/components/shelly/bluetooth/__init__.pyi +4 -2
  249. homeassistant-stubs/components/shelly/button.pyi +22 -7
  250. homeassistant-stubs/components/shelly/climate.pyi +1 -1
  251. homeassistant-stubs/components/shelly/config_flow.pyi +5 -5
  252. homeassistant-stubs/components/shelly/const.pyi +0 -1
  253. homeassistant-stubs/components/shelly/coordinator.pyi +5 -1
  254. homeassistant-stubs/components/shelly/diagnostics.pyi +1 -2
  255. homeassistant-stubs/components/shelly/entity.pyi +1 -3
  256. homeassistant-stubs/components/shelly/event.pyi +1 -1
  257. homeassistant-stubs/components/shelly/number.pyi +1 -1
  258. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  259. homeassistant-stubs/components/shelly/switch.pyi +14 -14
  260. homeassistant-stubs/components/shelly/update.pyi +1 -1
  261. homeassistant-stubs/components/shelly/utils.pyi +6 -2
  262. homeassistant-stubs/components/skybell/config_flow.pyi +3 -0
  263. homeassistant-stubs/components/smlight/__init__.pyi +0 -2
  264. homeassistant-stubs/components/smlight/sensor.pyi +5 -2
  265. homeassistant-stubs/components/smlight/update.pyi +0 -1
  266. homeassistant-stubs/components/squeezebox/browse_media.pyi +6 -11
  267. homeassistant-stubs/components/squeezebox/button.pyi +31 -0
  268. homeassistant-stubs/components/squeezebox/entity.pyi +8 -2
  269. homeassistant-stubs/components/squeezebox/media_player.pyi +3 -5
  270. homeassistant-stubs/components/synology_dsm/__init__.pyi +5 -7
  271. homeassistant-stubs/components/synology_dsm/backup.pyi +3 -4
  272. homeassistant-stubs/components/synology_dsm/binary_sensor.pyi +2 -5
  273. homeassistant-stubs/components/synology_dsm/button.pyi +2 -3
  274. homeassistant-stubs/components/synology_dsm/camera.pyi +2 -4
  275. homeassistant-stubs/components/synology_dsm/config_flow.pyi +3 -2
  276. homeassistant-stubs/components/synology_dsm/coordinator.pyi +15 -5
  277. homeassistant-stubs/components/synology_dsm/diagnostics.pyi +3 -4
  278. homeassistant-stubs/components/synology_dsm/media_source.pyi +3 -1
  279. homeassistant-stubs/components/synology_dsm/repairs.pyi +2 -3
  280. homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -5
  281. homeassistant-stubs/components/synology_dsm/service.pyi +1 -1
  282. homeassistant-stubs/components/synology_dsm/switch.pyi +2 -4
  283. homeassistant-stubs/components/synology_dsm/update.pyi +2 -5
  284. homeassistant-stubs/components/tibber/coordinator.pyi +1 -1
  285. homeassistant-stubs/components/todo/intent.pyi +8 -0
  286. homeassistant-stubs/components/trafikverket_ferry/config_flow.pyi +1 -0
  287. homeassistant-stubs/components/trafikverket_weatherstation/config_flow.pyi +3 -0
  288. homeassistant-stubs/components/tts/__init__.pyi +66 -51
  289. homeassistant-stubs/components/tts/entity.pyi +54 -0
  290. homeassistant-stubs/components/tts/media_source.pyi +1 -1
  291. homeassistant-stubs/components/update/__init__.pyi +2 -2
  292. homeassistant-stubs/components/usb/__init__.pyi +1 -5
  293. homeassistant-stubs/components/usb/utils.pyi +2 -0
  294. homeassistant-stubs/components/vodafone_station/__init__.pyi +11 -0
  295. homeassistant-stubs/components/vodafone_station/button.pyi +31 -0
  296. homeassistant-stubs/components/vodafone_station/config_flow.pyi +29 -0
  297. homeassistant-stubs/components/vodafone_station/const.pyi +9 -0
  298. homeassistant-stubs/components/vodafone_station/coordinator.pyi +43 -0
  299. homeassistant-stubs/components/vodafone_station/device_tracker.pyi +30 -0
  300. homeassistant-stubs/components/vodafone_station/diagnostics.pyi +10 -0
  301. homeassistant-stubs/components/vodafone_station/helpers.pyi +8 -0
  302. homeassistant-stubs/components/vodafone_station/sensor.pyi +38 -0
  303. homeassistant-stubs/components/zwave_js/__init__.pyi +5 -9
  304. homeassistant-stubs/components/zwave_js/api.pyi +15 -0
  305. homeassistant-stubs/components/zwave_js/config_flow.pyi +0 -1
  306. homeassistant-stubs/config_entries.pyi +2 -5
  307. homeassistant-stubs/helpers/backup.pyi +4 -1
  308. homeassistant-stubs/helpers/config_entry_oauth2_flow.pyi +14 -0
  309. homeassistant-stubs/helpers/config_validation.pyi +5 -2
  310. homeassistant-stubs/helpers/frame.pyi +14 -5
  311. homeassistant-stubs/helpers/intent.pyi +13 -4
  312. homeassistant-stubs/helpers/llm.pyi +7 -1
  313. homeassistant-stubs/helpers/script.pyi +1 -1
  314. homeassistant-stubs/helpers/selector.pyi +1 -0
  315. homeassistant-stubs/helpers/template.pyi +14 -1
  316. homeassistant-stubs/loader.pyi +18 -8
  317. homeassistant-stubs/scripts/check_config.pyi +0 -1
  318. homeassistant-stubs/util/logging.pyi +18 -1
  319. homeassistant-stubs/util/unit_conversion.pyi +3 -0
  320. homeassistant-stubs/util/unit_system.pyi +12 -10
  321. homeassistant-stubs/util/yaml/__init__.pyi +3 -4
  322. homeassistant-stubs/util/yaml/dumper.pyi +2 -8
  323. homeassistant-stubs/util/yaml/input.pyi +2 -9
  324. homeassistant-stubs/util/yaml/loader.pyi +4 -72
  325. homeassistant-stubs/util/yaml/objects.pyi +2 -26
  326. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0.dist-info}/METADATA +2 -2
  327. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0.dist-info}/RECORD +329 -268
  328. homeassistant-stubs/components/mcp_server/llm_api.pyi +0 -15
  329. homeassistant-stubs/components/synology_dsm/models.pyi +0 -10
  330. homeassistant-stubs/util/yaml/const.pyi +0 -1
  331. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0.dist-info}/WHEEL +0 -0
  332. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -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
@@ -1,4 +1,4 @@
1
- from .entity import ReolinkChannelCoordinatorEntity as ReolinkChannelCoordinatorEntity, ReolinkChannelEntityDescription as ReolinkChannelEntityDescription
1
+ from .entity import ReolinkChannelCoordinatorEntity as ReolinkChannelCoordinatorEntity, ReolinkChannelEntityDescription as ReolinkChannelEntityDescription, ReolinkEntityDescription as ReolinkEntityDescription
2
2
  from .util import ReolinkConfigEntry as ReolinkConfigEntry, ReolinkData as ReolinkData
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable
@@ -16,8 +16,15 @@ PARALLEL_UPDATES: int
16
16
  class ReolinkBinarySensorEntityDescription(BinarySensorEntityDescription, ReolinkChannelEntityDescription):
17
17
  value: Callable[[Host, int], bool]
18
18
 
19
+ @dataclass(frozen=True, kw_only=True)
20
+ class ReolinkSmartAIBinarySensorEntityDescription(BinarySensorEntityDescription, ReolinkEntityDescription):
21
+ smart_type: str
22
+ value: Callable[[Host, int, int], bool]
23
+ supported: Callable[[Host, int, int], bool] = ...
24
+
19
25
  BINARY_PUSH_SENSORS: Incomplete
20
26
  BINARY_SENSORS: Incomplete
27
+ BINARY_SMART_AI_SENSORS: Incomplete
21
28
 
22
29
  async def async_setup_entry(hass: HomeAssistant, config_entry: ReolinkConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
23
30
 
@@ -31,3 +38,12 @@ class ReolinkBinarySensorEntity(ReolinkChannelCoordinatorEntity, BinarySensorEnt
31
38
  class ReolinkPushBinarySensorEntity(ReolinkBinarySensorEntity):
32
39
  async def async_added_to_hass(self) -> None: ...
33
40
  async def _async_handle_event(self, event: str) -> None: ...
41
+
42
+ class ReolinkSmartAIBinarySensorEntity(ReolinkChannelCoordinatorEntity, BinarySensorEntity):
43
+ entity_description: ReolinkSmartAIBinarySensorEntityDescription
44
+ _attr_unique_id: Incomplete
45
+ _location: Incomplete
46
+ _attr_translation_placeholders: Incomplete
47
+ def __init__(self, reolink_data: ReolinkData, channel: int, location: int, entity_description: ReolinkSmartAIBinarySensorEntityDescription) -> None: ...
48
+ @property
49
+ def is_on(self) -> bool: ...
@@ -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, ReolinkWebhookException as ReolinkWebhookException, UserNotAdmin as UserNotAdmin
3
3
  from .host import ReolinkHost as ReolinkHost
4
4
  from .util import ReolinkConfigEntry as ReolinkConfigEntry, is_connected as is_connected
@@ -1,3 +1,4 @@
1
1
  DOMAIN: str
2
2
  CONF_USE_HTTPS: str
3
+ CONF_BC_PORT: str
3
4
  CONF_SUPPORTS_PRIVACY_MODE: str
@@ -1,7 +1,7 @@
1
1
  import asyncio
2
- from .const import CONF_SUPPORTS_PRIVACY_MODE as CONF_SUPPORTS_PRIVACY_MODE, CONF_USE_HTTPS as CONF_USE_HTTPS, DOMAIN as DOMAIN
2
+ 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
3
3
  from .exceptions import PasswordIncompatible as PasswordIncompatible, ReolinkSetupException as ReolinkSetupException, ReolinkWebhookException as ReolinkWebhookException, UserNotAdmin as UserNotAdmin
4
- from .util import get_store as get_store
4
+ from .util import ReolinkConfigEntry as ReolinkConfigEntry, get_store as get_store
5
5
  from _typeshed import Incomplete
6
6
  from aiohttp.web import Request as Request
7
7
  from collections import defaultdict
@@ -33,7 +33,7 @@ _LOGGER: Incomplete
33
33
 
34
34
  class ReolinkHost:
35
35
  _hass: HomeAssistant
36
- _config_entry_id: Incomplete
36
+ _config_entry: Incomplete
37
37
  _config: Incomplete
38
38
  _unique_id: str
39
39
  _api: Incomplete
@@ -61,7 +61,7 @@ class ReolinkHost:
61
61
  _lost_subscription_start: bool
62
62
  _lost_subscription: bool
63
63
  cancel_refresh_privacy_mode: CALLBACK_TYPE | None
64
- def __init__(self, hass: HomeAssistant, config: Mapping[str, Any], options: Mapping[str, Any], config_entry_id: str | None = None) -> None: ...
64
+ def __init__(self, hass: HomeAssistant, config: Mapping[str, Any], options: Mapping[str, Any], config_entry: ReolinkConfigEntry | None = None) -> None: ...
65
65
  @callback
66
66
  def async_register_update_cmd(self, cmd: str, channel: int | None = None) -> None: ...
67
67
  @callback
@@ -3,7 +3,7 @@ from .util import ReolinkConfigEntry as ReolinkConfigEntry, ReolinkData as Reoli
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable
5
5
  from dataclasses import dataclass
6
- from homeassistant.components.number import NumberEntity as NumberEntity, NumberEntityDescription as NumberEntityDescription, NumberMode as NumberMode
6
+ from homeassistant.components.number import NumberDeviceClass as NumberDeviceClass, NumberEntity as NumberEntity, NumberEntityDescription as NumberEntityDescription, NumberMode as NumberMode
7
7
  from homeassistant.const import EntityCategory as EntityCategory, UnitOfTime as UnitOfTime
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant
9
9
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
@@ -20,6 +20,13 @@ class ReolinkNumberEntityDescription(NumberEntityDescription, ReolinkChannelEnti
20
20
  mode: NumberMode = ...
21
21
  value: Callable[[Host, int], float | None]
22
22
 
23
+ @dataclass(frozen=True, kw_only=True)
24
+ class ReolinkSmartAINumberEntityDescription(NumberEntityDescription, ReolinkChannelEntityDescription):
25
+ smart_type: str
26
+ method: Callable[[Host, int, int, float], Any]
27
+ mode: NumberMode = ...
28
+ value: Callable[[Host, int, int], float | None]
29
+
23
30
  @dataclass(frozen=True, kw_only=True)
24
31
  class ReolinkHostNumberEntityDescription(NumberEntityDescription, ReolinkHostEntityDescription):
25
32
  method: Callable[[Host, float], Any]
@@ -33,6 +40,7 @@ class ReolinkChimeNumberEntityDescription(NumberEntityDescription, ReolinkChimeE
33
40
  value: Callable[[Chime], float | None]
34
41
 
35
42
  NUMBER_ENTITIES: Incomplete
43
+ SMART_AI_NUMBER_ENTITIES: Incomplete
36
44
  HOST_NUMBER_ENTITIES: Incomplete
37
45
  CHIME_NUMBER_ENTITIES: Incomplete
38
46
 
@@ -49,6 +57,18 @@ class ReolinkNumberEntity(ReolinkChannelCoordinatorEntity, NumberEntity):
49
57
  @raise_translated_error
50
58
  async def async_set_native_value(self, value: float) -> None: ...
51
59
 
60
+ class ReolinkSmartAINumberEntity(ReolinkChannelCoordinatorEntity, NumberEntity):
61
+ entity_description: ReolinkSmartAINumberEntityDescription
62
+ _attr_unique_id: Incomplete
63
+ _location: Incomplete
64
+ _attr_mode: Incomplete
65
+ _attr_translation_placeholders: Incomplete
66
+ def __init__(self, reolink_data: ReolinkData, channel: int, location: int, entity_description: ReolinkSmartAINumberEntityDescription) -> None: ...
67
+ @property
68
+ def native_value(self) -> float | None: ...
69
+ @raise_translated_error
70
+ async def async_set_native_value(self, value: float) -> None: ...
71
+
52
72
  class ReolinkHostNumberEntity(ReolinkHostCoordinatorEntity, NumberEntity):
53
73
  entity_description: ReolinkHostNumberEntityDescription
54
74
  _attr_mode: Incomplete
@@ -1,4 +1,4 @@
1
- from .entity import ReolinkChannelCoordinatorEntity as ReolinkChannelCoordinatorEntity, ReolinkChannelEntityDescription as ReolinkChannelEntityDescription, ReolinkChimeCoordinatorEntity as ReolinkChimeCoordinatorEntity, ReolinkChimeEntityDescription as ReolinkChimeEntityDescription
1
+ from .entity import ReolinkChannelCoordinatorEntity as ReolinkChannelCoordinatorEntity, ReolinkChannelEntityDescription as ReolinkChannelEntityDescription, ReolinkChimeCoordinatorEntity as ReolinkChimeCoordinatorEntity, ReolinkChimeEntityDescription as ReolinkChimeEntityDescription, ReolinkHostCoordinatorEntity as ReolinkHostCoordinatorEntity, ReolinkHostEntityDescription as ReolinkHostEntityDescription
2
2
  from .util import ReolinkConfigEntry as ReolinkConfigEntry, ReolinkData as ReolinkData, raise_translated_error as raise_translated_error
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable
@@ -19,6 +19,12 @@ class ReolinkSelectEntityDescription(SelectEntityDescription, ReolinkChannelEnti
19
19
  method: Callable[[Host, int, str], Any]
20
20
  value: Callable[[Host, int], str] | None = ...
21
21
 
22
+ @dataclass(frozen=True, kw_only=True)
23
+ class ReolinkHostSelectEntityDescription(SelectEntityDescription, ReolinkHostEntityDescription):
24
+ get_options: Callable[[Host], list[str]]
25
+ method: Callable[[Host, str], Any]
26
+ value: Callable[[Host], str]
27
+
22
28
  @dataclass(frozen=True, kw_only=True)
23
29
  class ReolinkChimeSelectEntityDescription(SelectEntityDescription, ReolinkChimeEntityDescription):
24
30
  get_options: list[str]
@@ -28,6 +34,7 @@ class ReolinkChimeSelectEntityDescription(SelectEntityDescription, ReolinkChimeE
28
34
  def _get_quick_reply_id(api: Host, ch: int, mess: str) -> int: ...
29
35
 
30
36
  SELECT_ENTITIES: Incomplete
37
+ HOST_SELECT_ENTITIES: Incomplete
31
38
  CHIME_SELECT_ENTITIES: Incomplete
32
39
 
33
40
  async def async_setup_entry(hass: HomeAssistant, config_entry: ReolinkConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
@@ -42,6 +49,15 @@ class ReolinkSelectEntity(ReolinkChannelCoordinatorEntity, SelectEntity):
42
49
  @raise_translated_error
43
50
  async def async_select_option(self, option: str) -> None: ...
44
51
 
52
+ class ReolinkHostSelectEntity(ReolinkHostCoordinatorEntity, SelectEntity):
53
+ entity_description: ReolinkHostSelectEntityDescription
54
+ _attr_options: Incomplete
55
+ def __init__(self, reolink_data: ReolinkData, entity_description: ReolinkHostSelectEntityDescription) -> None: ...
56
+ @property
57
+ def current_option(self) -> str | None: ...
58
+ @raise_translated_error
59
+ async def async_select_option(self, option: str) -> None: ...
60
+
45
61
  class ReolinkChimeSelectEntity(ReolinkChimeCoordinatorEntity, SelectEntity):
46
62
  entity_description: ReolinkChimeSelectEntityDescription
47
63
  _log_error: bool
@@ -1,7 +1,7 @@
1
1
  from . import DEVICE_UPDATE_INTERVAL as DEVICE_UPDATE_INTERVAL
2
2
  from .const import DOMAIN as DOMAIN
3
3
  from .entity import ReolinkChannelCoordinatorEntity as ReolinkChannelCoordinatorEntity, ReolinkChannelEntityDescription as ReolinkChannelEntityDescription, ReolinkHostCoordinatorEntity as ReolinkHostCoordinatorEntity, ReolinkHostEntityDescription as ReolinkHostEntityDescription
4
- from .util import ReolinkConfigEntry as ReolinkConfigEntry, ReolinkData as ReolinkData
4
+ from .util import ReolinkConfigEntry as ReolinkConfigEntry, ReolinkData as ReolinkData, raise_translated_error as raise_translated_error
5
5
  from _typeshed import Incomplete
6
6
  from dataclasses import dataclass
7
7
  from homeassistant.components.update import UpdateDeviceClass as UpdateDeviceClass, UpdateEntity as UpdateEntity, UpdateEntityDescription as UpdateEntityDescription, UpdateEntityFeature as UpdateEntityFeature
@@ -51,6 +51,7 @@ class ReolinkUpdateBaseEntity(CoordinatorEntity[DataUpdateCoordinator[None]], Up
51
51
  def available(self) -> bool: ...
52
52
  def version_is_newer(self, latest_version: str, installed_version: str) -> bool: ...
53
53
  async def async_release_notes(self) -> str | None: ...
54
+ @raise_translated_error
54
55
  async def async_install(self, version: str | None, backup: bool, **kwargs: Any) -> None: ...
55
56
  async def _pause_update_coordinator(self) -> None: ...
56
57
  async def _resume_update_coordinator(self, *args: Any) -> None: ...