homeassistant-stubs 2025.10.4__py3-none-any.whl → 2025.11.0b1__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.

Potentially problematic release.


This version of homeassistant-stubs might be problematic. Click here for more details.

Files changed (454) hide show
  1. homeassistant-stubs/components/acaia/coordinator.pyi +2 -0
  2. homeassistant-stubs/components/airly/config_flow.pyi +3 -0
  3. homeassistant-stubs/components/airos/__init__.pyi +4 -2
  4. homeassistant-stubs/components/airos/config_flow.pyi +10 -1
  5. homeassistant-stubs/components/airos/coordinator.pyi +1 -1
  6. homeassistant-stubs/components/airthings/config_flow.pyi +1 -0
  7. homeassistant-stubs/components/airthings_ble/config_flow.pyi +4 -2
  8. homeassistant-stubs/components/airthings_ble/sensor.pyi +2 -1
  9. homeassistant-stubs/components/alarm_control_panel/__init__.pyi +0 -10
  10. homeassistant-stubs/components/alexa_devices/const.pyi +2 -0
  11. homeassistant-stubs/components/alexa_devices/sensor.pyi +12 -2
  12. homeassistant-stubs/components/androidtv_remote/config_flow.pyi +2 -0
  13. homeassistant-stubs/components/apple_tv/__init__.pyi +3 -3
  14. homeassistant-stubs/components/assist_pipeline/__init__.pyi +3 -3
  15. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +1 -1
  16. homeassistant-stubs/components/asuswrt/bridge.pyi +9 -9
  17. homeassistant-stubs/components/asuswrt/config_flow.pyi +1 -1
  18. homeassistant-stubs/components/asuswrt/device_tracker.pyi +0 -3
  19. homeassistant-stubs/components/asuswrt/helpers.pyi +2 -3
  20. homeassistant-stubs/components/asuswrt/router.pyi +1 -1
  21. homeassistant-stubs/components/backup/http.pyi +1 -0
  22. homeassistant-stubs/components/backup/manager.pyi +2 -1
  23. homeassistant-stubs/components/backup/util.pyi +2 -32
  24. homeassistant-stubs/components/bang_olufsen/media_player.pyi +5 -5
  25. homeassistant-stubs/components/bluetooth/__init__.pyi +2 -5
  26. homeassistant-stubs/components/bluetooth/api.pyi +2 -0
  27. homeassistant-stubs/components/bluetooth/manager.pyi +2 -0
  28. homeassistant-stubs/components/bryant_evolution/climate.pyi +2 -2
  29. homeassistant-stubs/components/calendar/trigger.pyi +1 -1
  30. homeassistant-stubs/components/camera/__init__.pyi +1 -9
  31. homeassistant-stubs/components/cert_expiry/config_flow.pyi +1 -1
  32. homeassistant-stubs/components/cert_expiry/errors.pyi +1 -0
  33. homeassistant-stubs/components/cert_expiry/helper.pyi +1 -1
  34. homeassistant-stubs/components/cloud/__init__.pyi +2 -1
  35. homeassistant-stubs/components/cloud/client.pyi +1 -1
  36. homeassistant-stubs/components/cloud/const.pyi +1 -1
  37. homeassistant-stubs/components/comelit/binary_sensor.pyi +1 -0
  38. homeassistant-stubs/components/comelit/cover.pyi +2 -2
  39. homeassistant-stubs/components/comelit/light.pyi +1 -1
  40. homeassistant-stubs/components/comelit/sensor.pyi +1 -0
  41. homeassistant-stubs/components/comelit/switch.pyi +1 -1
  42. homeassistant-stubs/components/comelit/utils.pyi +5 -1
  43. homeassistant-stubs/components/config/config_entries.pyi +5 -1
  44. homeassistant-stubs/components/cover/__init__.pyi +1 -11
  45. homeassistant-stubs/components/demo/valve.pyi +14 -5
  46. homeassistant-stubs/components/derivative/__init__.pyi +0 -1
  47. homeassistant-stubs/components/derivative/config_flow.pyi +1 -0
  48. homeassistant-stubs/components/derivative/sensor.pyi +2 -1
  49. homeassistant-stubs/components/device_automation/condition.pyi +7 -6
  50. homeassistant-stubs/components/devolo_home_control/binary_sensor.pyi +1 -1
  51. homeassistant-stubs/components/devolo_home_control/entity.pyi +1 -2
  52. homeassistant-stubs/components/devolo_home_control/sensor.pyi +1 -1
  53. homeassistant-stubs/components/devolo_home_control/subscriber.pyi +0 -1
  54. homeassistant-stubs/components/devolo_home_control/switch.pyi +1 -1
  55. homeassistant-stubs/components/dnsip/sensor.pyi +3 -3
  56. homeassistant-stubs/components/ecovacs/button.pyi +1 -1
  57. homeassistant-stubs/components/ecovacs/select.pyi +14 -2
  58. homeassistant-stubs/components/eheimdigital/sensor.pyi +1 -2
  59. homeassistant-stubs/components/enphase_envoy/sensor.pyi +4 -22
  60. homeassistant-stubs/components/eq3btsmart/sensor.pyi +1 -2
  61. homeassistant-stubs/components/esphome/__init__.pyi +1 -1
  62. homeassistant-stubs/components/esphome/assist_satellite.pyi +12 -2
  63. homeassistant-stubs/components/esphome/climate.pyi +1 -0
  64. homeassistant-stubs/components/esphome/config_flow.pyi +7 -4
  65. homeassistant-stubs/components/esphome/const.pyi +2 -0
  66. homeassistant-stubs/components/esphome/entry_data.pyi +1 -0
  67. homeassistant-stubs/components/esphome/manager.pyi +8 -3
  68. homeassistant-stubs/components/esphome/select.pyi +1 -1
  69. homeassistant-stubs/components/evohome/climate.pyi +1 -1
  70. homeassistant-stubs/components/fastdotcom/coordinator.pyi +2 -2
  71. homeassistant-stubs/components/fastdotcom/sensor.pyi +1 -1
  72. homeassistant-stubs/components/filter/__init__.pyi +0 -1
  73. homeassistant-stubs/components/filter/config_flow.pyi +1 -0
  74. homeassistant-stubs/components/firefly_iii/__init__.pyi +8 -0
  75. homeassistant-stubs/components/firefly_iii/config_flow.pyi +24 -0
  76. homeassistant-stubs/components/firefly_iii/const.pyi +3 -0
  77. homeassistant-stubs/components/firefly_iii/coordinator.pyi +30 -0
  78. homeassistant-stubs/components/firefly_iii/diagnostics.pyi +11 -0
  79. homeassistant-stubs/components/firefly_iii/entity.pyi +30 -0
  80. homeassistant-stubs/components/firefly_iii/sensor.pyi +66 -0
  81. homeassistant-stubs/components/fritz/coordinator.pyi +3 -0
  82. homeassistant-stubs/components/fritz/models.pyi +2 -2
  83. homeassistant-stubs/components/fritz/services.pyi +3 -0
  84. homeassistant-stubs/components/fritzbox/climate.pyi +2 -5
  85. homeassistant-stubs/components/generic_hygrostat/__init__.pyi +0 -1
  86. homeassistant-stubs/components/generic_hygrostat/config_flow.pyi +1 -0
  87. homeassistant-stubs/components/generic_thermostat/__init__.pyi +0 -1
  88. homeassistant-stubs/components/generic_thermostat/config_flow.pyi +1 -0
  89. homeassistant-stubs/components/github/__init__.pyi +12 -0
  90. homeassistant-stubs/components/github/config_flow.pyi +28 -0
  91. homeassistant-stubs/components/github/const.pyi +10 -0
  92. homeassistant-stubs/components/github/coordinator.pyi +26 -0
  93. homeassistant-stubs/components/github/diagnostics.pyi +7 -0
  94. homeassistant-stubs/components/github/sensor.pyi +37 -0
  95. homeassistant-stubs/components/go2rtc/__init__.pyi +1 -2
  96. homeassistant-stubs/components/google_assistant_sdk/config_flow.pyi +2 -1
  97. homeassistant-stubs/components/google_drive/api.pyi +1 -0
  98. homeassistant-stubs/components/google_sheets/services.pyi +9 -2
  99. homeassistant-stubs/components/group/__init__.pyi +0 -1
  100. homeassistant-stubs/components/group/config_flow.pyi +2 -0
  101. homeassistant-stubs/components/group/entity.pyi +3 -0
  102. homeassistant-stubs/components/group/light.pyi +1 -1
  103. homeassistant-stubs/components/group/util.pyi +1 -0
  104. homeassistant-stubs/components/group/valve.pyi +47 -0
  105. homeassistant-stubs/components/habitica/__init__.pyi +1 -0
  106. homeassistant-stubs/components/habitica/config_flow.pyi +11 -3
  107. homeassistant-stubs/components/habitica/const.pyi +1 -0
  108. homeassistant-stubs/components/habitica/coordinator.pyi +9 -3
  109. homeassistant-stubs/components/habitica/entity.pyi +15 -2
  110. homeassistant-stubs/components/habitica/image.pyi +6 -2
  111. homeassistant-stubs/components/habitica/notify.pyi +42 -0
  112. homeassistant-stubs/components/habitica/sensor.pyi +9 -4
  113. homeassistant-stubs/components/hardkernel/hardware.pyi +1 -1
  114. homeassistant-stubs/components/hardware/__init__.pyi +2 -10
  115. homeassistant-stubs/components/history_stats/__init__.pyi +0 -1
  116. homeassistant-stubs/components/history_stats/config_flow.pyi +1 -0
  117. homeassistant-stubs/components/home_connect/application_credentials.pyi +1 -0
  118. homeassistant-stubs/components/home_connect/const.pyi +1 -0
  119. homeassistant-stubs/components/home_connect/select.pyi +1 -1
  120. homeassistant-stubs/components/homeassistant_green/config_flow.pyi +4 -2
  121. homeassistant-stubs/components/homeassistant_green/hardware.pyi +1 -1
  122. homeassistant-stubs/components/homeassistant_hardware/const.pyi +1 -0
  123. homeassistant-stubs/components/homeassistant_hardware/helpers.pyi +12 -2
  124. homeassistant-stubs/components/homeassistant_hardware/switch.pyi +23 -0
  125. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +13 -4
  126. homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +4 -0
  127. homeassistant-stubs/components/homeassistant_sky_connect/hardware.pyi +1 -1
  128. homeassistant-stubs/components/homeassistant_sky_connect/switch.pyi +17 -0
  129. homeassistant-stubs/components/homeassistant_sky_connect/update.pyi +5 -7
  130. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +12 -4
  131. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +1 -1
  132. homeassistant-stubs/components/homeassistant_yellow/hardware.pyi +1 -1
  133. homeassistant-stubs/components/homeassistant_yellow/switch.pyi +17 -0
  134. homeassistant-stubs/components/homeassistant_yellow/update.pyi +5 -7
  135. homeassistant-stubs/components/homee/__init__.pyi +1 -0
  136. homeassistant-stubs/components/homewizard/__init__.pyi +2 -0
  137. homeassistant-stubs/components/husqvarna_automower/button.pyi +1 -0
  138. homeassistant-stubs/components/husqvarna_automower/entity.pyi +8 -4
  139. homeassistant-stubs/components/husqvarna_automower/lawn_mower.pyi +5 -0
  140. homeassistant-stubs/components/husqvarna_automower/select.pyi +1 -0
  141. homeassistant-stubs/components/husqvarna_automower/sensor.pyi +2 -0
  142. homeassistant-stubs/components/husqvarna_automower/switch.pyi +2 -0
  143. homeassistant-stubs/components/imap/__init__.pyi +3 -1
  144. homeassistant-stubs/components/imap/coordinator.pyi +4 -1
  145. homeassistant-stubs/components/inels/__init__.pyi +18 -0
  146. homeassistant-stubs/components/inels/config_flow.pyi +13 -0
  147. homeassistant-stubs/components/inels/const.pyi +7 -0
  148. homeassistant-stubs/components/inels/entity.pyi +20 -0
  149. homeassistant-stubs/components/inels/switch.pyi +34 -0
  150. homeassistant-stubs/components/knx/climate.pyi +23 -11
  151. homeassistant-stubs/components/knx/const.pyi +14 -0
  152. homeassistant-stubs/components/knx/schema.pyi +1 -13
  153. homeassistant-stubs/components/knx/sensor.pyi +8 -9
  154. homeassistant-stubs/components/knx/storage/const.pyi +20 -0
  155. homeassistant-stubs/components/knx/storage/entity_store_schema.pyi +13 -2
  156. homeassistant-stubs/components/libre_hardware_monitor/__init__.pyi +3 -0
  157. homeassistant-stubs/components/libre_hardware_monitor/sensor.pyi +5 -9
  158. homeassistant-stubs/components/litterrobot/update.pyi +2 -0
  159. homeassistant-stubs/components/lock/__init__.pyi +1 -6
  160. homeassistant-stubs/components/london_underground/__init__.pyi +9 -0
  161. homeassistant-stubs/components/london_underground/config_flow.pyi +22 -0
  162. homeassistant-stubs/components/london_underground/const.pyi +1 -0
  163. homeassistant-stubs/components/london_underground/coordinator.pyi +3 -1
  164. homeassistant-stubs/components/london_underground/sensor.pyi +10 -5
  165. homeassistant-stubs/components/lunatone/__init__.pyi +12 -0
  166. homeassistant-stubs/components/lunatone/config_flow.pyi +16 -0
  167. homeassistant-stubs/components/lunatone/const.pyi +3 -0
  168. homeassistant-stubs/components/lunatone/coordinator.pyi +29 -0
  169. homeassistant-stubs/components/lunatone/light.pyi +43 -0
  170. homeassistant-stubs/components/matrix/__init__.pyi +10 -2
  171. homeassistant-stubs/components/matrix/const.pyi +5 -0
  172. homeassistant-stubs/components/matrix/services.pyi +3 -1
  173. homeassistant-stubs/components/matter/__init__.pyi +5 -0
  174. homeassistant-stubs/components/matter/binary_sensor.pyi +1 -1
  175. homeassistant-stubs/components/matter/button.pyi +1 -1
  176. homeassistant-stubs/components/matter/climate.pyi +7 -1
  177. homeassistant-stubs/components/matter/cover.pyi +6 -2
  178. homeassistant-stubs/components/matter/entity.pyi +4 -2
  179. homeassistant-stubs/components/matter/event.pyi +5 -1
  180. homeassistant-stubs/components/matter/fan.pyi +5 -1
  181. homeassistant-stubs/components/matter/light.pyi +6 -2
  182. homeassistant-stubs/components/matter/lock.pyi +5 -1
  183. homeassistant-stubs/components/matter/models.pyi +3 -3
  184. homeassistant-stubs/components/matter/number.pyi +1 -1
  185. homeassistant-stubs/components/matter/select.pyi +1 -1
  186. homeassistant-stubs/components/matter/sensor.pyi +4 -1
  187. homeassistant-stubs/components/matter/services.pyi +11 -0
  188. homeassistant-stubs/components/matter/switch.pyi +5 -2
  189. homeassistant-stubs/components/matter/update.pyi +4 -1
  190. homeassistant-stubs/components/matter/vacuum.pyi +6 -2
  191. homeassistant-stubs/components/matter/valve.pyi +6 -2
  192. homeassistant-stubs/components/matter/water_heater.pyi +8 -1
  193. homeassistant-stubs/components/mcp/__init__.pyi +1 -6
  194. homeassistant-stubs/components/mcp/config_flow.pyi +12 -2
  195. homeassistant-stubs/components/mcp/const.pyi +1 -0
  196. homeassistant-stubs/components/mcp/coordinator.pyi +1 -1
  197. homeassistant-stubs/components/mcp_server/__init__.pyi +1 -8
  198. homeassistant-stubs/components/mcp_server/http.pyi +23 -1
  199. homeassistant-stubs/components/mealie/config_flow.pyi +8 -1
  200. homeassistant-stubs/components/media_player/__init__.pyi +1 -9
  201. homeassistant-stubs/components/media_player/const.pyi +10 -69
  202. homeassistant-stubs/components/media_player/intent.pyi +7 -9
  203. homeassistant-stubs/components/metoffice/__init__.pyi +1 -0
  204. homeassistant-stubs/components/metoffice/helpers.pyi +2 -2
  205. homeassistant-stubs/components/metoffice/weather.pyi +11 -11
  206. homeassistant-stubs/components/miele/sensor.pyi +7 -8
  207. homeassistant-stubs/components/min_max/__init__.pyi +0 -1
  208. homeassistant-stubs/components/min_max/config_flow.pyi +1 -0
  209. homeassistant-stubs/components/mold_indicator/__init__.pyi +0 -1
  210. homeassistant-stubs/components/mold_indicator/config_flow.pyi +1 -0
  211. homeassistant-stubs/components/mqtt/__init__.pyi +1 -4
  212. homeassistant-stubs/components/mqtt/config_flow.pyi +23 -4
  213. homeassistant-stubs/components/mqtt/const.pyi +7 -1
  214. homeassistant-stubs/components/mqtt/number.pyi +1 -5
  215. homeassistant-stubs/components/mqtt/siren.pyi +1 -9
  216. homeassistant-stubs/components/music_assistant/const.pyi +4 -0
  217. homeassistant-stubs/components/music_assistant/media_player.pyi +1 -1
  218. homeassistant-stubs/components/music_assistant/schemas.pyi +2 -2
  219. homeassistant-stubs/components/nasweb/sensor.pyi +0 -5
  220. homeassistant-stubs/components/nasweb/switch.pyi +1 -0
  221. homeassistant-stubs/components/nextdns/config_flow.pyi +6 -1
  222. homeassistant-stubs/components/number/const.pyi +2 -1
  223. homeassistant-stubs/components/onedrive/backup.pyi +2 -1
  224. homeassistant-stubs/components/onewire/binary_sensor.pyi +5 -12
  225. homeassistant-stubs/components/onewire/const.pyi +0 -2
  226. homeassistant-stubs/components/onewire/diagnostics.pyi +2 -0
  227. homeassistant-stubs/components/onewire/entity.pyi +6 -14
  228. homeassistant-stubs/components/onewire/onewirehub.pyi +5 -5
  229. homeassistant-stubs/components/onewire/select.pyi +3 -10
  230. homeassistant-stubs/components/onewire/sensor.pyi +5 -7
  231. homeassistant-stubs/components/onewire/switch.pyi +7 -14
  232. homeassistant-stubs/components/onkyo/receiver.pyi +1 -1
  233. homeassistant-stubs/components/open_router/entity.pyi +4 -1
  234. homeassistant-stubs/components/openai_conversation/ai_task.pyi +1 -1
  235. homeassistant-stubs/components/openai_conversation/config_flow.pyi +1 -1
  236. homeassistant-stubs/components/openai_conversation/const.pyi +2 -0
  237. homeassistant-stubs/components/openai_conversation/entity.pyi +1 -1
  238. homeassistant-stubs/components/opower/coordinator.pyi +1 -0
  239. homeassistant-stubs/components/ping/__init__.pyi +1 -0
  240. homeassistant-stubs/components/ping/config_flow.pyi +1 -0
  241. homeassistant-stubs/components/ping/device_tracker.pyi +3 -2
  242. homeassistant-stubs/components/ping/entity.pyi +1 -0
  243. homeassistant-stubs/components/portainer/button.pyi +29 -0
  244. homeassistant-stubs/components/portainer/config_flow.pyi +4 -0
  245. homeassistant-stubs/components/portainer/const.pyi +1 -0
  246. homeassistant-stubs/components/portainer/coordinator.pyi +11 -2
  247. homeassistant-stubs/components/portainer/diagnostics.pyi +12 -0
  248. homeassistant-stubs/components/portainer/entity.pyi +2 -0
  249. homeassistant-stubs/components/portainer/sensor.pyi +41 -0
  250. homeassistant-stubs/components/portainer/switch.pyi +35 -0
  251. homeassistant-stubs/components/qbus/entity.pyi +1 -3
  252. homeassistant-stubs/components/raspberry_pi/hardware.pyi +1 -1
  253. homeassistant-stubs/components/recorder/const.pyi +1 -1
  254. homeassistant-stubs/components/recorder/core.pyi +3 -3
  255. homeassistant-stubs/components/recorder/db_schema.pyi +3 -10
  256. homeassistant-stubs/components/recorder/entity_registry.pyi +1 -0
  257. homeassistant-stubs/components/recorder/history/__init__.pyi +2 -2
  258. homeassistant-stubs/components/recorder/migration.pyi +4 -1
  259. homeassistant-stubs/components/recorder/models/statistics.pyi +1 -0
  260. homeassistant-stubs/components/recorder/statistics.pyi +17 -12
  261. homeassistant-stubs/components/recorder/table_managers/states_meta.pyi +0 -1
  262. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +4 -2
  263. homeassistant-stubs/components/recorder/tasks.pyi +1 -0
  264. homeassistant-stubs/components/recorder/util.pyi +1 -1
  265. homeassistant-stubs/components/recorder/websocket_api.pyi +6 -4
  266. homeassistant-stubs/components/renault/sensor.pyi +1 -1
  267. homeassistant-stubs/components/reolink/__init__.pyi +1 -1
  268. homeassistant-stubs/components/reolink/binary_sensor.pyi +15 -0
  269. homeassistant-stubs/components/reolink/siren.pyi +2 -0
  270. homeassistant-stubs/components/reolink/switch.pyi +25 -7
  271. homeassistant-stubs/components/roborock/__init__.pyi +1 -1
  272. homeassistant-stubs/components/roborock/config_flow.pyi +1 -1
  273. homeassistant-stubs/components/roborock/coordinator.pyi +2 -1
  274. homeassistant-stubs/components/roborock/entity.pyi +1 -1
  275. homeassistant-stubs/components/roborock/models.pyi +1 -1
  276. homeassistant-stubs/components/scrape/coordinator.pyi +1 -2
  277. homeassistant-stubs/components/sensibo/__init__.pyi +6 -0
  278. homeassistant-stubs/components/sensibo/climate.pyi +3 -26
  279. homeassistant-stubs/components/sensibo/services.pyi +31 -0
  280. homeassistant-stubs/components/sensor/const.pyi +2 -1
  281. homeassistant-stubs/components/sensor/device_condition.pyi +1 -0
  282. homeassistant-stubs/components/sensor/device_trigger.pyi +1 -0
  283. homeassistant-stubs/components/sensor/recorder.pyi +6 -3
  284. homeassistant-stubs/components/sfr_box/__init__.pyi +4 -6
  285. homeassistant-stubs/components/sfr_box/binary_sensor.pyi +5 -14
  286. homeassistant-stubs/components/sfr_box/button.pyi +4 -9
  287. homeassistant-stubs/components/sfr_box/config_flow.pyi +2 -1
  288. homeassistant-stubs/components/sfr_box/coordinator.pyi +13 -2
  289. homeassistant-stubs/components/sfr_box/diagnostics.pyi +2 -4
  290. homeassistant-stubs/components/sfr_box/entity.pyi +18 -0
  291. homeassistant-stubs/components/sfr_box/sensor.pyi +4 -13
  292. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  293. homeassistant-stubs/components/shelly/binary_sensor.pyi +6 -2
  294. homeassistant-stubs/components/shelly/button.pyi +26 -16
  295. homeassistant-stubs/components/shelly/climate.pyi +61 -7
  296. homeassistant-stubs/components/shelly/const.pyi +15 -3
  297. homeassistant-stubs/components/shelly/cover.pyi +31 -10
  298. homeassistant-stubs/components/shelly/entity.pyi +5 -4
  299. homeassistant-stubs/components/shelly/event.pyi +4 -0
  300. homeassistant-stubs/components/shelly/light.pyi +23 -7
  301. homeassistant-stubs/components/shelly/number.pyi +11 -2
  302. homeassistant-stubs/components/shelly/repairs.pyi +2 -2
  303. homeassistant-stubs/components/shelly/select.pyi +4 -1
  304. homeassistant-stubs/components/shelly/sensor.pyi +8 -7
  305. homeassistant-stubs/components/shelly/switch.pyi +7 -4
  306. homeassistant-stubs/components/shelly/text.pyi +4 -1
  307. homeassistant-stubs/components/shelly/update.pyi +4 -0
  308. homeassistant-stubs/components/shelly/utils.pyi +10 -5
  309. homeassistant-stubs/components/shelly/valve.pyi +34 -5
  310. homeassistant-stubs/components/sleep_as_android/event.pyi +1 -0
  311. homeassistant-stubs/components/sma/__init__.pyi +15 -0
  312. homeassistant-stubs/components/sma/config_flow.pyi +27 -0
  313. homeassistant-stubs/components/sma/const.pyi +11 -0
  314. homeassistant-stubs/components/sma/coordinator.pyi +28 -0
  315. homeassistant-stubs/components/sma/diagnostics.pyi +10 -0
  316. homeassistant-stubs/components/sma/sensor.pyi +33 -0
  317. homeassistant-stubs/components/sql/__init__.pyi +2 -4
  318. homeassistant-stubs/components/sql/sensor.pyi +6 -13
  319. homeassistant-stubs/components/sql/services.pyi +17 -0
  320. homeassistant-stubs/components/sql/util.pyi +16 -3
  321. homeassistant-stubs/components/squeezebox/__init__.pyi +4 -1
  322. homeassistant-stubs/components/squeezebox/browse_media.pyi +4 -3
  323. homeassistant-stubs/components/squeezebox/button.pyi +1 -0
  324. homeassistant-stubs/components/squeezebox/const.pyi +0 -1
  325. homeassistant-stubs/components/squeezebox/media_player.pyi +7 -2
  326. homeassistant-stubs/components/squeezebox/switch.pyi +1 -0
  327. homeassistant-stubs/components/squeezebox/util.pyi +6 -0
  328. homeassistant-stubs/components/suez_water/coordinator.pyi +2 -1
  329. homeassistant-stubs/components/sun/condition.pyi +10 -5
  330. homeassistant-stubs/components/switch_as_x/__init__.pyi +0 -1
  331. homeassistant-stubs/components/switch_as_x/config_flow.pyi +1 -0
  332. homeassistant-stubs/components/switchbot_cloud/climate.pyi +2 -0
  333. homeassistant-stubs/components/switchbot_cloud/lock.pyi +7 -2
  334. homeassistant-stubs/components/switchbot_cloud/sensor.pyi +25 -2
  335. homeassistant-stubs/components/switchbot_cloud/switch.pyi +13 -1
  336. homeassistant-stubs/components/switchbot_cloud/vacuum.pyi +4 -4
  337. homeassistant-stubs/components/switcher_kis/button.pyi +5 -6
  338. homeassistant-stubs/components/switcher_kis/climate.pyi +3 -3
  339. homeassistant-stubs/components/switcher_kis/const.pyi +1 -0
  340. homeassistant-stubs/components/switcher_kis/cover.pyi +4 -3
  341. homeassistant-stubs/components/switcher_kis/light.pyi +3 -2
  342. homeassistant-stubs/components/switcher_kis/sensor.pyi +4 -2
  343. homeassistant-stubs/components/switcher_kis/switch.pyi +3 -5
  344. homeassistant-stubs/components/systemmonitor/__init__.pyi +0 -1
  345. homeassistant-stubs/components/systemmonitor/config_flow.pyi +1 -0
  346. homeassistant-stubs/components/systemmonitor/coordinator.pyi +1 -0
  347. homeassistant-stubs/components/systemmonitor/sensor.pyi +3 -1
  348. homeassistant-stubs/components/telegram_bot/__init__.pyi +2 -1
  349. homeassistant-stubs/components/telegram_bot/bot.pyi +10 -5
  350. homeassistant-stubs/components/telegram_bot/const.pyi +9 -0
  351. homeassistant-stubs/components/telegram_bot/diagnostics.pyi +11 -0
  352. homeassistant-stubs/components/telegram_bot/entity.pyi +16 -0
  353. homeassistant-stubs/components/telegram_bot/event.pyi +18 -0
  354. homeassistant-stubs/components/telegram_bot/notify.pyi +6 -10
  355. homeassistant-stubs/components/tibber/coordinator.pyi +1 -0
  356. homeassistant-stubs/components/tod/__init__.pyi +0 -1
  357. homeassistant-stubs/components/tod/config_flow.pyi +1 -0
  358. homeassistant-stubs/components/tolo/__init__.pyi +3 -5
  359. homeassistant-stubs/components/tolo/binary_sensor.pyi +4 -6
  360. homeassistant-stubs/components/tolo/button.pyi +3 -5
  361. homeassistant-stubs/components/tolo/climate.pyi +3 -5
  362. homeassistant-stubs/components/tolo/coordinator.pyi +3 -2
  363. homeassistant-stubs/components/tolo/entity.pyi +2 -3
  364. homeassistant-stubs/components/tolo/fan.pyi +3 -5
  365. homeassistant-stubs/components/tolo/light.pyi +3 -5
  366. homeassistant-stubs/components/tolo/number.pyi +3 -5
  367. homeassistant-stubs/components/tolo/select.pyi +4 -5
  368. homeassistant-stubs/components/tolo/sensor.pyi +3 -5
  369. homeassistant-stubs/components/tolo/switch.pyi +3 -5
  370. homeassistant-stubs/components/trend/__init__.pyi +0 -1
  371. homeassistant-stubs/components/trend/config_flow.pyi +1 -0
  372. homeassistant-stubs/components/tts/__init__.pyi +2 -3
  373. homeassistant-stubs/components/unifi/light.pyi +44 -0
  374. homeassistant-stubs/components/uptimerobot/binary_sensor.pyi +2 -0
  375. homeassistant-stubs/components/uptimerobot/sensor.pyi +2 -0
  376. homeassistant-stubs/components/uptimerobot/switch.pyi +2 -0
  377. homeassistant-stubs/components/uptimerobot/utils.pyi +5 -0
  378. homeassistant-stubs/components/usb/__init__.pyi +2 -0
  379. homeassistant-stubs/components/usb/utils.pyi +7 -0
  380. homeassistant-stubs/components/vacuum/__init__.pyi +0 -15
  381. homeassistant-stubs/components/vivotek/__init__.pyi +0 -0
  382. homeassistant-stubs/components/vivotek/camera.pyi +35 -0
  383. homeassistant-stubs/components/vodafone_station/__init__.pyi +3 -1
  384. homeassistant-stubs/components/vodafone_station/config_flow.pyi +3 -2
  385. homeassistant-stubs/components/vodafone_station/const.pyi +3 -0
  386. homeassistant-stubs/components/vodafone_station/coordinator.pyi +4 -4
  387. homeassistant-stubs/components/volvo/__init__.pyi +2 -0
  388. homeassistant-stubs/components/volvo/binary_sensor.pyi +1 -3
  389. homeassistant-stubs/components/volvo/button.pyi +27 -0
  390. homeassistant-stubs/components/volvo/coordinator.pyi +12 -14
  391. homeassistant-stubs/components/volvo/device_tracker.pyi +23 -0
  392. homeassistant-stubs/components/volvo/diagnostics.pyi +12 -0
  393. homeassistant-stubs/components/volvo/entity.pyi +9 -5
  394. homeassistant-stubs/components/volvo/sensor.pyi +9 -8
  395. homeassistant-stubs/components/waqi/__init__.pyi +8 -0
  396. homeassistant-stubs/components/waqi/config_flow.pyi +14 -9
  397. homeassistant-stubs/components/waqi/const.pyi +1 -1
  398. homeassistant-stubs/components/waqi/coordinator.pyi +5 -4
  399. homeassistant-stubs/components/webostv/media_player.pyi +3 -0
  400. homeassistant-stubs/components/websocket_api/commands.pyi +2 -0
  401. homeassistant-stubs/components/wled/select.pyi +6 -3
  402. homeassistant-stubs/components/worldclock/__init__.pyi +0 -1
  403. homeassistant-stubs/components/worldclock/config_flow.pyi +1 -0
  404. homeassistant-stubs/components/zeroconf/__init__.pyi +3 -1
  405. homeassistant-stubs/components/zeroconf/discovery.pyi +8 -1
  406. homeassistant-stubs/components/zeroconf/repairs.pyi +13 -0
  407. homeassistant-stubs/components/zone/condition.pyi +10 -4
  408. homeassistant-stubs/components/zwave_js/config_flow.pyi +1 -0
  409. homeassistant-stubs/components/zwave_js/device_trigger.pyi +1 -1
  410. homeassistant-stubs/components/zwave_js/triggers/event.pyi +6 -8
  411. homeassistant-stubs/components/zwave_js/triggers/value_updated.pyi +6 -6
  412. homeassistant-stubs/config_entries.pyi +9 -0
  413. homeassistant-stubs/const.pyi +4 -21
  414. homeassistant-stubs/core.pyi +1 -7
  415. homeassistant-stubs/data_entry_flow.pyi +2 -0
  416. homeassistant-stubs/helpers/automation.pyi +6 -0
  417. homeassistant-stubs/helpers/condition.pyi +15 -5
  418. homeassistant-stubs/helpers/debounce.pyi +6 -1
  419. homeassistant-stubs/helpers/entity_platform.pyi +1 -1
  420. homeassistant-stubs/helpers/event.pyi +1 -1
  421. homeassistant-stubs/helpers/instance_id.pyi +1 -0
  422. homeassistant-stubs/helpers/llm.pyi +6 -1
  423. homeassistant-stubs/helpers/selector.pyi +5 -4
  424. homeassistant-stubs/helpers/service.pyi +4 -4
  425. homeassistant-stubs/helpers/template/__init__.pyi +0 -5
  426. homeassistant-stubs/helpers/trigger.pyi +18 -5
  427. homeassistant-stubs/helpers/update_coordinator.pyi +1 -0
  428. homeassistant-stubs/runner.pyi +1 -1
  429. homeassistant-stubs/util/async_iterator.pyi +33 -0
  430. homeassistant-stubs/util/unit_conversion.pyi +15 -0
  431. {homeassistant_stubs-2025.10.4.dist-info → homeassistant_stubs-2025.11.0b1.dist-info}/METADATA +2 -2
  432. {homeassistant_stubs-2025.10.4.dist-info → homeassistant_stubs-2025.11.0b1.dist-info}/RECORD +434 -398
  433. homeassistant-stubs/components/elevenlabs/__init__.pyi +0 -22
  434. homeassistant-stubs/components/elevenlabs/config_flow.pyi +0 -33
  435. homeassistant-stubs/components/elevenlabs/const.pyi +0 -14
  436. homeassistant-stubs/components/elevenlabs/tts.pyi +0 -36
  437. homeassistant-stubs/components/neato/__init__.pyi +0 -15
  438. homeassistant-stubs/components/neato/api.pyi +0 -17
  439. homeassistant-stubs/components/neato/application_credentials.pyi +0 -6
  440. homeassistant-stubs/components/neato/button.pyi +0 -18
  441. homeassistant-stubs/components/neato/camera.pyi +0 -34
  442. homeassistant-stubs/components/neato/config_flow.pyi +0 -15
  443. homeassistant-stubs/components/neato/const.pyi +0 -13
  444. homeassistant-stubs/components/neato/entity.pyi +0 -11
  445. homeassistant-stubs/components/neato/hub.pyi +0 -17
  446. homeassistant-stubs/components/neato/sensor.pyi +0 -30
  447. homeassistant-stubs/components/neato/switch.pyi +0 -34
  448. homeassistant-stubs/components/neato/vacuum.pyi +0 -70
  449. homeassistant-stubs/components/recorder/history/legacy.pyi +0 -48
  450. homeassistant-stubs/components/recorder/history/modern.pyi +0 -39
  451. homeassistant-stubs/components/recorder/models/legacy.pyi +0 -45
  452. homeassistant-stubs/components/sfr_box/models.pyi +0 -12
  453. {homeassistant_stubs-2025.10.4.dist-info → homeassistant_stubs-2025.11.0b1.dist-info}/WHEEL +0 -0
  454. {homeassistant_stubs-2025.10.4.dist-info → homeassistant_stubs-2025.11.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -31,5 +31,5 @@ class ReceiverManager:
31
31
  async def write(self, message: Instruction) -> None: ...
32
32
  def start_unloading(self) -> None: ...
33
33
 
34
- async def async_interview(host: str) -> ReceiverInfo | None: ...
34
+ async def async_interview(host: str) -> ReceiverInfo: ...
35
35
  async def async_discover(hass: HomeAssistant) -> Iterable[ReceiverInfo]: ...
@@ -6,11 +6,13 @@ from collections.abc import AsyncGenerator, Callable as Callable
6
6
  from homeassistant.components import conversation as conversation
7
7
  from homeassistant.config_entries import ConfigSubentry as ConfigSubentry
8
8
  from homeassistant.const import CONF_MODEL as CONF_MODEL
9
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
10
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
10
11
  from homeassistant.helpers import llm as llm
11
12
  from homeassistant.helpers.entity import Entity as Entity
12
- from openai.types.chat import ChatCompletionFunctionToolParam, ChatCompletionMessage as ChatCompletionMessage, ChatCompletionMessageParam as ChatCompletionMessageParam
13
+ from openai.types.chat import ChatCompletionContentPartImageParam as ChatCompletionContentPartImageParam, ChatCompletionFunctionToolParam, ChatCompletionMessage as ChatCompletionMessage, ChatCompletionMessageParam as ChatCompletionMessageParam
13
14
  from openai.types.shared_params.response_format_json_schema import JSONSchema as JSONSchema
15
+ from pathlib import Path
14
16
  from typing import Any
15
17
 
16
18
  MAX_TOOL_ITERATIONS: int
@@ -21,6 +23,7 @@ def _format_tool(tool: llm.Tool, custom_serializer: Callable[[Any], Any] | None)
21
23
  def _convert_content_to_chat_message(content: conversation.Content) -> ChatCompletionMessageParam | None: ...
22
24
  def _decode_tool_arguments(arguments: str) -> Any: ...
23
25
  async def _transform_response(message: ChatCompletionMessage) -> AsyncGenerator[conversation.AssistantContentDeltaDict]: ...
26
+ async def async_prepare_files_for_prompt(hass: HomeAssistant, files: list[tuple[Path, str | None]]) -> list[ChatCompletionContentPartImageParam]: ...
24
27
 
25
28
  class OpenRouterEntity(Entity):
26
29
  _attr_has_entity_name: bool
@@ -1,5 +1,5 @@
1
1
  from . import OpenAIConfigEntry as OpenAIConfigEntry
2
- from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, UNSUPPORTED_IMAGE_MODELS as UNSUPPORTED_IMAGE_MODELS
2
+ from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, CONF_IMAGE_MODEL as CONF_IMAGE_MODEL, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, RECOMMENDED_IMAGE_MODEL as RECOMMENDED_IMAGE_MODEL, UNSUPPORTED_IMAGE_MODELS as UNSUPPORTED_IMAGE_MODELS
3
3
  from .entity import OpenAIBaseLLMEntity as OpenAIBaseLLMEntity
4
4
  from _typeshed import Incomplete
5
5
  from homeassistant.components import ai_task as ai_task, conversation as conversation
@@ -1,4 +1,4 @@
1
- from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, CONF_CODE_INTERPRETER as CONF_CODE_INTERPRETER, CONF_MAX_TOKENS as CONF_MAX_TOKENS, CONF_PROMPT as CONF_PROMPT, CONF_REASONING_EFFORT as CONF_REASONING_EFFORT, CONF_RECOMMENDED as CONF_RECOMMENDED, CONF_TEMPERATURE as CONF_TEMPERATURE, CONF_TOP_P as CONF_TOP_P, CONF_VERBOSITY as CONF_VERBOSITY, CONF_WEB_SEARCH as CONF_WEB_SEARCH, CONF_WEB_SEARCH_CITY as CONF_WEB_SEARCH_CITY, CONF_WEB_SEARCH_CONTEXT_SIZE as CONF_WEB_SEARCH_CONTEXT_SIZE, CONF_WEB_SEARCH_COUNTRY as CONF_WEB_SEARCH_COUNTRY, CONF_WEB_SEARCH_REGION as CONF_WEB_SEARCH_REGION, CONF_WEB_SEARCH_TIMEZONE as CONF_WEB_SEARCH_TIMEZONE, CONF_WEB_SEARCH_USER_LOCATION as CONF_WEB_SEARCH_USER_LOCATION, DEFAULT_AI_TASK_NAME as DEFAULT_AI_TASK_NAME, DEFAULT_CONVERSATION_NAME as DEFAULT_CONVERSATION_NAME, DOMAIN as DOMAIN, RECOMMENDED_AI_TASK_OPTIONS as RECOMMENDED_AI_TASK_OPTIONS, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, RECOMMENDED_CODE_INTERPRETER as RECOMMENDED_CODE_INTERPRETER, RECOMMENDED_CONVERSATION_OPTIONS as RECOMMENDED_CONVERSATION_OPTIONS, RECOMMENDED_MAX_TOKENS as RECOMMENDED_MAX_TOKENS, RECOMMENDED_REASONING_EFFORT as RECOMMENDED_REASONING_EFFORT, RECOMMENDED_TEMPERATURE as RECOMMENDED_TEMPERATURE, RECOMMENDED_TOP_P as RECOMMENDED_TOP_P, RECOMMENDED_VERBOSITY as RECOMMENDED_VERBOSITY, RECOMMENDED_WEB_SEARCH as RECOMMENDED_WEB_SEARCH, RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE as RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE, RECOMMENDED_WEB_SEARCH_USER_LOCATION as RECOMMENDED_WEB_SEARCH_USER_LOCATION, UNSUPPORTED_MODELS as UNSUPPORTED_MODELS, UNSUPPORTED_WEB_SEARCH_MODELS as UNSUPPORTED_WEB_SEARCH_MODELS
1
+ from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, CONF_CODE_INTERPRETER as CONF_CODE_INTERPRETER, CONF_IMAGE_MODEL as CONF_IMAGE_MODEL, CONF_MAX_TOKENS as CONF_MAX_TOKENS, CONF_PROMPT as CONF_PROMPT, CONF_REASONING_EFFORT as CONF_REASONING_EFFORT, CONF_RECOMMENDED as CONF_RECOMMENDED, CONF_TEMPERATURE as CONF_TEMPERATURE, CONF_TOP_P as CONF_TOP_P, CONF_VERBOSITY as CONF_VERBOSITY, CONF_WEB_SEARCH as CONF_WEB_SEARCH, CONF_WEB_SEARCH_CITY as CONF_WEB_SEARCH_CITY, CONF_WEB_SEARCH_CONTEXT_SIZE as CONF_WEB_SEARCH_CONTEXT_SIZE, CONF_WEB_SEARCH_COUNTRY as CONF_WEB_SEARCH_COUNTRY, CONF_WEB_SEARCH_REGION as CONF_WEB_SEARCH_REGION, CONF_WEB_SEARCH_TIMEZONE as CONF_WEB_SEARCH_TIMEZONE, CONF_WEB_SEARCH_USER_LOCATION as CONF_WEB_SEARCH_USER_LOCATION, DEFAULT_AI_TASK_NAME as DEFAULT_AI_TASK_NAME, DEFAULT_CONVERSATION_NAME as DEFAULT_CONVERSATION_NAME, DOMAIN as DOMAIN, RECOMMENDED_AI_TASK_OPTIONS as RECOMMENDED_AI_TASK_OPTIONS, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, RECOMMENDED_CODE_INTERPRETER as RECOMMENDED_CODE_INTERPRETER, RECOMMENDED_CONVERSATION_OPTIONS as RECOMMENDED_CONVERSATION_OPTIONS, RECOMMENDED_IMAGE_MODEL as RECOMMENDED_IMAGE_MODEL, RECOMMENDED_MAX_TOKENS as RECOMMENDED_MAX_TOKENS, RECOMMENDED_REASONING_EFFORT as RECOMMENDED_REASONING_EFFORT, RECOMMENDED_TEMPERATURE as RECOMMENDED_TEMPERATURE, RECOMMENDED_TOP_P as RECOMMENDED_TOP_P, RECOMMENDED_VERBOSITY as RECOMMENDED_VERBOSITY, RECOMMENDED_WEB_SEARCH as RECOMMENDED_WEB_SEARCH, RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE as RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE, RECOMMENDED_WEB_SEARCH_USER_LOCATION as RECOMMENDED_WEB_SEARCH_USER_LOCATION, UNSUPPORTED_IMAGE_MODELS as UNSUPPORTED_IMAGE_MODELS, UNSUPPORTED_MODELS as UNSUPPORTED_MODELS, UNSUPPORTED_WEB_SEARCH_MODELS as UNSUPPORTED_WEB_SEARCH_MODELS
2
2
  from _typeshed import Incomplete
3
3
  from homeassistant.components.zone import ENTITY_ID_HOME as ENTITY_ID_HOME
4
4
  from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigEntryState as ConfigEntryState, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, ConfigSubentryFlow as ConfigSubentryFlow, SubentryFlowResult as SubentryFlowResult
@@ -9,6 +9,7 @@ DEFAULT_CONVERSATION_NAME: str
9
9
  DEFAULT_AI_TASK_NAME: str
10
10
  DEFAULT_NAME: str
11
11
  CONF_CHAT_MODEL: str
12
+ CONF_IMAGE_MODEL: str
12
13
  CONF_CODE_INTERPRETER: str
13
14
  CONF_FILENAMES: str
14
15
  CONF_MAX_TOKENS: str
@@ -27,6 +28,7 @@ CONF_WEB_SEARCH_COUNTRY: str
27
28
  CONF_WEB_SEARCH_TIMEZONE: str
28
29
  RECOMMENDED_CODE_INTERPRETER: bool
29
30
  RECOMMENDED_CHAT_MODEL: str
31
+ RECOMMENDED_IMAGE_MODEL: str
30
32
  RECOMMENDED_MAX_TOKENS: int
31
33
  RECOMMENDED_REASONING_EFFORT: str
32
34
  RECOMMENDED_TEMPERATURE: float
@@ -1,6 +1,6 @@
1
1
  import voluptuous as vol
2
2
  from . import OpenAIConfigEntry as OpenAIConfigEntry
3
- from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, CONF_CODE_INTERPRETER as CONF_CODE_INTERPRETER, CONF_MAX_TOKENS as CONF_MAX_TOKENS, CONF_REASONING_EFFORT as CONF_REASONING_EFFORT, CONF_TEMPERATURE as CONF_TEMPERATURE, CONF_TOP_P as CONF_TOP_P, CONF_VERBOSITY as CONF_VERBOSITY, CONF_WEB_SEARCH as CONF_WEB_SEARCH, CONF_WEB_SEARCH_CITY as CONF_WEB_SEARCH_CITY, CONF_WEB_SEARCH_CONTEXT_SIZE as CONF_WEB_SEARCH_CONTEXT_SIZE, CONF_WEB_SEARCH_COUNTRY as CONF_WEB_SEARCH_COUNTRY, CONF_WEB_SEARCH_REGION as CONF_WEB_SEARCH_REGION, CONF_WEB_SEARCH_TIMEZONE as CONF_WEB_SEARCH_TIMEZONE, CONF_WEB_SEARCH_USER_LOCATION as CONF_WEB_SEARCH_USER_LOCATION, DOMAIN as DOMAIN, LOGGER as LOGGER, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, RECOMMENDED_MAX_TOKENS as RECOMMENDED_MAX_TOKENS, RECOMMENDED_REASONING_EFFORT as RECOMMENDED_REASONING_EFFORT, RECOMMENDED_TEMPERATURE as RECOMMENDED_TEMPERATURE, RECOMMENDED_TOP_P as RECOMMENDED_TOP_P, RECOMMENDED_VERBOSITY as RECOMMENDED_VERBOSITY, RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE as RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE
3
+ from .const import CONF_CHAT_MODEL as CONF_CHAT_MODEL, CONF_CODE_INTERPRETER as CONF_CODE_INTERPRETER, CONF_IMAGE_MODEL as CONF_IMAGE_MODEL, CONF_MAX_TOKENS as CONF_MAX_TOKENS, CONF_REASONING_EFFORT as CONF_REASONING_EFFORT, CONF_TEMPERATURE as CONF_TEMPERATURE, CONF_TOP_P as CONF_TOP_P, CONF_VERBOSITY as CONF_VERBOSITY, CONF_WEB_SEARCH as CONF_WEB_SEARCH, CONF_WEB_SEARCH_CITY as CONF_WEB_SEARCH_CITY, CONF_WEB_SEARCH_CONTEXT_SIZE as CONF_WEB_SEARCH_CONTEXT_SIZE, CONF_WEB_SEARCH_COUNTRY as CONF_WEB_SEARCH_COUNTRY, CONF_WEB_SEARCH_REGION as CONF_WEB_SEARCH_REGION, CONF_WEB_SEARCH_TIMEZONE as CONF_WEB_SEARCH_TIMEZONE, CONF_WEB_SEARCH_USER_LOCATION as CONF_WEB_SEARCH_USER_LOCATION, DOMAIN as DOMAIN, LOGGER as LOGGER, RECOMMENDED_CHAT_MODEL as RECOMMENDED_CHAT_MODEL, RECOMMENDED_IMAGE_MODEL as RECOMMENDED_IMAGE_MODEL, RECOMMENDED_MAX_TOKENS as RECOMMENDED_MAX_TOKENS, RECOMMENDED_REASONING_EFFORT as RECOMMENDED_REASONING_EFFORT, RECOMMENDED_TEMPERATURE as RECOMMENDED_TEMPERATURE, RECOMMENDED_TOP_P as RECOMMENDED_TOP_P, RECOMMENDED_VERBOSITY as RECOMMENDED_VERBOSITY, RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE as RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import AsyncGenerator, Callable as Callable, Iterable
6
6
  from homeassistant.components import conversation as conversation
@@ -9,6 +9,7 @@ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callb
9
9
  from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed
10
10
  from homeassistant.helpers.aiohttp_client import async_create_clientsession as async_create_clientsession
11
11
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
12
+ from homeassistant.util.unit_conversion import EnergyConverter as EnergyConverter, VolumeConverter as VolumeConverter
12
13
  from opower import Account as Account, CostRead as CostRead, Forecast
13
14
 
14
15
  _LOGGER: Incomplete
@@ -12,6 +12,7 @@ CONFIG_SCHEMA: Incomplete
12
12
  PLATFORMS: Incomplete
13
13
  DATA_PRIVILEGED_KEY: HassKey[bool | None]
14
14
 
15
+ async def async_migrate_entry(hass: HomeAssistant, entry: PingConfigEntry) -> bool: ...
15
16
  async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
16
17
  async def async_setup_entry(hass: HomeAssistant, entry: PingConfigEntry) -> bool: ...
17
18
  async def async_unload_entry(hass: HomeAssistant, entry: PingConfigEntry) -> bool: ...
@@ -14,6 +14,7 @@ def _clean_user_input(user_input: dict[str, Any]) -> dict[str, Any]: ...
14
14
 
15
15
  class PingConfigFlow(ConfigFlow, domain=DOMAIN):
16
16
  VERSION: int
17
+ MINOR_VERSION: int
17
18
  async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
18
19
  @staticmethod
19
20
  @callback
@@ -1,4 +1,4 @@
1
- from .const import CONF_IMPORTED_BY as CONF_IMPORTED_BY
1
+ from .const import CONF_IMPORTED_BY as CONF_IMPORTED_BY, DOMAIN as DOMAIN
2
2
  from .coordinator import PingConfigEntry as PingConfigEntry, PingUpdateCoordinator as PingUpdateCoordinator
3
3
  from _typeshed import Incomplete
4
4
  from datetime import datetime
@@ -14,7 +14,8 @@ class PingDeviceTracker(CoordinatorEntity[PingUpdateCoordinator], ScannerEntity)
14
14
  _attr_name: Incomplete
15
15
  config_entry: Incomplete
16
16
  _consider_home_interval: Incomplete
17
- def __init__(self, config_entry: PingConfigEntry, coordinator: PingUpdateCoordinator) -> None: ...
17
+ device_entry: Incomplete
18
+ def __init__(self, hass: HomeAssistant, config_entry: PingConfigEntry, coordinator: PingUpdateCoordinator) -> None: ...
18
19
  @property
19
20
  def ip_address(self) -> str: ...
20
21
  @property
@@ -1,3 +1,4 @@
1
+ from .const import DOMAIN as DOMAIN
1
2
  from .coordinator import PingConfigEntry as PingConfigEntry, PingUpdateCoordinator as PingUpdateCoordinator
2
3
  from _typeshed import Incomplete
3
4
  from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
@@ -0,0 +1,29 @@
1
+ from . import PortainerConfigEntry as PortainerConfigEntry
2
+ from .const import DOMAIN as DOMAIN
3
+ from .coordinator import PortainerCoordinator as PortainerCoordinator, PortainerCoordinatorData as PortainerCoordinatorData
4
+ from .entity import PortainerContainerEntity as PortainerContainerEntity
5
+ from _typeshed import Incomplete
6
+ from collections.abc import Callable as Callable, Coroutine
7
+ from dataclasses import dataclass
8
+ from homeassistant.components.button import ButtonDeviceClass as ButtonDeviceClass, ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
9
+ from homeassistant.const import EntityCategory as EntityCategory
10
+ from homeassistant.core import HomeAssistant as HomeAssistant
11
+ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
12
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
13
+ from pyportainer import Portainer as Portainer
14
+ from pyportainer.models.docker import DockerContainer as DockerContainer
15
+ from typing import Any
16
+
17
+ @dataclass(frozen=True, kw_only=True)
18
+ class PortainerButtonDescription(ButtonEntityDescription):
19
+ press_action: Callable[[Portainer, int, str], Coroutine[Any, Any, None]]
20
+
21
+ BUTTONS: tuple[PortainerButtonDescription, ...]
22
+
23
+ async def async_setup_entry(hass: HomeAssistant, entry: PortainerConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
24
+
25
+ class PortainerButton(PortainerContainerEntity, ButtonEntity):
26
+ entity_description: PortainerButtonDescription
27
+ _attr_unique_id: Incomplete
28
+ def __init__(self, coordinator: PortainerCoordinator, entity_description: PortainerButtonDescription, device_info: DockerContainer, via_device: PortainerCoordinatorData) -> None: ...
29
+ async def async_press(self) -> None: ...
@@ -1,5 +1,6 @@
1
1
  from .const import DOMAIN as DOMAIN
2
2
  from _typeshed import Incomplete
3
+ from collections.abc import Mapping
3
4
  from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
4
5
  from homeassistant.const import CONF_API_TOKEN as CONF_API_TOKEN, CONF_URL as CONF_URL, CONF_VERIFY_SSL as CONF_VERIFY_SSL
5
6
  from homeassistant.core import HomeAssistant as HomeAssistant
@@ -15,6 +16,9 @@ async def _validate_input(hass: HomeAssistant, data: dict[str, Any]) -> None: ..
15
16
  class PortainerConfigFlow(ConfigFlow, domain=DOMAIN):
16
17
  VERSION: int
17
18
  async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
19
+ async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
20
+ async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
21
+ async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
18
22
 
19
23
  class CannotConnect(HomeAssistantError): ...
20
24
  class InvalidAuth(HomeAssistantError): ...
@@ -1,2 +1,3 @@
1
1
  DOMAIN: str
2
2
  DEFAULT_NAME: str
3
+ ENDPOINT_STATUS_DOWN: int
@@ -1,13 +1,15 @@
1
- from .const import DOMAIN as DOMAIN
1
+ from .const import DOMAIN as DOMAIN, ENDPOINT_STATUS_DOWN as ENDPOINT_STATUS_DOWN
2
2
  from _typeshed import Incomplete
3
+ from collections.abc import Callable as Callable
3
4
  from dataclasses import dataclass
4
5
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
5
6
  from homeassistant.const import CONF_URL as CONF_URL
6
7
  from homeassistant.core import HomeAssistant as HomeAssistant
7
- from homeassistant.exceptions import ConfigEntryError as ConfigEntryError, ConfigEntryNotReady as ConfigEntryNotReady
8
+ from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed, ConfigEntryNotReady as ConfigEntryNotReady
8
9
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
9
10
  from pyportainer import Portainer as Portainer
10
11
  from pyportainer.models.docker import DockerContainer as DockerContainer
12
+ from pyportainer.models.docker_inspect import DockerInfo as DockerInfo, DockerVersion as DockerVersion
11
13
  from pyportainer.models.portainer import Endpoint as Endpoint
12
14
 
13
15
  type PortainerConfigEntry = ConfigEntry[PortainerCoordinator]
@@ -20,10 +22,17 @@ class PortainerCoordinatorData:
20
22
  name: str | None
21
23
  endpoint: Endpoint
22
24
  containers: dict[str, DockerContainer]
25
+ docker_version: DockerVersion
26
+ docker_info: DockerInfo
23
27
 
24
28
  class PortainerCoordinator(DataUpdateCoordinator[dict[int, PortainerCoordinatorData]]):
25
29
  config_entry: PortainerConfigEntry
26
30
  portainer: Incomplete
31
+ known_endpoints: set[int]
32
+ known_containers: set[tuple[int, str]]
33
+ new_endpoints_callbacks: list[Callable[[list[PortainerCoordinatorData]], None]]
34
+ new_containers_callbacks: list[Callable[[list[tuple[PortainerCoordinatorData, DockerContainer]]], None]]
27
35
  def __init__(self, hass: HomeAssistant, config_entry: PortainerConfigEntry, portainer: Portainer) -> None: ...
28
36
  async def _async_setup(self) -> None: ...
29
37
  async def _async_update_data(self) -> dict[int, PortainerCoordinatorData]: ...
38
+ def _async_add_remove_endpoints(self, mapped_endpoints: dict[int, PortainerCoordinatorData]) -> None: ...
@@ -0,0 +1,12 @@
1
+ from . import PortainerConfigEntry as PortainerConfigEntry
2
+ from .coordinator import PortainerCoordinator as PortainerCoordinator
3
+ from _typeshed import Incomplete
4
+ from homeassistant.components.diagnostics import async_redact_data as async_redact_data
5
+ from homeassistant.const import CONF_API_TOKEN as CONF_API_TOKEN
6
+ from homeassistant.core import HomeAssistant as HomeAssistant
7
+ from typing import Any
8
+
9
+ TO_REDACT: Incomplete
10
+
11
+ def _serialize_coordinator(coordinator: PortainerCoordinator) -> dict[str, Any]: ...
12
+ async def async_get_config_entry_diagnostics(hass: HomeAssistant, config_entry: PortainerConfigEntry) -> dict[str, Any]: ...
@@ -1,6 +1,7 @@
1
1
  from .const import DEFAULT_NAME as DEFAULT_NAME, DOMAIN as DOMAIN
2
2
  from .coordinator import PortainerCoordinator as PortainerCoordinator, PortainerCoordinatorData as PortainerCoordinatorData
3
3
  from _typeshed import Incomplete
4
+ from homeassistant.const import CONF_URL as CONF_URL
4
5
  from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
5
6
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
6
7
  from pyportainer.models.docker import DockerContainer as DockerContainer
@@ -18,5 +19,6 @@ class PortainerContainerEntity(PortainerCoordinatorEntity):
18
19
  _device_info: Incomplete
19
20
  device_id: Incomplete
20
21
  endpoint_id: Incomplete
22
+ device_name: Incomplete
21
23
  _attr_device_info: Incomplete
22
24
  def __init__(self, device_info: DockerContainer, coordinator: PortainerCoordinator, via_device: PortainerCoordinatorData) -> None: ...
@@ -0,0 +1,41 @@
1
+ from .coordinator import PortainerConfigEntry as PortainerConfigEntry, PortainerCoordinator as PortainerCoordinator
2
+ from .entity import PortainerContainerEntity as PortainerContainerEntity, PortainerCoordinatorData as PortainerCoordinatorData, PortainerEndpointEntity as PortainerEndpointEntity
3
+ from _typeshed import Incomplete
4
+ from collections.abc import Callable as Callable
5
+ from dataclasses import dataclass
6
+ from homeassistant.components.sensor import EntityCategory as EntityCategory, SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass, StateType as StateType
7
+ from homeassistant.const import UnitOfInformation as UnitOfInformation
8
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
10
+ from pyportainer.models.docker import DockerContainer as DockerContainer
11
+
12
+ @dataclass(frozen=True, kw_only=True)
13
+ class PortainerContainerSensorEntityDescription(SensorEntityDescription):
14
+ value_fn: Callable[[DockerContainer], StateType]
15
+
16
+ @dataclass(frozen=True, kw_only=True)
17
+ class PortainerEndpointSensorEntityDescription(SensorEntityDescription):
18
+ value_fn: Callable[[PortainerCoordinatorData], StateType]
19
+
20
+ CONTAINER_SENSORS: tuple[PortainerContainerSensorEntityDescription, ...]
21
+ ENDPOINT_SENSORS: tuple[PortainerEndpointSensorEntityDescription, ...]
22
+
23
+ async def async_setup_entry(hass: HomeAssistant, entry: PortainerConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
24
+
25
+ class PortainerContainerSensor(PortainerContainerEntity, SensorEntity):
26
+ entity_description: PortainerContainerSensorEntityDescription
27
+ _attr_unique_id: Incomplete
28
+ def __init__(self, coordinator: PortainerCoordinator, entity_description: PortainerContainerSensorEntityDescription, device_info: DockerContainer, via_device: PortainerCoordinatorData) -> None: ...
29
+ @property
30
+ def available(self) -> bool: ...
31
+ @property
32
+ def native_value(self) -> StateType: ...
33
+
34
+ class PortainerEndpointSensor(PortainerEndpointEntity, SensorEntity):
35
+ entity_description: PortainerEndpointSensorEntityDescription
36
+ _attr_unique_id: Incomplete
37
+ def __init__(self, coordinator: PortainerCoordinator, entity_description: PortainerEndpointSensorEntityDescription, device_info: PortainerCoordinatorData) -> None: ...
38
+ @property
39
+ def available(self) -> bool: ...
40
+ @property
41
+ def native_value(self) -> StateType: ...
@@ -0,0 +1,35 @@
1
+ from . import PortainerConfigEntry as PortainerConfigEntry
2
+ from .const import DOMAIN as DOMAIN
3
+ from .coordinator import PortainerCoordinator as PortainerCoordinator
4
+ from .entity import PortainerContainerEntity as PortainerContainerEntity, PortainerCoordinatorData as PortainerCoordinatorData
5
+ from _typeshed import Incomplete
6
+ from collections.abc import Callable as Callable, Coroutine
7
+ from dataclasses import dataclass
8
+ from homeassistant.components.switch import SwitchDeviceClass as SwitchDeviceClass, SwitchEntity as SwitchEntity, SwitchEntityDescription as SwitchEntityDescription
9
+ from homeassistant.core import HomeAssistant as HomeAssistant
10
+ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
11
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
12
+ from pyportainer import Portainer as Portainer
13
+ from pyportainer.models.docker import DockerContainer as DockerContainer
14
+ from typing import Any
15
+
16
+ @dataclass(frozen=True, kw_only=True)
17
+ class PortainerSwitchEntityDescription(SwitchEntityDescription):
18
+ is_on_fn: Callable[[DockerContainer], bool | None]
19
+ turn_on_fn: Callable[[str, Portainer, int, str], Coroutine[Any, Any, None]]
20
+ turn_off_fn: Callable[[str, Portainer, int, str], Coroutine[Any, Any, None]]
21
+
22
+ async def perform_action(action: str, portainer: Portainer, endpoint_id: int, container_id: str) -> None: ...
23
+
24
+ SWITCHES: tuple[PortainerSwitchEntityDescription, ...]
25
+
26
+ async def async_setup_entry(hass: HomeAssistant, entry: PortainerConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
27
+
28
+ class PortainerContainerSwitch(PortainerContainerEntity, SwitchEntity):
29
+ entity_description: PortainerSwitchEntityDescription
30
+ _attr_unique_id: Incomplete
31
+ def __init__(self, coordinator: PortainerCoordinator, entity_description: PortainerSwitchEntityDescription, device_info: DockerContainer, via_device: PortainerCoordinatorData) -> None: ...
32
+ @property
33
+ def is_on(self) -> bool | None: ...
34
+ async def async_turn_on(self, **kwargs: Any) -> None: ...
35
+ async def async_turn_off(self, **kwargs: Any) -> None: ...
@@ -9,10 +9,8 @@ from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo, form
9
9
  from homeassistant.helpers.entity import Entity as Entity
10
10
  from qbusmqttapi.discovery import QbusMqttDevice as QbusMqttDevice, QbusMqttOutput as QbusMqttOutput
11
11
  from qbusmqttapi.state import QbusMqttState
12
- from typing import Generic, TypeVar
13
12
 
14
13
  _REFID_REGEX: Incomplete
15
- StateT = TypeVar('StateT', bound=QbusMqttState)
16
14
 
17
15
  def create_new_entities(coordinator: QbusControllerCoordinator, added_outputs: list[QbusMqttOutput], filter_fn: Callable[[QbusMqttOutput], bool], entity_type: type[QbusEntity]) -> list[QbusEntity]: ...
18
16
  def determine_new_outputs(coordinator: QbusControllerCoordinator, added_outputs: list[QbusMqttOutput], filter_fn: Callable[[QbusMqttOutput], bool]) -> list[QbusMqttOutput]: ...
@@ -20,7 +18,7 @@ def format_ref_id(ref_id: str) -> str | None: ...
20
18
  def create_device_identifier(mqtt_device: QbusMqttDevice) -> tuple[str, str]: ...
21
19
  def create_unique_id(serial_number: str, suffix: str) -> str: ...
22
20
 
23
- class QbusEntity(Entity, ABC, Generic[StateT], metaclass=abc.ABCMeta):
21
+ class QbusEntity[StateT: QbusMqttState](Entity, ABC, metaclass=abc.ABCMeta):
24
22
  _state_cls: type[StateT]
25
23
  _attr_has_entity_name: bool
26
24
  _attr_should_poll: bool
@@ -1,6 +1,6 @@
1
1
  from .const import DOMAIN as DOMAIN
2
2
  from _typeshed import Incomplete
3
- from homeassistant.components.hardware.models import BoardInfo as BoardInfo, HardwareInfo as HardwareInfo
3
+ from homeassistant.components.hardware import BoardInfo as BoardInfo, HardwareInfo as HardwareInfo
4
4
  from homeassistant.components.hassio import get_os_info as get_os_info
5
5
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
6
6
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
@@ -24,8 +24,8 @@ KEEPALIVE_TIME: int
24
24
  CONTEXT_ID_AS_BINARY_SCHEMA_VERSION: int
25
25
  EVENT_TYPE_IDS_SCHEMA_VERSION: int
26
26
  STATES_META_SCHEMA_VERSION: int
27
- LAST_REPORTED_SCHEMA_VERSION: int
28
27
  CIRCULAR_MEAN_SCHEMA_VERSION: int
28
+ UNIT_CLASS_SCHEMA_VERSION: int
29
29
  LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION: int
30
30
  LEGACY_STATES_EVENT_FOREIGN_KEYS_FIXED_SCHEMA_VERSION: int
31
31
  INTEGRATION_PLATFORM_COMPILE_STATISTICS: str
@@ -3,10 +3,10 @@ import psutil_home_assistant as ha_psutil
3
3
  import queue
4
4
  import threading
5
5
  from . import migration as migration, statistics as statistics
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
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, 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, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
9
+ from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, 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
@@ -158,7 +158,7 @@ class Recorder(threading.Thread):
158
158
  @callback
159
159
  def async_clear_statistics(self, statistic_ids: list[str], *, on_done: Callable[[], None] | None = None) -> None: ...
160
160
  @callback
161
- def async_update_statistics_metadata(self, statistic_id: str, *, new_statistic_id: str | UndefinedType = ..., new_unit_of_measurement: str | None | UndefinedType = ..., on_done: Callable[[], None] | None = None) -> None: ...
161
+ def async_update_statistics_metadata(self, statistic_id: str, *, new_statistic_id: str | UndefinedType = ..., new_unit_class: str | None | UndefinedType = ..., new_unit_of_measurement: str | None | UndefinedType = ..., on_done: Callable[[], None] | None = None) -> None: ...
162
162
  @callback
163
163
  def async_update_states_metadata(self, entity_id: str, new_entity_id: str) -> None: ...
164
164
  @callback
@@ -1,13 +1,12 @@
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, 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
2
+ from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, 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
6
6
  from homeassistant.components.sensor import ATTR_STATE_CLASS as ATTR_STATE_CLASS
7
7
  from homeassistant.const import ATTR_DEVICE_CLASS as ATTR_DEVICE_CLASS, ATTR_FRIENDLY_NAME as ATTR_FRIENDLY_NAME, ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, MATCH_ALL as MATCH_ALL, MAX_LENGTH_EVENT_EVENT_TYPE as MAX_LENGTH_EVENT_EVENT_TYPE, MAX_LENGTH_STATE_ENTITY_ID as MAX_LENGTH_STATE_ENTITY_ID, MAX_LENGTH_STATE_STATE as MAX_LENGTH_STATE_STATE
8
- from homeassistant.core import Context as Context, Event as Event, EventOrigin as EventOrigin, EventStateChangedData as EventStateChangedData, State as State
8
+ from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData
9
9
  from homeassistant.helpers.json import JSON_DUMP as JSON_DUMP, json_bytes as json_bytes, json_bytes_strip_null as json_bytes_strip_null
10
- from homeassistant.util.json import JSON_DECODE_EXCEPTIONS as JSON_DECODE_EXCEPTIONS, json_loads as json_loads, json_loads_object as json_loads_object
11
10
  from sqlalchemy import CHAR, ColumnElement as ColumnElement, DateTime, JSON, LargeBinary
12
11
  from sqlalchemy.dialects import sqlite
13
12
  from sqlalchemy.engine.interfaces import Dialect as Dialect
@@ -85,8 +84,6 @@ class _LiteralProcessorType(Protocol):
85
84
  class JSONLiteral(JSON):
86
85
  def literal_processor(self, dialect: Dialect) -> _LiteralProcessorType: ...
87
86
 
88
- EVENT_ORIGIN_ORDER: Incomplete
89
-
90
87
  class Events(Base):
91
88
  __table_args__: Incomplete
92
89
  __tablename__ = TABLE_EVENTS
@@ -112,7 +109,6 @@ class Events(Base):
112
109
  def _time_fired_isotime(self) -> str | None: ...
113
110
  @staticmethod
114
111
  def from_event(event: Event) -> Events: ...
115
- def to_native(self, validate_entity_id: bool = True) -> Event | None: ...
116
112
 
117
113
  class LegacyEvents(LegacyBase):
118
114
  __table_args__: Incomplete
@@ -131,7 +127,6 @@ class EventData(Base):
131
127
  def shared_data_bytes_from_event(event: Event, dialect: SupportedDialect | None) -> bytes: ...
132
128
  @staticmethod
133
129
  def hash_shared_data_bytes(shared_data_bytes: bytes) -> int: ...
134
- def to_native(self) -> dict[str, Any]: ...
135
130
 
136
131
  class EventTypes(Base):
137
132
  __table_args__: Incomplete
@@ -171,7 +166,6 @@ class States(Base):
171
166
  def _last_updated_isotime(self) -> str | None: ...
172
167
  @staticmethod
173
168
  def from_event(event: Event[EventStateChangedData]) -> States: ...
174
- def to_native(self, validate_entity_id: bool = True) -> State | None: ...
175
169
 
176
170
  class LegacyStates(LegacyBase):
177
171
  __table_args__: Incomplete
@@ -192,7 +186,6 @@ class StateAttributes(Base):
192
186
  def shared_attrs_bytes_from_event(event: Event[EventStateChangedData], dialect: SupportedDialect | None) -> bytes: ...
193
187
  @staticmethod
194
188
  def hash_shared_attrs_bytes(shared_attrs_bytes: bytes) -> int: ...
195
- def to_native(self) -> dict[str, Any]: ...
196
189
 
197
190
  class StatesMeta(Base):
198
191
  __table_args__: Incomplete
@@ -245,6 +238,7 @@ class _StatisticsMeta:
245
238
  statistic_id: Mapped[str | None]
246
239
  source: Mapped[str | None]
247
240
  unit_of_measurement: Mapped[str | None]
241
+ unit_class: Mapped[str | None]
248
242
  has_mean: Mapped[bool | None]
249
243
  has_sum: Mapped[bool | None]
250
244
  name: Mapped[str | None]
@@ -266,7 +260,6 @@ class RecorderRuns(Base):
266
260
  closed_incorrect: Mapped[bool]
267
261
  created: Mapped[datetime]
268
262
  def __repr__(self) -> str: ...
269
- def to_native(self, validate_entity_id: bool = True) -> Self: ...
270
263
 
271
264
  class MigrationChanges(Base):
272
265
  __tablename__ = TABLE_MIGRATION_CHANGES
@@ -1,4 +1,5 @@
1
1
  from .core import Recorder as Recorder
2
+ from .statistics import async_update_statistics_metadata as async_update_statistics_metadata
2
3
  from .util import filter_unique_constraint_integrity_error as filter_unique_constraint_integrity_error, get_instance as get_instance, session_scope as session_scope
3
4
  from _typeshed import Incomplete
4
5
  from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
@@ -7,8 +7,8 @@ from typing import Any
7
7
 
8
8
  __all__ = ['NEED_ATTRIBUTE_DOMAINS', 'SIGNIFICANT_DOMAINS', 'get_full_significant_states_with_session', 'get_last_state_changes', 'get_significant_states', 'get_significant_states_with_session', 'state_changes_during_period']
9
9
 
10
- def get_full_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: datetime | None = None, entity_ids: list[str] | None = None, filters: Filters | None = None, include_start_time_state: bool = True, significant_changes_only: bool = True, no_attributes: bool = False) -> dict[str, list[State]]: ...
11
- def get_last_state_changes(hass: HomeAssistant, number_of_states: int, entity_id: str) -> dict[str, list[State]]: ...
12
10
  def get_significant_states(hass: HomeAssistant, start_time: datetime, end_time: datetime | None = None, entity_ids: list[str] | None = None, filters: Filters | None = None, include_start_time_state: bool = True, significant_changes_only: bool = True, minimal_response: bool = False, no_attributes: bool = False, compressed_state_format: bool = False) -> dict[str, list[State | dict[str, Any]]]: ...
13
11
  def get_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: datetime | None = None, entity_ids: list[str] | None = None, filters: Filters | None = None, include_start_time_state: bool = True, significant_changes_only: bool = True, minimal_response: bool = False, no_attributes: bool = False, compressed_state_format: bool = False) -> dict[str, list[State | dict[str, Any]]]: ...
12
+ def get_full_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: datetime | None = None, entity_ids: list[str] | None = None, filters: Filters | None = None, include_start_time_state: bool = True, significant_changes_only: bool = True, no_attributes: bool = False) -> dict[str, list[State]]: ...
14
13
  def state_changes_during_period(hass: HomeAssistant, start_time: datetime, end_time: datetime | None = None, entity_id: str | None = None, no_attributes: bool = False, descending: bool = False, limit: int | None = None, include_start_time_state: bool = True) -> dict[str, list[State]]: ...
14
+ def get_last_state_changes(hass: HomeAssistant, number_of_states: int, entity_id: str) -> dict[str, list[State]]: ...
@@ -6,7 +6,7 @@ from .db_schema import BIG_INTEGER_SQL as BIG_INTEGER_SQL, Base as Base, CONTEXT
6
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
- from .statistics import cleanup_statistics_timestamp_migration as cleanup_statistics_timestamp_migration, get_start_time as get_start_time
9
+ from .statistics import _PRIMARY_UNIT_CONVERTERS as _PRIMARY_UNIT_CONVERTERS, cleanup_statistics_timestamp_migration as cleanup_statistics_timestamp_migration, get_start_time as get_start_time
10
10
  from .tasks import RecorderTask as RecorderTask
11
11
  from .util import database_job_retry_wrapper as database_job_retry_wrapper, database_job_retry_wrapper_method as database_job_retry_wrapper_method, execute_stmt_lambda_element as execute_stmt_lambda_element, get_index_by_name as get_index_by_name, retryable_database_job_method as retryable_database_job_method, session_scope as session_scope
12
12
  from _typeshed import Incomplete
@@ -259,6 +259,9 @@ class _SchemaVersion49Migrator(_SchemaVersionMigrator, target_version=49):
259
259
  class _SchemaVersion50Migrator(_SchemaVersionMigrator, target_version=50):
260
260
  def _apply_update(self) -> None: ...
261
261
 
262
+ class _SchemaVersion51Migrator(_SchemaVersionMigrator, target_version=51):
263
+ def _apply_update(self) -> None: ...
264
+
262
265
  def _migrate_statistics_columns_to_timestamp_removing_duplicates(hass: HomeAssistant, instance: Recorder, session_maker: Callable[[], Session], engine: Engine) -> None: ...
263
266
  def _correct_table_character_set_and_collation(table: str, session_maker: Callable[[], Session]) -> None: ...
264
267
  def _wipe_old_string_time_columns(instance: Recorder, engine: Engine, session: Session) -> None: ...
@@ -38,6 +38,7 @@ class StatisticMetaData(TypedDict):
38
38
  name: str | None
39
39
  source: str
40
40
  statistic_id: str
41
+ unit_class: str | None
41
42
  unit_of_measurement: str | None
42
43
 
43
44
  class CalendarStatisticPeriod(TypedDict, total=False):
@@ -10,12 +10,13 @@ from datetime import datetime, timedelta
10
10
  from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT
11
11
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback, valid_entity_id as valid_entity_id
12
12
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
13
+ from homeassistant.helpers.frame import report_usage as report_usage
13
14
  from homeassistant.helpers.recorder import DATA_RECORDER as DATA_RECORDER
14
15
  from homeassistant.helpers.singleton import singleton as singleton
15
16
  from homeassistant.helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
16
17
  from homeassistant.util.collection import chunked_or_all as chunked_or_all
17
18
  from homeassistant.util.enum import try_parse_enum as try_parse_enum
18
- from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, 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, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
19
+ from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, CarbonMonoxideConcentrationConverter as CarbonMonoxideConcentrationConverter, 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, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, TemperatureDeltaConverter as TemperatureDeltaConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
19
20
  from sqlalchemy import Label as Label, Select as Select
20
21
  from sqlalchemy.engine.row import Row
21
22
  from sqlalchemy.orm.session import Session as Session
@@ -29,8 +30,10 @@ def query_circular_mean(table: type[StatisticsBase]) -> tuple[Label, Label]: ...
29
30
 
30
31
  QUERY_STATISTICS_SUMMARY_MEAN: Incomplete
31
32
  QUERY_STATISTICS_SUMMARY_SUM: Incomplete
33
+ _PRIMARY_UNIT_CONVERTERS: list[type[BaseUnitConverter]]
34
+ _SECONDARY_UNIT_CONVERTERS: list[type[BaseUnitConverter]]
32
35
  STATISTIC_UNIT_TO_UNIT_CONVERTER: dict[str | None, type[BaseUnitConverter]]
33
- UNIT_CLASSES: Incomplete
36
+ UNIT_CLASS_TO_UNIT_CONVERTER: dict[str | None, type[BaseUnitConverter]]
34
37
  DATA_SHORT_TERM_STATISTICS_RUN_CACHE: str
35
38
 
36
39
  def mean(values: list[float]) -> float | None: ...
@@ -63,11 +66,12 @@ class StatisticsRow(BaseStatisticsRow, total=False):
63
66
  mean_weight: float | None
64
67
  change: float | None
65
68
 
66
- def get_display_unit(hass: HomeAssistant, statistic_id: str, statistic_unit: str | None) -> str | None: ...
67
- def _get_statistic_to_display_unit_converter(statistic_unit: str | None, state_unit: str | None, requested_units: dict[str, str] | None, allow_none: bool = True) -> Callable[[float | None], float | None] | Callable[[float], float] | None: ...
68
- def _get_display_to_statistic_unit_converter(display_unit: str | None, statistic_unit: str | None) -> Callable[[float], float] | None: ...
69
- def _get_unit_converter(from_unit: str, to_unit: str) -> Callable[[float | None], float | None] | None: ...
70
- def can_convert_units(from_unit: str | None, to_unit: str | None) -> bool: ...
69
+ def _get_unit_converter(unit_class: str | None, from_unit: str | None) -> type[BaseUnitConverter] | None: ...
70
+ def get_display_unit(hass: HomeAssistant, statistic_id: str, unit_class: str | None, statistic_unit: str | None) -> str | None: ...
71
+ def _get_statistic_to_display_unit_converter(unit_class: str | None, statistic_unit: str | None, state_unit: str | None, requested_units: dict[str, str] | None, allow_none: bool = True) -> Callable[[float | None], float | None] | Callable[[float], float] | None: ...
72
+ def _get_display_to_statistic_unit_converter_func(unit_class: str | None, display_unit: str | None, statistic_unit: str | None) -> Callable[[float], float] | None: ...
73
+ def _get_unit_converter_func(unit_class: str | None, from_unit: str, to_unit: str) -> Callable[[float | None], float | None] | None: ...
74
+ def can_convert_units(unit_class: str | None, from_unit: str | None, to_unit: str | None) -> bool: ...
71
75
 
72
76
  @dataclasses.dataclass
73
77
  class PlatformCompiledStatistics:
@@ -101,7 +105,9 @@ def _update_statistics(session: Session, table: type[StatisticsBase], stat_id: i
101
105
  def get_metadata_with_session(instance: Recorder, session: Session, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
102
106
  def get_metadata(hass: HomeAssistant, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
103
107
  def clear_statistics(instance: Recorder, statistic_ids: list[str]) -> None: ...
104
- def update_statistics_metadata(instance: Recorder, statistic_id: str, new_statistic_id: str | None | UndefinedType, new_unit_of_measurement: str | None | UndefinedType) -> None: ...
108
+ @callback
109
+ def async_update_statistics_metadata(hass: HomeAssistant, statistic_id: str, *, new_statistic_id: str | UndefinedType = ..., new_unit_class: str | None | UndefinedType = ..., new_unit_of_measurement: str | None | UndefinedType = ..., on_done: Callable[[], None] | None = None, _called_from_ws_api: bool = False) -> None: ...
110
+ def update_statistics_metadata(instance: Recorder, statistic_id: str, new_statistic_id: str | None | UndefinedType, new_unit_class: str | None | UndefinedType, new_unit_of_measurement: str | None | UndefinedType) -> None: ...
105
111
  async def async_list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None) -> list[dict]: ...
106
112
  def _statistic_by_id_from_metadata(hass: HomeAssistant, metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, dict[str, Any]]: ...
107
113
  def _flatten_list_statistic_ids_metadata_result(result: dict[str, dict[str, Any]]) -> list[dict]: ...
@@ -161,9 +167,9 @@ def _statistics_exists(session: Session, table: type[StatisticsBase], metadata_i
161
167
  @callback
162
168
  def _async_import_statistics(hass: HomeAssistant, metadata: StatisticMetaData, statistics: Iterable[StatisticData]) -> None: ...
163
169
  @callback
164
- def async_import_statistics(hass: HomeAssistant, metadata: StatisticMetaData, statistics: Iterable[StatisticData]) -> None: ...
170
+ def async_import_statistics(hass: HomeAssistant, metadata: StatisticMetaData, statistics: Iterable[StatisticData], *, _called_from_ws_api: bool = False) -> None: ...
165
171
  @callback
166
- def async_add_external_statistics(hass: HomeAssistant, metadata: StatisticMetaData, statistics: Iterable[StatisticData]) -> None: ...
172
+ def async_add_external_statistics(hass: HomeAssistant, metadata: StatisticMetaData, statistics: Iterable[StatisticData], *, _called_from_ws_api: bool = False) -> None: ...
167
173
  def _import_statistics_with_session(instance: Recorder, session: Session, metadata: StatisticMetaData, statistics: Iterable[StatisticData], table: type[StatisticsBase]) -> bool: ...
168
174
  def get_short_term_statistics_run_cache(hass: HomeAssistant) -> ShortTermStatisticsRunCache: ...
169
175
  def cache_latest_short_term_statistic_id_for_metadata_id(run_cache: ShortTermStatisticsRunCache, session: Session, metadata_id: int) -> int | None: ...
@@ -172,6 +178,5 @@ def import_statistics(instance: Recorder, metadata: StatisticMetaData, statistic
172
178
  def adjust_statistics(instance: Recorder, statistic_id: str, start_time: datetime, sum_adjustment: float, adjustment_unit: str) -> bool: ...
173
179
  def _change_statistics_unit_for_table(session: Session, table: type[StatisticsBase], metadata_id: int, convert: Callable[[float | None], float | None]) -> None: ...
174
180
  def change_statistics_unit(instance: Recorder, statistic_id: str, new_unit: str, old_unit: str) -> None: ...
175
- @callback
176
- def async_change_statistics_unit(hass: HomeAssistant, statistic_id: str, *, new_unit_of_measurement: str, old_unit_of_measurement: str) -> None: ...
181
+ async def async_change_statistics_unit(hass: HomeAssistant, statistic_id: str, *, new_unit_of_measurement: str, old_unit_of_measurement: str) -> None: ...
177
182
  def cleanup_statistics_timestamp_migration(instance: Recorder) -> bool: ...
@@ -11,7 +11,6 @@ from sqlalchemy.orm.session import Session as Session
11
11
  CACHE_SIZE: int
12
12
 
13
13
  class StatesMetaManager(BaseLRUTableManager[StatesMeta]):
14
- active: bool
15
14
  _did_first_load: bool
16
15
  def __init__(self, recorder: Recorder) -> None: ...
17
16
  def load(self, events: list[Event[EventStateChangedData]], session: Session) -> None: ...