homeassistant-stubs 2023.3.6__py3-none-any.whl → 2023.4.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.
Files changed (333) hide show
  1. homeassistant-stubs/auth/__init__.pyi +1 -1
  2. homeassistant-stubs/auth/jwt_wrapper.pyi +14 -0
  3. homeassistant-stubs/auth/permissions/models.pyi +3 -3
  4. homeassistant-stubs/bootstrap.pyi +1 -1
  5. homeassistant-stubs/components/aladdin_connect/config_flow.pyi +0 -2
  6. homeassistant-stubs/components/aladdin_connect/cover.pyi +5 -7
  7. homeassistant-stubs/components/alarm_control_panel/device_action.pyi +0 -1
  8. homeassistant-stubs/components/alarm_control_panel/device_condition.pyi +1 -1
  9. homeassistant-stubs/components/alarm_control_panel/device_trigger.pyi +0 -1
  10. homeassistant-stubs/components/amazon_polly/tts.pyi +2 -2
  11. homeassistant-stubs/components/amcrest/camera.pyi +0 -1
  12. homeassistant-stubs/components/awair/sensor.pyi +2 -1
  13. homeassistant-stubs/components/backup/manager.pyi +2 -1
  14. homeassistant-stubs/components/bayesian/issues.pyi +0 -1
  15. homeassistant-stubs/components/bluetooth/wrappers.pyi +1 -0
  16. homeassistant-stubs/components/bmw_connected_drive/config_flow.pyi +3 -0
  17. homeassistant-stubs/components/bmw_connected_drive/coordinator.pyi +1 -0
  18. homeassistant-stubs/components/braviatv/media_player.pyi +2 -2
  19. homeassistant-stubs/components/button/device_action.pyi +0 -1
  20. homeassistant-stubs/components/button/device_trigger.pyi +0 -1
  21. homeassistant-stubs/components/calendar/__init__.pyi +8 -4
  22. homeassistant-stubs/components/calendar/const.pyi +2 -2
  23. homeassistant-stubs/components/calendar/trigger.pyi +25 -8
  24. homeassistant-stubs/components/camera/__init__.pyi +1 -1
  25. homeassistant-stubs/components/cover/device_action.pyi +0 -1
  26. homeassistant-stubs/components/cover/device_condition.pyi +1 -1
  27. homeassistant-stubs/components/cover/device_trigger.pyi +0 -1
  28. homeassistant-stubs/components/demo/sensor.pyi +2 -1
  29. homeassistant-stubs/components/demo/stt.pyi +2 -2
  30. homeassistant-stubs/components/device_automation/condition.pyi +2 -4
  31. homeassistant-stubs/components/device_tracker/device_condition.pyi +1 -1
  32. homeassistant-stubs/components/device_tracker/device_trigger.pyi +0 -1
  33. homeassistant-stubs/components/devolo_home_network/device_tracker.pyi +0 -1
  34. homeassistant-stubs/components/devolo_home_network/entity.pyi +1 -0
  35. homeassistant-stubs/components/dlna_dmr/config_flow.pyi +0 -1
  36. homeassistant-stubs/components/dlna_dmr/media_player.pyi +1 -2
  37. homeassistant-stubs/components/dormakaba_dkey/__init__.pyi +1 -1
  38. homeassistant-stubs/components/dormakaba_dkey/config_flow.pyi +5 -1
  39. homeassistant-stubs/components/efergy/sensor.pyi +2 -2
  40. homeassistant-stubs/components/emulated_hue/hue_api.pyi +1 -0
  41. homeassistant-stubs/components/energy/types.pyi +2 -2
  42. homeassistant-stubs/components/energy/websocket_api.pyi +1 -0
  43. homeassistant-stubs/components/esphome/bluetooth/client.pyi +3 -1
  44. homeassistant-stubs/components/esphome/entry_data.pyi +1 -0
  45. homeassistant-stubs/components/esphome/media_player.pyi +1 -1
  46. homeassistant-stubs/components/fan/device_condition.pyi +1 -1
  47. homeassistant-stubs/components/filesize/__init__.pyi +1 -2
  48. homeassistant-stubs/components/fitbit/sensor.pyi +1 -1
  49. homeassistant-stubs/components/fritz/binary_sensor.pyi +7 -11
  50. homeassistant-stubs/components/fritz/common.pyi +25 -3
  51. homeassistant-stubs/components/fritz/sensor.pyi +6 -15
  52. homeassistant-stubs/components/fritzbox/sensor.pyi +0 -1
  53. homeassistant-stubs/components/fronius/coordinator.pyi +2 -3
  54. homeassistant-stubs/components/fronius/sensor.pyi +13 -8
  55. homeassistant-stubs/components/fully_kiosk/media_player.pyi +3 -3
  56. homeassistant-stubs/components/fully_kiosk/sensor.pyi +3 -3
  57. homeassistant-stubs/components/gios/__init__.pyi +3 -3
  58. homeassistant-stubs/components/gios/const.pyi +0 -2
  59. homeassistant-stubs/components/gios/sensor.pyi +10 -13
  60. homeassistant-stubs/components/google/__init__.pyi +1 -1
  61. homeassistant-stubs/components/google/calendar.pyi +1 -1
  62. homeassistant-stubs/components/google/const.pyi +1 -0
  63. homeassistant-stubs/components/group/media_player.pyi +4 -3
  64. homeassistant-stubs/components/group/notify.pyi +1 -1
  65. homeassistant-stubs/components/group/sensor.pyi +2 -0
  66. homeassistant-stubs/components/guardian/util.pyi +0 -1
  67. homeassistant-stubs/components/history/websocket_api.pyi +2 -1
  68. homeassistant-stubs/components/homeassistant_alerts/__init__.pyi +4 -2
  69. homeassistant-stubs/components/homeassistant_hardware/silabs_multiprotocol_addon.pyi +7 -2
  70. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +2 -8
  71. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +3 -7
  72. homeassistant-stubs/components/homekit/__init__.pyi +6 -6
  73. homeassistant-stubs/components/homekit/config_flow.pyi +2 -2
  74. homeassistant-stubs/components/homekit/type_triggers.pyi +0 -1
  75. homeassistant-stubs/components/http/__init__.pyi +18 -1
  76. homeassistant-stubs/components/http/auth.pyi +1 -0
  77. homeassistant-stubs/components/http/security_filter.pyi +1 -0
  78. homeassistant-stubs/components/huawei_lte/__init__.pyi +1 -1
  79. homeassistant-stubs/components/huawei_lte/device_tracker.pyi +0 -1
  80. homeassistant-stubs/components/isy994/lock.pyi +8 -3
  81. homeassistant-stubs/components/isy994/services.pyi +6 -0
  82. homeassistant-stubs/components/jellyfin/coordinator.pyi +4 -2
  83. homeassistant-stubs/components/jellyfin/media_player.pyi +3 -3
  84. homeassistant-stubs/components/knx/__init__.pyi +3 -2
  85. homeassistant-stubs/components/knx/device.pyi +18 -0
  86. homeassistant-stubs/components/knx/light.pyi +2 -2
  87. homeassistant-stubs/components/knx/sensor.pyi +33 -2
  88. homeassistant-stubs/components/kraken/sensor.pyi +0 -1
  89. homeassistant-stubs/components/lametric/__init__.pyi +1 -2
  90. homeassistant-stubs/components/lidarr/const.pyi +0 -2
  91. homeassistant-stubs/components/lifx/__init__.pyi +2 -2
  92. homeassistant-stubs/components/light/intent.pyi +1 -1
  93. homeassistant-stubs/components/litejet/__init__.pyi +14 -0
  94. homeassistant-stubs/components/litejet/config_flow.pyi +18 -0
  95. homeassistant-stubs/components/litejet/const.pyi +8 -0
  96. homeassistant-stubs/components/litejet/diagnostics.pyi +7 -0
  97. homeassistant-stubs/components/litejet/light.pyi +39 -0
  98. homeassistant-stubs/components/litejet/scene.pyi +32 -0
  99. homeassistant-stubs/components/litejet/switch.pyi +37 -0
  100. homeassistant-stubs/components/litejet/trigger.pyi +16 -0
  101. homeassistant-stubs/components/litterrobot/select.pyi +11 -6
  102. homeassistant-stubs/components/lock/device_action.pyi +0 -1
  103. homeassistant-stubs/components/lock/device_condition.pyi +1 -1
  104. homeassistant-stubs/components/lock/device_trigger.pyi +0 -1
  105. homeassistant-stubs/components/logbook/__init__.pyi +3 -3
  106. homeassistant-stubs/components/logbook/const.pyi +0 -2
  107. homeassistant-stubs/components/logbook/helpers.pyi +1 -1
  108. homeassistant-stubs/components/logbook/models.pyi +25 -7
  109. homeassistant-stubs/components/logbook/processor.pyi +8 -7
  110. homeassistant-stubs/components/logbook/queries/__init__.pyi +3 -1
  111. homeassistant-stubs/components/logbook/queries/all.pyi +4 -4
  112. homeassistant-stubs/components/logbook/queries/common.pyi +2 -2
  113. homeassistant-stubs/components/logbook/queries/devices.pyi +1 -1
  114. homeassistant-stubs/components/logbook/queries/entities.pyi +6 -6
  115. homeassistant-stubs/components/logbook/queries/entities_and_devices.pyi +5 -5
  116. homeassistant-stubs/components/logbook/websocket_api.pyi +2 -2
  117. homeassistant-stubs/components/logger/helpers.pyi +1 -1
  118. homeassistant-stubs/components/logger/websocket_api.pyi +1 -1
  119. homeassistant-stubs/components/matter/binary_sensor.pyi +5 -1
  120. homeassistant-stubs/components/matter/entity.pyi +5 -1
  121. homeassistant-stubs/components/matter/lock.pyi +44 -0
  122. homeassistant-stubs/components/matter/models.pyi +2 -9
  123. homeassistant-stubs/components/matter/sensor.pyi +5 -1
  124. homeassistant-stubs/components/media_player/__init__.pyi +2 -2
  125. homeassistant-stubs/components/media_player/device_condition.pyi +1 -1
  126. homeassistant-stubs/components/media_player/device_trigger.pyi +0 -1
  127. homeassistant-stubs/components/metoffice/__init__.pyi +0 -2
  128. homeassistant-stubs/components/metoffice/sensor.pyi +2 -1
  129. homeassistant-stubs/components/mikrotik/const.pyi +2 -0
  130. homeassistant-stubs/components/mikrotik/device_tracker.pyi +0 -1
  131. homeassistant-stubs/components/mikrotik/hub.pyi +2 -1
  132. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  133. homeassistant-stubs/components/modbus/climate.pyi +3 -1
  134. homeassistant-stubs/components/modbus/const.pyi +1 -0
  135. homeassistant-stubs/components/modbus/modbus.pyi +1 -1
  136. homeassistant-stubs/components/modem_callerid/button.pyi +2 -2
  137. homeassistant-stubs/components/modem_callerid/sensor.pyi +2 -2
  138. homeassistant-stubs/components/moon/config_flow.pyi +0 -2
  139. homeassistant-stubs/components/moon/sensor.pyi +2 -7
  140. homeassistant-stubs/components/mqtt/__init__.pyi +5 -7
  141. homeassistant-stubs/components/mqtt/client.pyi +24 -2
  142. homeassistant-stubs/components/mqtt/config_integration.pyi +1 -1
  143. homeassistant-stubs/components/mqtt/const.pyi +0 -1
  144. homeassistant-stubs/components/mqtt/models.pyi +2 -1
  145. homeassistant-stubs/components/mysensors/__init__.pyi +4 -9
  146. homeassistant-stubs/components/mysensors/const.pyi +1 -3
  147. homeassistant-stubs/components/mysensors/device.pyi +1 -1
  148. homeassistant-stubs/components/mysensors/light.pyi +1 -1
  149. homeassistant-stubs/components/mysensors/switch.pyi +6 -20
  150. homeassistant-stubs/components/nam/__init__.pyi +0 -2
  151. homeassistant-stubs/components/nam/sensor.pyi +0 -1
  152. homeassistant-stubs/components/netatmo/device_trigger.pyi +0 -1
  153. homeassistant-stubs/components/nissan_leaf/sensor.pyi +2 -3
  154. homeassistant-stubs/components/notify/legacy.pyi +2 -2
  155. homeassistant-stubs/components/number/const.pyi +2 -0
  156. homeassistant-stubs/components/number/device_action.pyi +0 -1
  157. homeassistant-stubs/components/otbr/__init__.pyi +3 -0
  158. homeassistant-stubs/components/otbr/config_flow.pyi +3 -2
  159. homeassistant-stubs/components/otbr/util.pyi +6 -0
  160. homeassistant-stubs/components/otbr/websocket_api.pyi +7 -3
  161. homeassistant-stubs/components/overkiz/climate_entities/__init__.pyi +1 -0
  162. homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_heater.pyi +2 -0
  163. homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.pyi +2 -0
  164. homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.pyi +2 -0
  165. homeassistant-stubs/components/overkiz/climate_entities/atlantic_heat_recovery_ventilation.pyi +2 -0
  166. homeassistant-stubs/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.pyi +2 -0
  167. homeassistant-stubs/components/overkiz/climate_entities/somfy_thermostat.pyi +2 -2
  168. homeassistant-stubs/components/overkiz/climate_entities/valve_heating_temperature_interface.pyi +37 -0
  169. homeassistant-stubs/components/overkiz/const.pyi +2 -1
  170. homeassistant-stubs/components/overkiz/sensor.pyi +3 -1
  171. homeassistant-stubs/components/overkiz/switch.pyi +2 -2
  172. homeassistant-stubs/components/pi_hole/sensor.pyi +2 -2
  173. homeassistant-stubs/components/rainmachine/util.pyi +0 -1
  174. homeassistant-stubs/components/recorder/__init__.pyi +3 -3
  175. homeassistant-stubs/components/recorder/auto_repairs/__init__.pyi +0 -0
  176. homeassistant-stubs/components/recorder/auto_repairs/events/__init__.pyi +0 -0
  177. homeassistant-stubs/components/recorder/auto_repairs/events/schema.pyi +6 -0
  178. homeassistant-stubs/components/recorder/auto_repairs/schema.pyi +23 -0
  179. homeassistant-stubs/components/recorder/auto_repairs/states/schema.pyi +9 -0
  180. homeassistant-stubs/components/recorder/auto_repairs/statistics/__init__.pyi +0 -0
  181. homeassistant-stubs/components/recorder/auto_repairs/statistics/duplicates.pyi +19 -0
  182. homeassistant-stubs/components/recorder/auto_repairs/statistics/schema.pyi +9 -0
  183. homeassistant-stubs/components/recorder/const.pyi +10 -0
  184. homeassistant-stubs/components/recorder/core.pyi +33 -29
  185. homeassistant-stubs/components/recorder/db_schema.pyi +36 -6
  186. homeassistant-stubs/components/recorder/entity_registry.pyi +10 -0
  187. homeassistant-stubs/components/recorder/filters.pyi +13 -11
  188. homeassistant-stubs/components/recorder/history/__init__.pyi +13 -0
  189. homeassistant-stubs/components/recorder/history/common.pyi +4 -0
  190. homeassistant-stubs/components/recorder/history/const.pyi +9 -0
  191. homeassistant-stubs/components/recorder/{history.pyi → history/legacy.pyi} +9 -14
  192. homeassistant-stubs/components/recorder/history/modern.pyi +41 -0
  193. homeassistant-stubs/components/recorder/migration.pyi +34 -6
  194. homeassistant-stubs/components/recorder/models/__init__.pyi +5 -0
  195. homeassistant-stubs/components/recorder/models/context.pyi +6 -0
  196. homeassistant-stubs/components/recorder/models/database.pyi +14 -0
  197. homeassistant-stubs/components/recorder/models/legacy.pyi +39 -0
  198. homeassistant-stubs/components/recorder/models/state.pyi +43 -0
  199. homeassistant-stubs/components/recorder/models/state_attributes.pyi +9 -0
  200. homeassistant-stubs/components/recorder/models/statistics.pyi +50 -0
  201. homeassistant-stubs/components/recorder/models/time.pyi +20 -0
  202. homeassistant-stubs/components/recorder/purge.pyi +9 -12
  203. homeassistant-stubs/components/recorder/queries.pyi +19 -3
  204. homeassistant-stubs/components/recorder/services.pyi +1 -1
  205. homeassistant-stubs/components/recorder/statistics.pyi +40 -42
  206. homeassistant-stubs/components/recorder/table_managers/__init__.pyi +20 -0
  207. homeassistant-stubs/components/recorder/table_managers/event_data.pyi +26 -0
  208. homeassistant-stubs/components/recorder/table_managers/event_types.pyi +20 -0
  209. homeassistant-stubs/components/recorder/{run_history.pyi → table_managers/recorder_runs.pyi} +3 -3
  210. homeassistant-stubs/components/recorder/table_managers/state_attributes.pyi +29 -0
  211. homeassistant-stubs/components/recorder/table_managers/states.pyi +14 -0
  212. homeassistant-stubs/components/recorder/table_managers/states_meta.pyi +23 -0
  213. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +35 -0
  214. homeassistant-stubs/components/recorder/tasks.pyi +39 -4
  215. homeassistant-stubs/components/recorder/util.pyi +2 -1
  216. homeassistant-stubs/components/recorder/websocket_api.pyi +2 -2
  217. homeassistant-stubs/components/renault/renault_vehicle.pyi +1 -0
  218. homeassistant-stubs/components/rest/__init__.pyi +1 -1
  219. homeassistant-stubs/components/rest/const.pyi +2 -0
  220. homeassistant-stubs/components/rest/data.pyi +3 -2
  221. homeassistant-stubs/components/rest/schema.pyi +1 -1
  222. homeassistant-stubs/components/ridwell/calendar.pyi +22 -0
  223. homeassistant-stubs/components/ridwell/coordinator.pyi +2 -2
  224. homeassistant-stubs/components/ridwell/entity.pyi +2 -4
  225. homeassistant-stubs/components/ridwell/sensor.pyi +2 -1
  226. homeassistant-stubs/components/ridwell/switch.pyi +4 -0
  227. homeassistant-stubs/components/roku/media_player.pyi +4 -4
  228. homeassistant-stubs/components/samsungtv/device_trigger.pyi +19 -0
  229. homeassistant-stubs/components/samsungtv/helpers.pyi +8 -0
  230. homeassistant-stubs/components/samsungtv/media_player.pyi +7 -2
  231. homeassistant-stubs/components/samsungtv/trigger.pyi +12 -0
  232. homeassistant-stubs/components/samsungtv/triggers/__init__.pyi +0 -0
  233. homeassistant-stubs/components/samsungtv/triggers/turn_on.pyi +14 -0
  234. homeassistant-stubs/components/scrape/config_flow.pyi +1 -1
  235. homeassistant-stubs/components/scrape/const.pyi +2 -0
  236. homeassistant-stubs/components/scrape/sensor.pyi +3 -6
  237. homeassistant-stubs/components/select/device_action.pyi +0 -1
  238. homeassistant-stubs/components/select/device_condition.pyi +1 -1
  239. homeassistant-stubs/components/select/device_trigger.pyi +0 -1
  240. homeassistant-stubs/components/sensor/const.pyi +2 -0
  241. homeassistant-stubs/components/sensor/recorder.pyi +3 -1
  242. homeassistant-stubs/components/sfr_box/__init__.pyi +1 -1
  243. homeassistant-stubs/components/sfr_box/binary_sensor.pyi +3 -1
  244. homeassistant-stubs/components/sfr_box/models.pyi +4 -2
  245. homeassistant-stubs/components/sfr_box/sensor.pyi +2 -1
  246. homeassistant-stubs/components/sleepiq/entity.pyi +0 -1
  247. homeassistant-stubs/components/statistics/sensor.pyi +2 -2
  248. homeassistant-stubs/components/sun/__init__.pyi +1 -1
  249. homeassistant-stubs/components/sun/sensor.pyi +36 -0
  250. homeassistant-stubs/components/switcher_kis/__init__.pyi +1 -1
  251. homeassistant-stubs/components/switcher_kis/button.pyi +0 -1
  252. homeassistant-stubs/components/switcher_kis/climate.pyi +0 -1
  253. homeassistant-stubs/components/switcher_kis/cover.pyi +0 -1
  254. homeassistant-stubs/components/switcher_kis/sensor.pyi +0 -1
  255. homeassistant-stubs/components/switcher_kis/switch.pyi +1 -1
  256. homeassistant-stubs/components/synology_dsm/sensor.pyi +5 -4
  257. homeassistant-stubs/components/threshold/__init__.pyi +7 -0
  258. homeassistant-stubs/components/threshold/binary_sensor.pyi +55 -0
  259. homeassistant-stubs/components/threshold/config_flow.pyi +19 -0
  260. homeassistant-stubs/components/threshold/const.pyi +5 -0
  261. homeassistant-stubs/components/tibber/config_flow.pyi +3 -0
  262. homeassistant-stubs/components/tibber/sensor.pyi +2 -1
  263. homeassistant-stubs/components/tplink/light.pyi +1 -1
  264. homeassistant-stubs/components/tplink_omada/__init__.pyi +1 -0
  265. homeassistant-stubs/components/tplink_omada/controller.pyi +21 -0
  266. homeassistant-stubs/components/tplink_omada/coordinator.pyi +3 -4
  267. homeassistant-stubs/components/tplink_omada/entity.pyi +6 -4
  268. homeassistant-stubs/components/tplink_omada/switch.pyi +4 -6
  269. homeassistant-stubs/components/tplink_omada/update.pyi +43 -0
  270. homeassistant-stubs/components/tradfri/sensor.pyi +0 -1
  271. homeassistant-stubs/components/tts/__init__.pyi +2 -1
  272. homeassistant-stubs/components/unifi/__init__.pyi +33 -0
  273. homeassistant-stubs/components/unifi/config_flow.pyi +46 -0
  274. homeassistant-stubs/components/unifi/const.pyi +30 -0
  275. homeassistant-stubs/components/unifi/controller.pyi +77 -0
  276. homeassistant-stubs/components/unifi/device_tracker.pyi +70 -0
  277. homeassistant-stubs/components/unifi/diagnostics.pyi +19 -0
  278. homeassistant-stubs/components/unifi/entity.pyi +58 -0
  279. homeassistant-stubs/components/unifi/errors.pyi +8 -0
  280. homeassistant-stubs/components/unifi/sensor.pyi +37 -0
  281. homeassistant-stubs/components/unifi/services.pyi +17 -0
  282. homeassistant-stubs/components/unifi/switch.pyi +55 -0
  283. homeassistant-stubs/components/unifi/update.pyi +1 -1
  284. homeassistant-stubs/components/unifiprotect/select.pyi +2 -2
  285. homeassistant-stubs/components/vacuum/device_action.pyi +0 -1
  286. homeassistant-stubs/components/vacuum/device_condition.pyi +1 -1
  287. homeassistant-stubs/components/vacuum/device_trigger.pyi +0 -1
  288. homeassistant-stubs/components/velbus/__init__.pyi +0 -2
  289. homeassistant-stubs/components/velbus/light.pyi +1 -1
  290. homeassistant-stubs/components/velbus/select.pyi +21 -0
  291. homeassistant-stubs/components/water_heater/device_action.pyi +0 -1
  292. homeassistant-stubs/components/weather/__init__.pyi +2 -23
  293. homeassistant-stubs/components/weather/const.pyi +25 -0
  294. homeassistant-stubs/components/weather/websocket_api.pyi +7 -0
  295. homeassistant-stubs/components/webostv/trigger.pyi +3 -3
  296. homeassistant-stubs/components/webostv/triggers/__init__.pyi +0 -5
  297. homeassistant-stubs/components/websocket_api/commands.pyi +2 -2
  298. homeassistant-stubs/components/websocket_api/connection.pyi +7 -1
  299. homeassistant-stubs/components/zwave_js/__init__.pyi +4 -4
  300. homeassistant-stubs/components/zwave_js/api.pyi +0 -1
  301. homeassistant-stubs/components/zwave_js/device_action.pyi +0 -1
  302. homeassistant-stubs/components/zwave_js/device_trigger.pyi +0 -1
  303. homeassistant-stubs/components/zwave_js/diagnostics.pyi +2 -1
  304. homeassistant-stubs/components/zwave_js/discovery.pyi +1 -1
  305. homeassistant-stubs/components/zwave_js/update.pyi +18 -8
  306. homeassistant-stubs/config_entries.pyi +4 -1
  307. homeassistant-stubs/core.pyi +4 -3
  308. homeassistant-stubs/helpers/condition.pyi +11 -3
  309. homeassistant-stubs/helpers/config_validation.pyi +1 -1
  310. homeassistant-stubs/helpers/debounce.pyi +1 -0
  311. homeassistant-stubs/helpers/device_registry.pyi +1 -1
  312. homeassistant-stubs/helpers/entity.pyi +1 -0
  313. homeassistant-stubs/helpers/entity_platform.pyi +2 -1
  314. homeassistant-stubs/helpers/entity_registry.pyi +9 -1
  315. homeassistant-stubs/helpers/event.pyi +3 -1
  316. homeassistant-stubs/helpers/httpx_client.pyi +1 -0
  317. homeassistant-stubs/helpers/integration_platform.pyi +3 -3
  318. homeassistant-stubs/helpers/script.pyi +5 -3
  319. homeassistant-stubs/helpers/selector.pyi +29 -12
  320. homeassistant-stubs/helpers/service.pyi +11 -0
  321. homeassistant-stubs/helpers/template.pyi +24 -3
  322. homeassistant-stubs/scripts/check_config.pyi +0 -1
  323. homeassistant-stubs/util/ssl.pyi +8 -0
  324. homeassistant-stubs/util/ulid.pyi +2 -1
  325. homeassistant-stubs/util/yaml/dumper.pyi +1 -1
  326. homeassistant-stubs/util/yaml/loader.pyi +4 -5
  327. homeassistant-stubs/util/yaml/objects.pyi +1 -0
  328. {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/METADATA +2 -2
  329. {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/RECORD +331 -265
  330. homeassistant-stubs/components/mysensors/notify.pyi +0 -23
  331. homeassistant-stubs/components/recorder/models.pyi +0 -148
  332. {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/LICENSE +0 -0
  333. {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/WHEEL +0 -0
@@ -1,3 +1,4 @@
1
+ from ..const import DOMAIN as DOMAIN
1
2
  from ..coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
2
3
  from ..entity import OverkizEntity as OverkizEntity
3
4
  from _typeshed import Incomplete
@@ -8,8 +9,6 @@ from typing import Any
8
9
 
9
10
  PRESET_FREEZE: str
10
11
  PRESET_NIGHT: str
11
- STATE_DEROGATION_ACTIVE: str
12
- STATE_DEROGATION_INACTIVE: str
13
12
  OVERKIZ_TO_HVAC_MODES: dict[str, HVACMode]
14
13
  HVAC_MODES_TO_OVERKIZ: Incomplete
15
14
  OVERKIZ_TO_PRESET_MODES: dict[OverkizCommandParam, str]
@@ -22,6 +21,7 @@ class SomfyThermostat(OverkizEntity, ClimateEntity):
22
21
  _attr_supported_features: Incomplete
23
22
  _attr_hvac_modes: Incomplete
24
23
  _attr_preset_modes: Incomplete
24
+ _attr_translation_key: Incomplete
25
25
  _attr_min_temp: float
26
26
  _attr_max_temp: float
27
27
  temperature_device: Incomplete
@@ -0,0 +1,37 @@
1
+ from ..const import DOMAIN as DOMAIN
2
+ from ..coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
3
+ from ..entity import OverkizEntity as OverkizEntity
4
+ from _typeshed import Incomplete
5
+ from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, HVACAction as HVACAction, HVACMode as HVACMode, PRESET_AWAY as PRESET_AWAY, PRESET_COMFORT as PRESET_COMFORT, PRESET_ECO as PRESET_ECO, PRESET_NONE as PRESET_NONE, UnitOfTemperature as UnitOfTemperature
6
+ from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE
7
+ from typing import Any
8
+
9
+ PRESET_MANUAL: str
10
+ PRESET_FROST_PROTECTION: str
11
+ OVERKIZ_TO_HVAC_ACTION: dict[str, HVACAction]
12
+ OVERKIZ_TO_PRESET_MODE: dict[str, str]
13
+ PRESET_MODE_TO_OVERKIZ: Incomplete
14
+ TEMPERATURE_SENSOR_DEVICE_INDEX: int
15
+
16
+ class ValveHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
17
+ _attr_hvac_mode: Incomplete
18
+ _attr_hvac_modes: Incomplete
19
+ _attr_preset_modes: Incomplete
20
+ _attr_supported_features: Incomplete
21
+ _attr_temperature_unit: Incomplete
22
+ _attr_translation_key: Incomplete
23
+ temperature_device: Incomplete
24
+ _attr_min_temp: Incomplete
25
+ _attr_max_temp: Incomplete
26
+ def __init__(self, device_url: str, coordinator: OverkizDataUpdateCoordinator) -> None: ...
27
+ @property
28
+ def hvac_action(self) -> str: ...
29
+ @property
30
+ def target_temperature(self) -> float: ...
31
+ @property
32
+ def current_temperature(self) -> Union[float, None]: ...
33
+ async def async_set_temperature(self, **kwargs: Any) -> None: ...
34
+ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: ...
35
+ @property
36
+ def preset_mode(self) -> str: ...
37
+ async def async_set_preset_mode(self, preset_mode: str) -> None: ...
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  from _typeshed import Incomplete
3
- from homeassistant.const import Platform as Platform
3
+ from homeassistant.const import CONCENTRATION_PARTS_PER_BILLION as CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, Platform as Platform, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfPower as UnitOfPower, UnitOfPressure as UnitOfPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
4
4
  from pyoverkiz.enums import UIClass, UIWidget
5
5
  from typing import Final
6
6
 
@@ -14,3 +14,4 @@ PLATFORMS: list[Platform]
14
14
  IGNORED_OVERKIZ_DEVICES: list[Union[UIClass, UIWidget]]
15
15
  OVERKIZ_DEVICE_TO_PLATFORM: dict[Union[UIClass, UIWidget], Union[Platform, None]]
16
16
  OVERKIZ_STATE_TO_TRANSLATION: dict[str, str]
17
+ OVERKIZ_UNIT_TO_HA: dict[str, str]
@@ -1,5 +1,5 @@
1
1
  from . import HomeAssistantOverkizData as HomeAssistantOverkizData
2
- from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES, OVERKIZ_STATE_TO_TRANSLATION as OVERKIZ_STATE_TO_TRANSLATION
2
+ from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES, OVERKIZ_STATE_TO_TRANSLATION as OVERKIZ_STATE_TO_TRANSLATION, OVERKIZ_UNIT_TO_HA as OVERKIZ_UNIT_TO_HA
3
3
  from .coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
4
4
  from .entity import OverkizDescriptiveEntity as OverkizDescriptiveEntity, OverkizEntity as OverkizEntity
5
5
  from _typeshed import Incomplete
@@ -26,6 +26,8 @@ class OverkizStateSensor(OverkizDescriptiveEntity, SensorEntity):
26
26
  entity_description: OverkizSensorDescription
27
27
  @property
28
28
  def native_value(self) -> StateType: ...
29
+ @property
30
+ def native_unit_of_measurement(self) -> Union[str, None]: ...
29
31
 
30
32
  class OverkizHomeKitSetupCodeSensor(OverkizEntity, SensorEntity):
31
33
  _attr_icon: str
@@ -1,11 +1,11 @@
1
1
  from . import HomeAssistantOverkizData as HomeAssistantOverkizData
2
- from .const import DOMAIN as DOMAIN
2
+ from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES
3
3
  from .entity import OverkizDescriptiveEntity as OverkizDescriptiveEntity
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import Callable as Callable
6
6
  from homeassistant.components.switch import SwitchDeviceClass as SwitchDeviceClass, SwitchEntity as SwitchEntity, SwitchEntityDescription as SwitchEntityDescription
7
7
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
- from homeassistant.const import EntityCategory as EntityCategory, Platform as Platform
8
+ from homeassistant.const import EntityCategory as EntityCategory
9
9
  from homeassistant.core import HomeAssistant as HomeAssistant
10
10
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
11
11
  from pyoverkiz.types import StateType as OverkizStateType
@@ -7,8 +7,8 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
7
  from homeassistant.const import CONF_NAME as CONF_NAME, PERCENTAGE as PERCENTAGE
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant
9
9
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
10
+ from homeassistant.helpers.typing import StateType as StateType
10
11
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
11
- from typing import Any
12
12
 
13
13
  SENSOR_TYPES: tuple[SensorEntityDescription, ...]
14
14
 
@@ -20,4 +20,4 @@ class PiHoleSensor(PiHoleEntity, SensorEntity):
20
20
  _attr_unique_id: Incomplete
21
21
  def __init__(self, api: Hole, coordinator: DataUpdateCoordinator, name: str, server_unique_id: str, description: SensorEntityDescription) -> None: ...
22
22
  @property
23
- def native_value(self) -> Any: ...
23
+ def native_value(self) -> StateType: ...
@@ -5,7 +5,6 @@ from datetime import timedelta
5
5
  from homeassistant.backports.enum import StrEnum as StrEnum
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
7
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
8
- from homeassistant.helpers import entity_registry as entity_registry
9
8
  from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect, async_dispatcher_send as async_dispatcher_send
10
9
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
11
10
  from typing import Any
@@ -1,5 +1,5 @@
1
- from . import statistics as statistics, websocket_api as websocket_api
2
- from .const import CONF_DB_INTEGRITY_CHECK as CONF_DB_INTEGRITY_CHECK, DATA_INSTANCE as DATA_INSTANCE, 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, EXCLUDE_ATTRIBUTES as EXCLUDE_ATTRIBUTES, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX
1
+ from . import entity_registry as entity_registry, websocket_api as websocket_api
2
+ from .const import CONF_DB_INTEGRITY_CHECK as CONF_DB_INTEGRITY_CHECK, DATA_INSTANCE as DATA_INSTANCE, 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, EXCLUDE_ATTRIBUTES as EXCLUDE_ATTRIBUTES, INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD as INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD, INTEGRATION_PLATFORM_COMPILE_STATISTICS as INTEGRATION_PLATFORM_COMPILE_STATISTICS, INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES as INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX
3
3
  from .core import Recorder as Recorder
4
4
  from .services import async_register_services as async_register_services
5
5
  from .tasks import AddRecorderPlatformTask as AddRecorderPlatformTask
@@ -39,4 +39,4 @@ CONFIG_SCHEMA: Incomplete
39
39
 
40
40
  def is_entity_recorded(hass: HomeAssistant, entity_id: str) -> bool: ...
41
41
  async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
42
- async def _process_recorder_platform(hass: HomeAssistant, domain: str, platform: Any) -> None: ...
42
+ async def _async_setup_integration_platform(hass: HomeAssistant, instance: Recorder, exclude_attributes_by_domain: dict[str, set[str]]) -> None: ...
@@ -0,0 +1,6 @@
1
+ from ... import Recorder as Recorder
2
+ from ...db_schema import EventData as EventData, Events as Events
3
+ from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
4
+
5
+ def validate_db_schema(instance: Recorder) -> set[str]: ...
6
+ def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
@@ -0,0 +1,23 @@
1
+ from .. import Recorder as Recorder
2
+ from ..const import SupportedDialect as SupportedDialect
3
+ from ..db_schema import DOUBLE_PRECISION_TYPE_SQL as DOUBLE_PRECISION_TYPE_SQL, DOUBLE_TYPE as DOUBLE_TYPE
4
+ from ..util import session_scope as session_scope
5
+ from _typeshed import Incomplete
6
+ from collections.abc import Iterable, Mapping
7
+ from sqlalchemy.orm import DeclarativeBase as DeclarativeBase
8
+ from sqlalchemy.orm.attributes import InstrumentedAttribute as InstrumentedAttribute
9
+
10
+ _LOGGER: Incomplete
11
+ MYSQL_ERR_INCORRECT_STRING_VALUE: int
12
+ UTF8_NAME: str
13
+ PRECISE_NUMBER: float
14
+
15
+ def _get_precision_column_types(table_object: type[DeclarativeBase]) -> list[str]: ...
16
+ def validate_table_schema_supports_utf8(instance: Recorder, table_object: type[DeclarativeBase], columns: tuple[InstrumentedAttribute, ...]) -> set[str]: ...
17
+ def _validate_table_schema_supports_utf8(instance: Recorder, table_object: type[DeclarativeBase], columns: tuple[InstrumentedAttribute, ...]) -> set[str]: ...
18
+ def validate_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase]) -> set[str]: ...
19
+ def _validate_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase]) -> set[str]: ...
20
+ def _log_schema_errors(table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
21
+ def _check_columns(schema_errors: set[str], stored: Mapping, expected: Mapping, columns: Iterable[str], table_name: str, supports: str) -> None: ...
22
+ def correct_db_schema_utf8(instance: Recorder, table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
23
+ def correct_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
@@ -0,0 +1,9 @@
1
+ from ... import Recorder as Recorder
2
+ from ...db_schema import StateAttributes as StateAttributes, States as States
3
+ from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
4
+ from _typeshed import Incomplete
5
+
6
+ TABLE_UTF8_COLUMNS: Incomplete
7
+
8
+ def validate_db_schema(instance: Recorder) -> set[str]: ...
9
+ def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
@@ -0,0 +1,19 @@
1
+ from ... import Recorder as Recorder
2
+ from ...const import SQLITE_MAX_BIND_VARS as SQLITE_MAX_BIND_VARS
3
+ from ...db_schema import Statistics as Statistics, StatisticsBase as StatisticsBase, StatisticsMeta as StatisticsMeta, StatisticsShortTerm as StatisticsShortTerm
4
+ from ...util import database_job_retry_wrapper as database_job_retry_wrapper, execute as execute
5
+ from _typeshed import Incomplete
6
+ from homeassistant.core import HomeAssistant as HomeAssistant
7
+ from homeassistant.helpers.json import JSONEncoder as JSONEncoder
8
+ from homeassistant.helpers.storage import STORAGE_DIR as STORAGE_DIR
9
+ from sqlalchemy.engine.row import Row as Row
10
+ from sqlalchemy.orm.session import Session as Session
11
+
12
+ _LOGGER: Incomplete
13
+
14
+ def _find_duplicates(session: Session, table: type[StatisticsBase]) -> tuple[list[int], list[dict]]: ...
15
+ def _delete_duplicates_from_table(session: Session, table: type[StatisticsBase]) -> tuple[int, list[dict]]: ...
16
+ def delete_statistics_duplicates(instance: Recorder, hass: HomeAssistant, session: Session) -> None: ...
17
+ def _find_statistics_meta_duplicates(session: Session) -> list[int]: ...
18
+ def _delete_statistics_meta_duplicates(session: Session) -> int: ...
19
+ def delete_statistics_meta_duplicates(instance: Recorder, session: Session) -> None: ...
@@ -0,0 +1,9 @@
1
+ from ... import Recorder as Recorder
2
+ from ...db_schema import Statistics as Statistics, StatisticsMeta as StatisticsMeta, StatisticsShortTerm as StatisticsShortTerm
3
+ from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
4
+ from _typeshed import Incomplete
5
+
6
+ _LOGGER: Incomplete
7
+
8
+ def validate_db_schema(instance: Recorder) -> set[str]: ...
9
+ def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
@@ -22,6 +22,16 @@ ATTR_REPACK: str
22
22
  ATTR_APPLY_FILTER: str
23
23
  KEEPALIVE_TIME: int
24
24
  EXCLUDE_ATTRIBUTES: Incomplete
25
+ STATISTICS_ROWS_SCHEMA_VERSION: int
26
+ CONTEXT_ID_AS_BINARY_SCHEMA_VERSION: int
27
+ EVENT_TYPE_IDS_SCHEMA_VERSION: int
28
+ STATES_META_SCHEMA_VERSION: int
29
+ LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION: int
30
+ INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES: str
31
+ INTEGRATION_PLATFORM_COMPILE_STATISTICS: str
32
+ INTEGRATION_PLATFORM_VALIDATE_STATISTICS: str
33
+ INTEGRATION_PLATFORM_LIST_STATISTIC_IDS: str
34
+ INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD: Incomplete
25
35
 
26
36
  class SupportedDialect(StrEnum):
27
37
  SQLITE: str
@@ -1,27 +1,31 @@
1
1
  import asyncio
2
2
  import threading
3
3
  from . import migration as migration, statistics as statistics
4
- from .const import DB_WORKER_PREFIX as DB_WORKER_PREFIX, 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 as MAX_QUEUE_BACKLOG, MYSQLDB_PYMYSQL_URL_PREFIX as MYSQLDB_PYMYSQL_URL_PREFIX, MYSQLDB_URL_PREFIX as MYSQLDB_URL_PREFIX, SQLITE_MAX_BIND_VARS as SQLITE_MAX_BIND_VARS, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX, SupportedDialect as SupportedDialect
5
- from .db_schema import Base as Base, EventData as EventData, Events as Events, SCHEMA_VERSION as SCHEMA_VERSION, StateAttributes as StateAttributes, States as States, Statistics as Statistics, StatisticsRuns as StatisticsRuns, StatisticsShortTerm as StatisticsShortTerm
4
+ from .const import CONTEXT_ID_AS_BINARY_SCHEMA_VERSION as CONTEXT_ID_AS_BINARY_SCHEMA_VERSION, DB_WORKER_PREFIX as DB_WORKER_PREFIX, DOMAIN as DOMAIN, EVENT_TYPE_IDS_SCHEMA_VERSION as EVENT_TYPE_IDS_SCHEMA_VERSION, KEEPALIVE_TIME as KEEPALIVE_TIME, LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION as LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION, MARIADB_PYMYSQL_URL_PREFIX as MARIADB_PYMYSQL_URL_PREFIX, MARIADB_URL_PREFIX as MARIADB_URL_PREFIX, MAX_QUEUE_BACKLOG as MAX_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, STATES_META_SCHEMA_VERSION as STATES_META_SCHEMA_VERSION, STATISTICS_ROWS_SCHEMA_VERSION as STATISTICS_ROWS_SCHEMA_VERSION, SupportedDialect as SupportedDialect
5
+ from .db_schema import Base as Base, EventData as EventData, EventTypes as EventTypes, Events as Events, LEGACY_STATES_EVENT_ID_INDEX as LEGACY_STATES_EVENT_ID_INDEX, SCHEMA_VERSION as SCHEMA_VERSION, StateAttributes as StateAttributes, States as States, StatesMeta as StatesMeta, Statistics as Statistics, StatisticsShortTerm as StatisticsShortTerm, TABLE_STATES as TABLE_STATES
6
6
  from .executor import DBInterruptibleThreadPoolExecutor as DBInterruptibleThreadPoolExecutor
7
- from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect, process_timestamp as process_timestamp
7
+ from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
8
8
  from .pool import MutexPool as MutexPool, POOL_SIZE as POOL_SIZE, RecorderPool as RecorderPool
9
- from .queries import find_shared_attributes_id as find_shared_attributes_id, find_shared_data_id as find_shared_data_id, get_shared_attributes as get_shared_attributes, get_shared_event_datas as get_shared_event_datas
10
- from .run_history import RunHistory as RunHistory
11
- from .tasks import AdjustLRUSizeTask as AdjustLRUSizeTask, AdjustStatisticsTask as AdjustStatisticsTask, ChangeStatisticsUnitTask as ChangeStatisticsUnitTask, ClearStatisticsTask as ClearStatisticsTask, CommitTask as CommitTask, DatabaseLockTask as DatabaseLockTask, EventTask as EventTask, ImportStatisticsTask as ImportStatisticsTask, KeepAliveTask as KeepAliveTask, PerodicCleanupTask as PerodicCleanupTask, PurgeTask as PurgeTask, RecorderTask as RecorderTask, StatisticsTask as StatisticsTask, StopTask as StopTask, SynchronizeTask as SynchronizeTask, UpdateStatisticsMetadataTask as UpdateStatisticsMetadataTask, WaitTask as WaitTask
12
- from .util import build_mysqldb_conv as build_mysqldb_conv, chunked as chunked, dburl_to_path as dburl_to_path, end_incomplete_runs as end_incomplete_runs, is_second_sunday as is_second_sunday, move_away_broken_database as move_away_broken_database, session_scope as session_scope, setup_connection_for_dialect as setup_connection_for_dialect, validate_or_move_away_sqlite_database as validate_or_move_away_sqlite_database, write_lock_db_sqlite as write_lock_db_sqlite
9
+ from .queries import 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
10
+ from .table_managers.event_data import EventDataManager as EventDataManager
11
+ from .table_managers.event_types import EventTypeManager as EventTypeManager
12
+ from .table_managers.recorder_runs import RecorderRunsManager as RecorderRunsManager
13
+ from .table_managers.state_attributes import StateAttributesManager as StateAttributesManager
14
+ from .table_managers.states import StatesManager as StatesManager
15
+ from .table_managers.states_meta import StatesMetaManager as StatesMetaManager
16
+ from .table_managers.statistics_meta import StatisticsMetaManager as StatisticsMetaManager
17
+ from .tasks import AdjustLRUSizeTask as AdjustLRUSizeTask, AdjustStatisticsTask as AdjustStatisticsTask, ChangeStatisticsUnitTask as ChangeStatisticsUnitTask, ClearStatisticsTask as ClearStatisticsTask, CommitTask as CommitTask, CompileMissingStatisticsTask as CompileMissingStatisticsTask, DatabaseLockTask as DatabaseLockTask, EntityIDMigrationTask as EntityIDMigrationTask, EventIdMigrationTask as EventIdMigrationTask, EventTask as EventTask, EventTypeIDMigrationTask as EventTypeIDMigrationTask, EventsContextIDMigrationTask as EventsContextIDMigrationTask, ImportStatisticsTask as ImportStatisticsTask, KeepAliveTask as KeepAliveTask, PerodicCleanupTask as PerodicCleanupTask, PurgeTask as PurgeTask, RecorderTask as RecorderTask, StatesContextIDMigrationTask as StatesContextIDMigrationTask, StatisticsTask as StatisticsTask, StopTask as StopTask, SynchronizeTask as SynchronizeTask, UpdateStatesMetadataTask as UpdateStatesMetadataTask, UpdateStatisticsMetadataTask as UpdateStatisticsMetadataTask, WaitTask as WaitTask
18
+ from .util import build_mysqldb_conv as build_mysqldb_conv, dburl_to_path as dburl_to_path, end_incomplete_runs as end_incomplete_runs, execute_stmt_lambda_element as execute_stmt_lambda_element, get_index_by_name as get_index_by_name, is_second_sunday as is_second_sunday, move_away_broken_database as move_away_broken_database, session_scope as session_scope, setup_connection_for_dialect as setup_connection_for_dialect, validate_or_move_away_sqlite_database as validate_or_move_away_sqlite_database, write_lock_db_sqlite as write_lock_db_sqlite
13
19
  from _typeshed import Incomplete
14
20
  from collections.abc import Callable as Callable, Iterable
15
21
  from datetime import datetime
16
22
  from homeassistant.components import persistent_notification as persistent_notification
17
23
  from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_FINAL_WRITE as EVENT_HOMEASSISTANT_FINAL_WRITE, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED as EVENT_STATE_CHANGED, MATCH_ALL as MATCH_ALL
18
24
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
19
- from homeassistant.helpers.entity import entity_sources as entity_sources
20
25
  from homeassistant.helpers.event import async_track_time_change as async_track_time_change, async_track_time_interval as async_track_time_interval, async_track_utc_time_change as async_track_utc_time_change
21
26
  from homeassistant.helpers.start import async_at_started as async_at_started
22
27
  from homeassistant.helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
23
28
  from homeassistant.util.enum import try_parse_enum as try_parse_enum
24
- from homeassistant.util.json import JSON_ENCODE_EXCEPTIONS as JSON_ENCODE_EXCEPTIONS
25
29
  from sqlalchemy.engine import Engine as Engine
26
30
  from sqlalchemy.orm.session import Session as Session
27
31
  from typing import Any, TypeVar
@@ -30,8 +34,6 @@ _LOGGER: Incomplete
30
34
  T = TypeVar('T')
31
35
  DEFAULT_URL: str
32
36
  EXPIRE_AFTER_COMMITS: int
33
- STATE_ATTRIBUTES_ID_CACHE_SIZE: int
34
- EVENT_DATA_ID_CACHE_SIZE: int
35
37
  SHUTDOWN_TASK: Incomplete
36
38
  COMMIT_TASK: Incomplete
37
39
  KEEP_ALIVE_TASK: Incomplete
@@ -46,6 +48,7 @@ MAX_DB_EXECUTOR_WORKERS: Incomplete
46
48
  class Recorder(threading.Thread):
47
49
  stop_requested: bool
48
50
  hass: Incomplete
51
+ thread_id: Incomplete
49
52
  auto_purge: Incomplete
50
53
  auto_repack: Incomplete
51
54
  keep_days: Incomplete
@@ -61,27 +64,26 @@ class Recorder(threading.Thread):
61
64
  async_recorder_ready: Incomplete
62
65
  _queue_watch: Incomplete
63
66
  engine: Incomplete
64
- run_history: Incomplete
65
- _entity_sources: Incomplete
66
67
  entity_filter: Incomplete
67
- exclude_t: Incomplete
68
+ exclude_event_types: Incomplete
68
69
  schema_version: int
69
70
  _commits_without_expire: int
70
- _old_states: Incomplete
71
- _state_attributes_ids: Incomplete
72
- _event_data_ids: Incomplete
73
- _pending_state_attributes: Incomplete
74
- _pending_event_data: Incomplete
75
- _pending_expunge: Incomplete
71
+ recorder_runs_manager: Incomplete
72
+ states_manager: Incomplete
73
+ event_data_manager: Incomplete
74
+ event_type_manager: Incomplete
75
+ states_meta_manager: Incomplete
76
+ state_attributes_manager: Incomplete
77
+ statistics_meta_manager: Incomplete
76
78
  event_session: Incomplete
77
79
  _get_session: Incomplete
78
80
  _completed_first_database_setup: Incomplete
79
81
  async_migration_event: Incomplete
80
82
  migration_in_progress: bool
81
83
  migration_is_live: bool
84
+ use_legacy_events_index: bool
82
85
  _database_lock_task: Incomplete
83
86
  _db_executor: Incomplete
84
- _exclude_attributes_by_domain: Incomplete
85
87
  _event_listener: Incomplete
86
88
  _queue_watcher: Incomplete
87
89
  _keep_alive_listener: Incomplete
@@ -90,7 +92,7 @@ class Recorder(threading.Thread):
90
92
  _nightly_listener: Incomplete
91
93
  _dialect_name: Incomplete
92
94
  enabled: bool
93
- def __init__(self, hass: HomeAssistant, auto_purge: bool, auto_repack: bool, keep_days: int, commit_interval: int, uri: str, db_max_retries: int, db_retry_wait: int, entity_filter: Callable[[str], bool], exclude_t: list[str], exclude_attributes_by_domain: dict[str, set[str]]) -> None: ...
95
+ def __init__(self, hass: HomeAssistant, auto_purge: bool, auto_repack: bool, keep_days: int, commit_interval: int, uri: str, db_max_retries: int, db_retry_wait: int, entity_filter: Callable[[str], bool], exclude_event_types: set[str], exclude_attributes_by_domain: dict[str, set[str]]) -> None: ...
94
96
  @property
95
97
  def backlog(self) -> int: ...
96
98
  @property
@@ -128,16 +130,16 @@ class Recorder(threading.Thread):
128
130
  def async_adjust_statistics(self, statistic_id: str, start_time: datetime, sum_adjustment: float, adjustment_unit: str) -> None: ...
129
131
  def async_clear_statistics(self, statistic_ids: list[str]) -> None: ...
130
132
  def async_update_statistics_metadata(self, statistic_id: str, *, new_statistic_id: Union[str, UndefinedType] = ..., new_unit_of_measurement: Union[str, None, UndefinedType] = ...) -> None: ...
133
+ def async_update_states_metadata(self, entity_id: str, new_entity_id: str) -> None: ...
131
134
  def async_change_statistics_unit(self, statistic_id: str, *, new_unit_of_measurement: str, old_unit_of_measurement: str) -> None: ...
132
135
  def async_import_statistics(self, metadata: StatisticMetaData, stats: Iterable[StatisticData], table: type[Union[Statistics, StatisticsShortTerm]]) -> None: ...
133
136
  def _async_setup_periodic_tasks(self) -> None: ...
134
137
  async def _async_wait_for_started(self) -> Union[object, None]: ...
135
138
  def _wait_startup_or_shutdown(self) -> Union[object, None]: ...
136
139
  def run(self) -> None: ...
140
+ def _activate_and_set_db_ready(self) -> None: ...
137
141
  def _run_event_loop(self) -> None: ...
138
142
  def _pre_process_startup_tasks(self, startup_tasks: list[RecorderTask]) -> None: ...
139
- def _pre_process_state_change_events(self, events: list[Event]) -> None: ...
140
- def _pre_process_non_state_change_events(self, events: list[Event]) -> None: ...
141
143
  def _guarded_process_one_task_or_recover(self, task: RecorderTask) -> None: ...
142
144
  def _process_one_task_or_recover(self, task: RecorderTask) -> None: ...
143
145
  def _setup_recorder(self) -> bool: ...
@@ -145,11 +147,7 @@ class Recorder(threading.Thread):
145
147
  def _migrate_schema_and_setup_run(self, schema_status: migration.SchemaValidationStatus) -> bool: ...
146
148
  def _lock_database(self, task: DatabaseLockTask) -> None: ...
147
149
  def _process_one_event(self, event: Event) -> None: ...
148
- def _find_shared_attr_in_db(self, attr_hash: int, shared_attrs: str) -> Union[int, None]: ...
149
- def _find_shared_data_in_db(self, data_hash: int, shared_data: str) -> Union[int, None]: ...
150
- def _serialize_event_data_from_event(self, event: Event) -> Union[bytes, None]: ...
151
150
  def _process_non_state_changed_event_into_session(self, event: Event) -> None: ...
152
- def _serialize_state_attributes_from_event(self, event: Event) -> Union[bytes, None]: ...
153
151
  def _process_state_changed_event_into_session(self, event: Event) -> None: ...
154
152
  def _handle_database_error(self, err: Exception) -> bool: ...
155
153
  def _event_session_has_pending_writes(self) -> bool: ...
@@ -160,6 +158,12 @@ class Recorder(threading.Thread):
160
158
  def _reopen_event_session(self) -> None: ...
161
159
  def _open_event_session(self) -> None: ...
162
160
  def _post_schema_migration(self, old_version: int, new_version: int) -> None: ...
161
+ def _migrate_states_context_ids(self) -> bool: ...
162
+ def _migrate_events_context_ids(self) -> bool: ...
163
+ def _migrate_event_type_ids(self) -> bool: ...
164
+ def _migrate_entity_ids(self) -> bool: ...
165
+ def _post_migrate_entity_ids(self) -> bool: ...
166
+ def _cleanup_legacy_states_event_ids(self) -> bool: ...
163
167
  def _send_keep_alive(self) -> None: ...
164
168
  def event_listener(self, event: Event) -> None: ...
165
169
  async def async_block_till_done(self) -> None: ...
@@ -169,6 +173,6 @@ class Recorder(threading.Thread):
169
173
  def _setup_connection(self) -> None: ...
170
174
  def _close_connection(self) -> None: ...
171
175
  def _setup_run(self) -> None: ...
172
- def _schedule_compile_missing_statistics(self, session: Session) -> None: ...
176
+ def _schedule_compile_missing_statistics(self) -> None: ...
173
177
  def _end_session(self) -> None: ...
174
178
  def _shutdown(self) -> None: ...
@@ -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, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp
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
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable
5
5
  from datetime import datetime, timedelta
@@ -11,7 +11,6 @@ from sqlalchemy import ColumnElement as ColumnElement, JSON
11
11
  from sqlalchemy.dialects import sqlite
12
12
  from sqlalchemy.engine.interfaces import Dialect as Dialect
13
13
  from sqlalchemy.orm import DeclarativeBase, Mapped as Mapped
14
- from sqlalchemy.orm.query import RowReturningQuery as RowReturningQuery
15
14
  from typing import Any
16
15
  from typing_extensions import Self
17
16
 
@@ -21,8 +20,10 @@ SCHEMA_VERSION: int
21
20
  _LOGGER: Incomplete
22
21
  TABLE_EVENTS: str
23
22
  TABLE_EVENT_DATA: str
23
+ TABLE_EVENT_TYPES: str
24
24
  TABLE_STATES: str
25
25
  TABLE_STATE_ATTRIBUTES: str
26
+ TABLE_STATES_META: str
26
27
  TABLE_RECORDER_RUNS: str
27
28
  TABLE_SCHEMA_CHANGES: str
28
29
  TABLE_STATISTICS: str
@@ -35,9 +36,14 @@ PSQL_DIALECT: Incomplete
35
36
  ALL_TABLES: Incomplete
36
37
  TABLES_TO_CHECK: Incomplete
37
38
  LAST_UPDATED_INDEX_TS: str
38
- ENTITY_ID_LAST_UPDATED_INDEX_TS: str
39
- EVENTS_CONTEXT_ID_INDEX: str
40
- STATES_CONTEXT_ID_INDEX: str
39
+ METADATA_ID_LAST_UPDATED_INDEX_TS: str
40
+ EVENTS_CONTEXT_ID_BIN_INDEX: str
41
+ STATES_CONTEXT_ID_BIN_INDEX: str
42
+ LEGACY_STATES_EVENT_ID_INDEX: str
43
+ CONTEXT_ID_BIN_MAX_LENGTH: int
44
+ MYSQL_COLLATE: str
45
+ MYSQL_DEFAULT_CHARSET: str
46
+ MYSQL_ENGINE: str
41
47
  _DEFAULT_TABLE_ARGS: Incomplete
42
48
 
43
49
  class FAST_PYSQLITE_DATETIME(sqlite.DATETIME):
@@ -47,6 +53,7 @@ JSON_VARIANT_CAST: Incomplete
47
53
  JSONB_VARIANT_CAST: Incomplete
48
54
  DATETIME_TYPE: Incomplete
49
55
  DOUBLE_TYPE: Incomplete
56
+ DOUBLE_PRECISION_TYPE_SQL: str
50
57
  TIMESTAMP_TYPE = DOUBLE_TYPE
51
58
 
52
59
  class JSONLiteral(JSON):
@@ -69,7 +76,12 @@ class Events(Base):
69
76
  context_user_id: Mapped[Union[str, None]]
70
77
  context_parent_id: Mapped[Union[str, None]]
71
78
  data_id: Mapped[Union[int, None]]
79
+ context_id_bin: Mapped[Union[bytes, None]]
80
+ context_user_id_bin: Mapped[Union[bytes, None]]
81
+ context_parent_id_bin: Mapped[Union[bytes, None]]
82
+ event_type_id: Mapped[Union[int, None]]
72
83
  event_data_rel: Mapped[Union[EventData, None]]
84
+ event_type_rel: Mapped[Union[EventTypes, None]]
73
85
  def __repr__(self) -> str: ...
74
86
  @property
75
87
  def _time_fired_isotime(self) -> Union[str, None]: ...
@@ -90,6 +102,13 @@ class EventData(Base):
90
102
  def hash_shared_data_bytes(shared_data_bytes: bytes) -> int: ...
91
103
  def to_native(self) -> dict[str, Any]: ...
92
104
 
105
+ class EventTypes(Base):
106
+ __table_args__: Incomplete
107
+ __tablename__: Incomplete
108
+ event_type_id: Mapped[int]
109
+ event_type: Mapped[Union[str, None]]
110
+ def __repr__(self) -> str: ...
111
+
93
112
  class States(Base):
94
113
  __table_args__: Incomplete
95
114
  __tablename__: Incomplete
@@ -110,6 +129,11 @@ class States(Base):
110
129
  origin_idx: Mapped[Union[int, None]]
111
130
  old_state: Mapped[Union[States, None]]
112
131
  state_attributes: Mapped[Union[StateAttributes, None]]
132
+ context_id_bin: Mapped[Union[bytes, None]]
133
+ context_user_id_bin: Mapped[Union[bytes, None]]
134
+ context_parent_id_bin: Mapped[Union[bytes, None]]
135
+ metadata_id: Mapped[Union[int, None]]
136
+ states_meta_rel: Mapped[Union[StatesMeta, None]]
113
137
  def __repr__(self) -> str: ...
114
138
  @property
115
139
  def _last_updated_isotime(self) -> Union[str, None]: ...
@@ -130,6 +154,13 @@ class StateAttributes(Base):
130
154
  def hash_shared_attrs_bytes(shared_attrs_bytes: bytes) -> int: ...
131
155
  def to_native(self) -> dict[str, Any]: ...
132
156
 
157
+ class StatesMeta(Base):
158
+ __table_args__: Incomplete
159
+ __tablename__: Incomplete
160
+ metadata_id: Mapped[int]
161
+ entity_id: Mapped[Union[str, None]]
162
+ def __repr__(self) -> str: ...
163
+
133
164
  class StatisticsBase:
134
165
  id: Mapped[int]
135
166
  created: Mapped[Union[datetime, None]]
@@ -182,7 +213,6 @@ class RecorderRuns(Base):
182
213
  closed_incorrect: Mapped[bool]
183
214
  created: Mapped[datetime]
184
215
  def __repr__(self) -> str: ...
185
- def entity_ids(self, point_in_time: Union[datetime, None] = ...) -> list[str]: ...
186
216
  def to_native(self, validate_entity_id: bool = ...) -> Self: ...
187
217
 
188
218
  class SchemaChanges(Base):
@@ -0,0 +1,10 @@
1
+ from .core import Recorder as Recorder
2
+ from .util import get_instance as get_instance, session_scope as session_scope
3
+ from _typeshed import Incomplete
4
+ from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
5
+ from homeassistant.helpers.start import async_at_start as async_at_start
6
+
7
+ _LOGGER: Incomplete
8
+
9
+ def async_setup(hass: HomeAssistant) -> None: ...
10
+ def update_states_metadata(instance: Recorder, entity_id: str, new_entity_id: str) -> None: ...
@@ -1,8 +1,9 @@
1
- from .db_schema import ENTITY_ID_IN_EVENT as ENTITY_ID_IN_EVENT, OLD_ENTITY_ID_IN_EVENT as OLD_ENTITY_ID_IN_EVENT, States as States
1
+ from .db_schema import ENTITY_ID_IN_EVENT as ENTITY_ID_IN_EVENT, OLD_ENTITY_ID_IN_EVENT as OLD_ENTITY_ID_IN_EVENT, States as States, StatesMeta as StatesMeta
2
2
  from _typeshed import Incomplete
3
- from collections.abc import Callable as Callable, Iterable
3
+ from collections.abc import Callable as Callable, Collection, Iterable
4
4
  from homeassistant.const import CONF_DOMAINS as CONF_DOMAINS, CONF_ENTITIES as CONF_ENTITIES, CONF_EXCLUDE as CONF_EXCLUDE, CONF_INCLUDE as CONF_INCLUDE
5
5
  from homeassistant.helpers.entityfilter import CONF_ENTITY_GLOBS as CONF_ENTITY_GLOBS
6
+ from homeassistant.helpers.json import json_dumps as json_dumps
6
7
  from homeassistant.helpers.typing import ConfigType as ConfigType
7
8
  from sqlalchemy import Column as Column
8
9
  from sqlalchemy.sql.elements import ColumnElement as ColumnElement
@@ -20,13 +21,13 @@ def merge_include_exclude_filters(base_filter: dict[str, Any], add_filter: dict[
20
21
  def sqlalchemy_filter_from_include_exclude_conf(conf: ConfigType) -> Union[Filters, None]: ...
21
22
 
22
23
  class Filters:
23
- excluded_entities: Incomplete
24
- excluded_domains: Incomplete
25
- excluded_entity_globs: Incomplete
26
- included_entities: Incomplete
27
- included_domains: Incomplete
28
- included_entity_globs: Incomplete
29
- def __init__(self) -> None: ...
24
+ _excluded_entities: Incomplete
25
+ _excluded_domains: Incomplete
26
+ _excluded_entity_globs: Incomplete
27
+ _included_entities: Incomplete
28
+ _included_domains: Incomplete
29
+ _included_entity_globs: Incomplete
30
+ def __init__(self, excluded_entities: Union[Collection[str], None] = ..., excluded_domains: Union[Collection[str], None] = ..., excluded_entity_globs: Union[Collection[str], None] = ..., included_entities: Union[Collection[str], None] = ..., included_domains: Union[Collection[str], None] = ..., included_entity_globs: Union[Collection[str], None] = ...) -> None: ...
30
31
  def __repr__(self) -> str: ...
31
32
  @property
32
33
  def has_config(self) -> bool: ...
@@ -34,8 +35,9 @@ class Filters:
34
35
  def _have_exclude(self) -> bool: ...
35
36
  @property
36
37
  def _have_include(self) -> bool: ...
37
- def _generate_filter_for_columns(self, columns: Iterable[Column], encoder: Callable[[Any], Any]) -> Union[ColumnElement, None]: ...
38
- def states_entity_filter(self) -> Union[ColumnElement, None]: ...
38
+ def _generate_filter_for_columns(self, columns: Iterable[Column], encoder: Callable[[Any], Any]) -> ColumnElement: ...
39
+ def states_entity_filter(self) -> ColumnElement: ...
40
+ def states_metadata_entity_filter(self) -> ColumnElement: ...
39
41
  def events_entity_filter(self) -> ColumnElement: ...
40
42
 
41
43
  def _globs_to_like(glob_strs: Iterable[str], columns: Iterable[Column], encoder: Callable[[Any], Any]) -> ColumnElement: ...
@@ -0,0 +1,13 @@
1
+ from ..filters import Filters
2
+ from .const import NEED_ATTRIBUTE_DOMAINS as NEED_ATTRIBUTE_DOMAINS, SIGNIFICANT_DOMAINS as SIGNIFICANT_DOMAINS
3
+ from collections.abc import MutableMapping
4
+ from datetime import datetime
5
+ from homeassistant.core import HomeAssistant, State
6
+ from sqlalchemy.orm.session import Session
7
+ from typing import Any
8
+
9
+ def get_full_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., no_attributes: bool = ...) -> MutableMapping[str, list[State]]: ...
10
+ def get_last_state_changes(hass: HomeAssistant, number_of_states: int, entity_id: str) -> MutableMapping[str, list[State]]: ...
11
+ def get_significant_states(hass: HomeAssistant, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., minimal_response: bool = ..., no_attributes: bool = ..., compressed_state_format: bool = ...) -> MutableMapping[str, list[Union[State, dict[str, Any]]]]: ...
12
+ def get_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., minimal_response: bool = ..., no_attributes: bool = ..., compressed_state_format: bool = ...) -> MutableMapping[str, list[Union[State, dict[str, Any]]]]: ...
13
+ def state_changes_during_period(hass: HomeAssistant, start_time: datetime, end_time: Union[datetime, None] = ..., entity_id: Union[str, None] = ..., no_attributes: bool = ..., descending: bool = ..., limit: Union[int, None] = ..., include_start_time_state: bool = ...) -> MutableMapping[str, list[State]]: ...
@@ -0,0 +1,4 @@
1
+ from ... import recorder as recorder
2
+ from homeassistant.core import HomeAssistant as HomeAssistant
3
+
4
+ def _schema_version(hass: HomeAssistant) -> int: ...
@@ -0,0 +1,9 @@
1
+ from _typeshed import Incomplete
2
+
3
+ STATE_KEY: str
4
+ LAST_CHANGED_KEY: str
5
+ SIGNIFICANT_DOMAINS: Incomplete
6
+ SIGNIFICANT_DOMAINS_ENTITY_ID_LIKE: Incomplete
7
+ IGNORE_DOMAINS: Incomplete
8
+ IGNORE_DOMAINS_ENTITY_ID_LIKE: Incomplete
9
+ NEED_ATTRIBUTE_DOMAINS: Incomplete