homeassistant-stubs 2025.3.4__py3-none-any.whl → 2025.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 (322) hide show
  1. homeassistant-stubs/bootstrap.pyi +3 -2
  2. homeassistant-stubs/components/accuweather/const.pyi +3 -1
  3. homeassistant-stubs/components/accuweather/sensor.pyi +1 -1
  4. homeassistant-stubs/components/anova/config_flow.pyi +4 -1
  5. homeassistant-stubs/components/anthemav/media_player.pyi +2 -0
  6. homeassistant-stubs/components/arwn/sensor.pyi +3 -2
  7. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +14 -5
  8. homeassistant-stubs/components/assist_satellite/entity.pyi +5 -3
  9. homeassistant-stubs/components/azure_storage/__init__.pyi +1 -1
  10. homeassistant-stubs/components/azure_storage/backup.pyi +1 -1
  11. homeassistant-stubs/components/azure_storage/config_flow.pyi +7 -0
  12. homeassistant-stubs/components/backup/__init__.pyi +2 -2
  13. homeassistant-stubs/components/backup/agent.pyi +1 -1
  14. homeassistant-stubs/components/backup/backup.pyi +1 -1
  15. homeassistant-stubs/components/backup/config_flow.pyi +7 -0
  16. homeassistant-stubs/components/backup/coordinator.pyi +28 -0
  17. homeassistant-stubs/components/backup/diagnostics.pyi +7 -0
  18. homeassistant-stubs/components/backup/entity.pyi +13 -0
  19. homeassistant-stubs/components/backup/http.pyi +1 -0
  20. homeassistant-stubs/components/backup/manager.pyi +8 -3
  21. homeassistant-stubs/components/backup/sensor.pyi +23 -0
  22. homeassistant-stubs/components/bosch_alarm/__init__.pyi +12 -0
  23. homeassistant-stubs/components/bosch_alarm/alarm_control_panel.pyi +31 -0
  24. homeassistant-stubs/components/bosch_alarm/config_flow.pyi +20 -0
  25. homeassistant-stubs/components/bosch_alarm/const.pyi +4 -0
  26. homeassistant-stubs/components/bring/diagnostics.pyi +5 -0
  27. homeassistant-stubs/components/brother/__init__.pyi +1 -0
  28. homeassistant-stubs/components/brother/coordinator.pyi +1 -0
  29. homeassistant-stubs/components/cloud/backup.pyi +3 -3
  30. homeassistant-stubs/components/cloud/http_api.pyi +6 -3
  31. homeassistant-stubs/components/cloud/tts.pyi +2 -2
  32. homeassistant-stubs/components/comelit/__init__.pyi +11 -0
  33. homeassistant-stubs/components/comelit/alarm_control_panel.pyi +44 -0
  34. homeassistant-stubs/components/comelit/binary_sensor.pyi +22 -0
  35. homeassistant-stubs/components/comelit/climate.pyi +60 -0
  36. homeassistant-stubs/components/comelit/config_flow.pyi +28 -0
  37. homeassistant-stubs/components/comelit/const.pyi +7 -0
  38. homeassistant-stubs/components/comelit/coordinator.pyi +38 -0
  39. homeassistant-stubs/components/comelit/cover.pyi +40 -0
  40. homeassistant-stubs/components/comelit/diagnostics.pyi +10 -0
  41. homeassistant-stubs/components/comelit/humidifier.pyi +61 -0
  42. homeassistant-stubs/components/comelit/light.pyi +28 -0
  43. homeassistant-stubs/components/comelit/sensor.pyi +45 -0
  44. homeassistant-stubs/components/comelit/switch.pyi +27 -0
  45. homeassistant-stubs/components/cover/reproduce_state.pyi +17 -6
  46. homeassistant-stubs/components/demo/valve.pyi +30 -0
  47. homeassistant-stubs/components/discovergy/__init__.pyi +1 -1
  48. homeassistant-stubs/components/energy/data.pyi +1 -0
  49. homeassistant-stubs/components/enigma2/config_flow.pyi +1 -0
  50. homeassistant-stubs/components/esphome/__init__.pyi +1 -1
  51. homeassistant-stubs/components/esphome/assist_satellite.pyi +2 -0
  52. homeassistant-stubs/components/esphome/const.pyi +1 -0
  53. homeassistant-stubs/components/esphome/diagnostics.pyi +0 -1
  54. homeassistant-stubs/components/esphome/manager.pyi +1 -1
  55. homeassistant-stubs/components/frontend/__init__.pyi +9 -10
  56. homeassistant-stubs/components/frontend/storage.pyi +2 -1
  57. homeassistant-stubs/components/gios/__init__.pyi +1 -0
  58. homeassistant-stubs/components/gios/config_flow.pyi +1 -0
  59. homeassistant-stubs/components/gios/coordinator.pyi +2 -2
  60. homeassistant-stubs/components/google/calendar.pyi +3 -2
  61. homeassistant-stubs/components/google_drive/backup.pyi +2 -2
  62. homeassistant-stubs/components/habitica/const.pyi +25 -0
  63. homeassistant-stubs/components/habitica/services.pyi +6 -2
  64. homeassistant-stubs/components/heos/const.pyi +1 -0
  65. homeassistant-stubs/components/heos/coordinator.pyi +5 -5
  66. homeassistant-stubs/components/heos/media_player.pyi +18 -8
  67. homeassistant-stubs/components/home_connect/__init__.pyi +6 -17
  68. homeassistant-stubs/components/home_connect/button.pyi +0 -2
  69. homeassistant-stubs/components/home_connect/const.pyi +0 -6
  70. homeassistant-stubs/components/home_connect/entity.pyi +1 -1
  71. homeassistant-stubs/components/home_connect/light.pyi +1 -1
  72. homeassistant-stubs/components/home_connect/number.pyi +1 -1
  73. homeassistant-stubs/components/home_connect/select.pyi +1 -1
  74. homeassistant-stubs/components/home_connect/services.pyi +35 -0
  75. homeassistant-stubs/components/home_connect/switch.pyi +1 -1
  76. homeassistant-stubs/components/home_connect/time.pyi +6 -1
  77. homeassistant-stubs/components/homeassistant_hardware/coordinator.pyi +15 -0
  78. homeassistant-stubs/components/homeassistant_hardware/update.pyi +69 -0
  79. homeassistant-stubs/components/homeassistant_hardware/util.pyi +6 -1
  80. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +1 -0
  81. homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +1 -1
  82. homeassistant-stubs/components/homeassistant_sky_connect/const.pyi +10 -0
  83. homeassistant-stubs/components/homeassistant_sky_connect/update.pyi +26 -0
  84. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +1 -1
  85. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +1 -1
  86. homeassistant-stubs/components/homeassistant_yellow/const.pyi +4 -0
  87. homeassistant-stubs/components/homeassistant_yellow/update.pyi +26 -0
  88. homeassistant-stubs/components/homee/binary_sensor.pyi +21 -0
  89. homeassistant-stubs/components/homee/button.pyi +1 -0
  90. homeassistant-stubs/components/homee/cover.pyi +1 -0
  91. homeassistant-stubs/components/homee/light.pyi +1 -0
  92. homeassistant-stubs/components/homee/lock.pyi +25 -0
  93. homeassistant-stubs/components/homee/number.pyi +1 -0
  94. homeassistant-stubs/components/homee/select.pyi +23 -0
  95. homeassistant-stubs/components/homee/sensor.pyi +2 -0
  96. homeassistant-stubs/components/homee/switch.pyi +2 -0
  97. homeassistant-stubs/components/homee/valve.pyi +1 -0
  98. homeassistant-stubs/components/homekit/__init__.pyi +3 -1
  99. homeassistant-stubs/components/homekit/accessories.pyi +1 -0
  100. homeassistant-stubs/components/homekit/type_switches.pyi +6 -0
  101. homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +7 -7
  102. homeassistant-stubs/components/incomfort/config_flow.pyi +1 -0
  103. homeassistant-stubs/components/iron_os/coordinator.pyi +2 -0
  104. homeassistant-stubs/components/iron_os/number.pyi +2 -0
  105. homeassistant-stubs/components/iron_os/select.pyi +3 -0
  106. homeassistant-stubs/components/jewish_calendar/__init__.pyi +9 -2
  107. homeassistant-stubs/components/jewish_calendar/binary_sensor.pyi +4 -4
  108. homeassistant-stubs/components/jewish_calendar/const.pyi +3 -0
  109. homeassistant-stubs/components/jewish_calendar/entity.pyi +2 -2
  110. homeassistant-stubs/components/jewish_calendar/sensor.pyi +5 -6
  111. homeassistant-stubs/components/jewish_calendar/service.pyi +10 -0
  112. homeassistant-stubs/components/lawn_mower/__init__.pyi +1 -0
  113. homeassistant-stubs/components/linkplay/entity.pyi +0 -1
  114. homeassistant-stubs/components/linkplay/media_player.pyi +3 -2
  115. homeassistant-stubs/components/linkplay/utils.pyi +0 -32
  116. homeassistant-stubs/components/mastodon/__init__.pyi +2 -2
  117. homeassistant-stubs/components/mastodon/config_flow.pyi +2 -1
  118. homeassistant-stubs/components/mastodon/const.pyi +0 -7
  119. homeassistant-stubs/components/mastodon/coordinator.pyi +5 -5
  120. homeassistant-stubs/components/mastodon/diagnostics.pyi +2 -1
  121. homeassistant-stubs/components/mastodon/entity.pyi +1 -1
  122. homeassistant-stubs/components/mastodon/notify.pyi +3 -2
  123. homeassistant-stubs/components/mastodon/sensor.pyi +2 -3
  124. homeassistant-stubs/components/mastodon/services.pyi +1 -0
  125. homeassistant-stubs/components/mastodon/utils.pyi +3 -2
  126. homeassistant-stubs/components/mcp/coordinator.pyi +2 -9
  127. homeassistant-stubs/components/mcp_server/config_flow.pyi +1 -1
  128. homeassistant-stubs/components/mcp_server/const.pyi +1 -2
  129. homeassistant-stubs/components/mcp_server/server.pyi +1 -0
  130. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  131. homeassistant-stubs/components/modbus/climate.pyi +6 -2
  132. homeassistant-stubs/components/modbus/const.pyi +10 -0
  133. homeassistant-stubs/components/mqtt/config_flow.pyi +95 -7
  134. homeassistant-stubs/components/mqtt/const.pyi +65 -0
  135. homeassistant-stubs/components/mqtt/cover.pyi +2 -0
  136. homeassistant-stubs/components/mqtt/entity.pyi +4 -4
  137. homeassistant-stubs/components/mqtt/lawn_mower.pyi +1 -2
  138. homeassistant-stubs/components/mqtt/light/schema_basic.pyi +2 -48
  139. homeassistant-stubs/components/mqtt/light/schema_json.pyi +1 -14
  140. homeassistant-stubs/components/mqtt/light/schema_template.pyi +1 -12
  141. homeassistant-stubs/components/mqtt/models.pyi +25 -1
  142. homeassistant-stubs/components/mqtt/sensor.pyi +6 -5
  143. homeassistant-stubs/components/mqtt/util.pyi +2 -0
  144. homeassistant-stubs/components/mysensors/__init__.pyi +1 -1
  145. homeassistant-stubs/components/mysensors/binary_sensor.pyi +0 -1
  146. homeassistant-stubs/components/mysensors/climate.pyi +0 -1
  147. homeassistant-stubs/components/mysensors/const.pyi +0 -1
  148. homeassistant-stubs/components/mysensors/cover.pyi +1 -2
  149. homeassistant-stubs/components/mysensors/device_tracker.pyi +0 -1
  150. homeassistant-stubs/components/mysensors/gateway.pyi +1 -1
  151. homeassistant-stubs/components/mysensors/helpers.pyi +1 -3
  152. homeassistant-stubs/components/mysensors/light.pyi +4 -5
  153. homeassistant-stubs/components/mysensors/remote.pyi +0 -1
  154. homeassistant-stubs/components/mysensors/sensor.pyi +0 -1
  155. homeassistant-stubs/components/mysensors/switch.pyi +1 -2
  156. homeassistant-stubs/components/mysensors/text.pyi +0 -1
  157. homeassistant-stubs/components/nam/button.pyi +2 -0
  158. homeassistant-stubs/components/nam/const.pyi +1 -0
  159. homeassistant-stubs/components/nam/sensor.pyi +2 -2
  160. homeassistant-stubs/components/nest/media_source.pyi +5 -0
  161. homeassistant-stubs/components/nextdns/__init__.pyi +1 -1
  162. homeassistant-stubs/components/nextdns/button.pyi +2 -0
  163. homeassistant-stubs/components/nextdns/config_flow.pyi +1 -0
  164. homeassistant-stubs/components/nextdns/switch.pyi +1 -0
  165. homeassistant-stubs/components/nut/__init__.pyi +1 -0
  166. homeassistant-stubs/components/nut/button.pyi +14 -0
  167. homeassistant-stubs/components/nut/entity.pyi +19 -0
  168. homeassistant-stubs/components/nut/sensor.pyi +8 -13
  169. homeassistant-stubs/components/nut/switch.pyi +18 -0
  170. homeassistant-stubs/components/onboarding/views.pyi +1 -0
  171. homeassistant-stubs/components/onedrive/__init__.pyi +4 -0
  172. homeassistant-stubs/components/onedrive/backup.pyi +1 -1
  173. homeassistant-stubs/components/onedrive/services.pyi +15 -0
  174. homeassistant-stubs/components/openai_conversation/__init__.pyi +5 -1
  175. homeassistant-stubs/components/openai_conversation/config_flow.pyi +5 -2
  176. homeassistant-stubs/components/openai_conversation/const.pyi +22 -11
  177. homeassistant-stubs/components/openai_conversation/conversation.pyi +6 -7
  178. homeassistant-stubs/components/overkiz/water_heater/__init__.pyi +1 -0
  179. homeassistant-stubs/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.pyi +41 -0
  180. homeassistant-stubs/components/purpleair/__init__.pyi +5 -10
  181. homeassistant-stubs/components/purpleair/const.pyi +6 -4
  182. homeassistant-stubs/components/purpleair/coordinator.pyi +3 -2
  183. homeassistant-stubs/components/purpleair/diagnostics.pyi +2 -4
  184. homeassistant-stubs/components/purpleair/entity.pyi +2 -3
  185. homeassistant-stubs/components/purpleair/sensor.pyi +4 -5
  186. homeassistant-stubs/components/pyload/__init__.pyi +12 -0
  187. homeassistant-stubs/components/pyload/button.pyi +32 -0
  188. homeassistant-stubs/components/pyload/config_flow.pyi +23 -0
  189. homeassistant-stubs/components/pyload/const.pyi +6 -0
  190. homeassistant-stubs/components/pyload/coordinator.pyi +33 -0
  191. homeassistant-stubs/components/pyload/diagnostics.pyi +10 -0
  192. homeassistant-stubs/components/pyload/entity.pyi +13 -0
  193. homeassistant-stubs/components/pyload/sensor.pyi +33 -0
  194. homeassistant-stubs/components/pyload/switch.pyi +37 -0
  195. homeassistant-stubs/components/qbus/climate.pyi +41 -0
  196. homeassistant-stubs/components/qbus/light.pyi +3 -3
  197. homeassistant-stubs/components/recorder/const.pyi +1 -0
  198. homeassistant-stubs/components/recorder/core.pyi +1 -2
  199. homeassistant-stubs/components/recorder/db_schema.pyi +3 -1
  200. homeassistant-stubs/components/recorder/migration.pyi +16 -2
  201. homeassistant-stubs/components/recorder/models/__init__.pyi +2 -2
  202. homeassistant-stubs/components/recorder/models/statistics.pyi +10 -2
  203. homeassistant-stubs/components/recorder/statistics.pyi +27 -9
  204. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +5 -3
  205. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  206. homeassistant-stubs/components/remote_calendar/__init__.pyi +11 -0
  207. homeassistant-stubs/components/remote_calendar/calendar.pyi +26 -0
  208. homeassistant-stubs/components/remote_calendar/config_flow.pyi +13 -0
  209. homeassistant-stubs/components/remote_calendar/const.pyi +2 -0
  210. homeassistant-stubs/components/remote_calendar/coordinator.pyi +20 -0
  211. homeassistant-stubs/components/remote_calendar/diagnostics.pyi +5 -0
  212. homeassistant-stubs/components/renault/config_flow.pyi +1 -0
  213. homeassistant-stubs/components/reolink/__init__.pyi +1 -1
  214. homeassistant-stubs/components/reolink/binary_sensor.pyi +17 -1
  215. homeassistant-stubs/components/reolink/config_flow.pyi +1 -1
  216. homeassistant-stubs/components/reolink/const.pyi +1 -0
  217. homeassistant-stubs/components/reolink/host.pyi +4 -4
  218. homeassistant-stubs/components/reolink/number.pyi +21 -1
  219. homeassistant-stubs/components/reolink/select.pyi +17 -1
  220. homeassistant-stubs/components/reolink/update.pyi +2 -1
  221. homeassistant-stubs/components/reolink/util.pyi +7 -0
  222. homeassistant-stubs/components/roborock/__init__.pyi +5 -3
  223. homeassistant-stubs/components/roborock/binary_sensor.pyi +4 -1
  224. homeassistant-stubs/components/roborock/button.pyi +11 -1
  225. homeassistant-stubs/components/roborock/config_flow.pyi +7 -3
  226. homeassistant-stubs/components/roborock/const.pyi +7 -1
  227. homeassistant-stubs/components/roborock/coordinator.pyi +18 -3
  228. homeassistant-stubs/components/roborock/entity.pyi +3 -1
  229. homeassistant-stubs/components/roborock/image.pyi +2 -7
  230. homeassistant-stubs/components/roborock/models.pyi +7 -0
  231. homeassistant-stubs/components/roborock/number.pyi +1 -0
  232. homeassistant-stubs/components/roborock/select.pyi +7 -5
  233. homeassistant-stubs/components/roborock/sensor.pyi +14 -1
  234. homeassistant-stubs/components/roborock/switch.pyi +2 -0
  235. homeassistant-stubs/components/roborock/time.pyi +1 -0
  236. homeassistant-stubs/components/roborock/vacuum.pyi +1 -1
  237. homeassistant-stubs/components/sensor/const.pyi +2 -0
  238. homeassistant-stubs/components/sensor/recorder.pyi +15 -3
  239. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  240. homeassistant-stubs/components/shelly/bluetooth/__init__.pyi +4 -2
  241. homeassistant-stubs/components/shelly/button.pyi +22 -7
  242. homeassistant-stubs/components/shelly/climate.pyi +1 -1
  243. homeassistant-stubs/components/shelly/config_flow.pyi +5 -5
  244. homeassistant-stubs/components/shelly/const.pyi +0 -1
  245. homeassistant-stubs/components/shelly/coordinator.pyi +5 -1
  246. homeassistant-stubs/components/shelly/diagnostics.pyi +1 -2
  247. homeassistant-stubs/components/shelly/entity.pyi +1 -3
  248. homeassistant-stubs/components/shelly/event.pyi +1 -1
  249. homeassistant-stubs/components/shelly/number.pyi +1 -1
  250. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  251. homeassistant-stubs/components/shelly/switch.pyi +14 -14
  252. homeassistant-stubs/components/shelly/update.pyi +1 -1
  253. homeassistant-stubs/components/shelly/utils.pyi +6 -2
  254. homeassistant-stubs/components/skybell/config_flow.pyi +3 -0
  255. homeassistant-stubs/components/smlight/__init__.pyi +0 -2
  256. homeassistant-stubs/components/smlight/sensor.pyi +5 -2
  257. homeassistant-stubs/components/smlight/update.pyi +0 -1
  258. homeassistant-stubs/components/squeezebox/browse_media.pyi +6 -11
  259. homeassistant-stubs/components/squeezebox/button.pyi +31 -0
  260. homeassistant-stubs/components/squeezebox/entity.pyi +8 -2
  261. homeassistant-stubs/components/squeezebox/media_player.pyi +3 -5
  262. homeassistant-stubs/components/synology_dsm/__init__.pyi +5 -7
  263. homeassistant-stubs/components/synology_dsm/backup.pyi +3 -4
  264. homeassistant-stubs/components/synology_dsm/binary_sensor.pyi +2 -5
  265. homeassistant-stubs/components/synology_dsm/button.pyi +2 -3
  266. homeassistant-stubs/components/synology_dsm/camera.pyi +2 -4
  267. homeassistant-stubs/components/synology_dsm/config_flow.pyi +3 -2
  268. homeassistant-stubs/components/synology_dsm/coordinator.pyi +15 -5
  269. homeassistant-stubs/components/synology_dsm/diagnostics.pyi +3 -4
  270. homeassistant-stubs/components/synology_dsm/media_source.pyi +3 -1
  271. homeassistant-stubs/components/synology_dsm/repairs.pyi +2 -3
  272. homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -5
  273. homeassistant-stubs/components/synology_dsm/service.pyi +1 -1
  274. homeassistant-stubs/components/synology_dsm/switch.pyi +2 -4
  275. homeassistant-stubs/components/synology_dsm/update.pyi +2 -5
  276. homeassistant-stubs/components/tibber/coordinator.pyi +1 -1
  277. homeassistant-stubs/components/todo/intent.pyi +8 -0
  278. homeassistant-stubs/components/trafikverket_ferry/config_flow.pyi +1 -0
  279. homeassistant-stubs/components/trafikverket_weatherstation/config_flow.pyi +3 -0
  280. homeassistant-stubs/components/tts/__init__.pyi +66 -51
  281. homeassistant-stubs/components/tts/entity.pyi +54 -0
  282. homeassistant-stubs/components/tts/media_source.pyi +1 -1
  283. homeassistant-stubs/components/update/__init__.pyi +2 -2
  284. homeassistant-stubs/components/usb/__init__.pyi +0 -3
  285. homeassistant-stubs/components/vodafone_station/__init__.pyi +11 -0
  286. homeassistant-stubs/components/vodafone_station/button.pyi +31 -0
  287. homeassistant-stubs/components/vodafone_station/config_flow.pyi +29 -0
  288. homeassistant-stubs/components/vodafone_station/const.pyi +9 -0
  289. homeassistant-stubs/components/vodafone_station/coordinator.pyi +43 -0
  290. homeassistant-stubs/components/vodafone_station/device_tracker.pyi +30 -0
  291. homeassistant-stubs/components/vodafone_station/diagnostics.pyi +10 -0
  292. homeassistant-stubs/components/vodafone_station/helpers.pyi +8 -0
  293. homeassistant-stubs/components/vodafone_station/sensor.pyi +38 -0
  294. homeassistant-stubs/components/zwave_js/__init__.pyi +5 -9
  295. homeassistant-stubs/components/zwave_js/api.pyi +15 -0
  296. homeassistant-stubs/components/zwave_js/config_flow.pyi +0 -1
  297. homeassistant-stubs/config_entries.pyi +2 -5
  298. homeassistant-stubs/helpers/backup.pyi +4 -1
  299. homeassistant-stubs/helpers/config_entry_oauth2_flow.pyi +14 -0
  300. homeassistant-stubs/helpers/config_validation.pyi +5 -2
  301. homeassistant-stubs/helpers/frame.pyi +14 -5
  302. homeassistant-stubs/helpers/intent.pyi +13 -4
  303. homeassistant-stubs/helpers/llm.pyi +7 -1
  304. homeassistant-stubs/helpers/selector.pyi +1 -0
  305. homeassistant-stubs/helpers/template.pyi +14 -1
  306. homeassistant-stubs/loader.pyi +18 -8
  307. homeassistant-stubs/scripts/check_config.pyi +0 -1
  308. homeassistant-stubs/util/logging.pyi +16 -1
  309. homeassistant-stubs/util/unit_conversion.pyi +3 -0
  310. homeassistant-stubs/util/unit_system.pyi +12 -10
  311. homeassistant-stubs/util/yaml/__init__.pyi +3 -4
  312. homeassistant-stubs/util/yaml/dumper.pyi +2 -8
  313. homeassistant-stubs/util/yaml/input.pyi +2 -9
  314. homeassistant-stubs/util/yaml/loader.pyi +4 -72
  315. homeassistant-stubs/util/yaml/objects.pyi +2 -26
  316. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0b1.dist-info}/METADATA +2 -2
  317. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0b1.dist-info}/RECORD +319 -258
  318. homeassistant-stubs/components/mcp_server/llm_api.pyi +0 -15
  319. homeassistant-stubs/components/synology_dsm/models.pyi +0 -10
  320. homeassistant-stubs/util/yaml/const.pyi +0 -1
  321. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0b1.dist-info}/WHEEL +0 -0
  322. {homeassistant_stubs-2025.3.4.dist-info → homeassistant_stubs-2025.4.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- from .const import DOMAIN as DOMAIN
1
+ from .const import A01_UPDATE_INTERVAL as A01_UPDATE_INTERVAL, DEFAULT_DRAWABLES as DEFAULT_DRAWABLES, DOMAIN as DOMAIN, DRAWABLES as DRAWABLES, IMAGE_CACHE_INTERVAL as IMAGE_CACHE_INTERVAL, MAP_FILE_FORMAT as MAP_FILE_FORMAT, MAP_SCALE as MAP_SCALE, MAP_SLEEP as MAP_SLEEP, V1_CLOUD_IN_CLEANING_INTERVAL as V1_CLOUD_IN_CLEANING_INTERVAL, V1_CLOUD_NOT_CLEANING_INTERVAL as V1_CLOUD_NOT_CLEANING_INTERVAL, V1_LOCAL_IN_CLEANING_INTERVAL as V1_LOCAL_IN_CLEANING_INTERVAL, V1_LOCAL_NOT_CLEANING_INTERVAL as V1_LOCAL_NOT_CLEANING_INTERVAL
2
2
  from .models import RoborockA01HassDeviceInfo as RoborockA01HassDeviceInfo, RoborockHassDeviceInfo as RoborockHassDeviceInfo, RoborockMapInfo as RoborockMapInfo
3
3
  from .roborock_storage import RoborockMapStorage as RoborockMapStorage
4
4
  from _typeshed import Incomplete
@@ -6,18 +6,21 @@ from dataclasses import dataclass
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
7
  from homeassistant.const import ATTR_CONNECTIONS as ATTR_CONNECTIONS
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
9
10
  from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
10
11
  from homeassistant.helpers.typing import StateType as StateType
11
12
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
12
13
  from homeassistant.util import slugify as slugify
13
14
  from propcache.api import cached_property
14
15
  from roborock import HomeDataRoom as HomeDataRoom
15
- from roborock.containers import HomeDataDevice as HomeDataDevice, HomeDataProduct as HomeDataProduct, NetworkInfo as NetworkInfo
16
+ from roborock.containers import HomeDataDevice as HomeDataDevice, HomeDataProduct as HomeDataProduct, HomeDataScene as HomeDataScene, NetworkInfo as NetworkInfo, UserData as UserData
16
17
  from roborock.roborock_message import RoborockDyadDataProtocol, RoborockZeoProtocol
17
18
  from roborock.roborock_typing import DeviceProp
18
19
  from roborock.version_1_apis.roborock_local_client_v1 import RoborockLocalClientV1
19
20
  from roborock.version_1_apis.roborock_mqtt_client_v1 import RoborockMqttClientV1 as RoborockMqttClientV1
20
21
  from roborock.version_a01_apis import RoborockClientA01 as RoborockClientA01
22
+ from roborock.web_api import RoborockApiClient as RoborockApiClient
23
+ from vacuum_map_parser_base.map_data import MapData as MapData
21
24
 
22
25
  SCAN_INTERVAL: Incomplete
23
26
  _LOGGER: Incomplete
@@ -39,18 +42,30 @@ class RoborockDataUpdateCoordinator(DataUpdateCoordinator[DeviceProp]):
39
42
  maps: dict[int, RoborockMapInfo]
40
43
  _home_data_rooms: Incomplete
41
44
  map_storage: Incomplete
42
- def __init__(self, hass: HomeAssistant, config_entry: RoborockConfigEntry, device: HomeDataDevice, device_networking: NetworkInfo, product_info: HomeDataProduct, cloud_api: RoborockMqttClientV1, home_data_rooms: list[HomeDataRoom]) -> None: ...
45
+ _user_data: Incomplete
46
+ _api_client: Incomplete
47
+ _is_cloud_api: bool
48
+ map_parser: Incomplete
49
+ def __init__(self, hass: HomeAssistant, config_entry: RoborockConfigEntry, device: HomeDataDevice, device_networking: NetworkInfo, product_info: HomeDataProduct, cloud_api: RoborockMqttClientV1, home_data_rooms: list[HomeDataRoom], api_client: RoborockApiClient, user_data: UserData) -> None: ...
50
+ @cached_property
51
+ def dock_device_info(self) -> DeviceInfo: ...
52
+ def parse_map_data_v1(self, map_bytes: bytes) -> tuple[bytes | None, MapData | None]: ...
43
53
  async def _async_setup(self) -> None: ...
54
+ async def update_map(self) -> None: ...
55
+ update_interval: Incomplete
44
56
  async def _verify_api(self) -> None: ...
45
57
  async def async_shutdown(self) -> None: ...
46
58
  async def _update_device_prop(self) -> None: ...
47
59
  async def _async_update_data(self) -> DeviceProp: ...
48
60
  def _set_current_map(self) -> None: ...
49
61
  async def set_current_map_rooms(self) -> None: ...
62
+ async def get_routines(self) -> list[HomeDataScene]: ...
63
+ async def execute_routines(self, routine_id: int) -> None: ...
50
64
  @cached_property
51
65
  def duid(self) -> str: ...
52
66
  @cached_property
53
67
  def duid_slug(self) -> str: ...
68
+ async def refresh_coordinator_map(self) -> None: ...
54
69
 
55
70
  class RoborockDataUpdateCoordinatorA01(DataUpdateCoordinator[dict[RoborockDyadDataProtocol | RoborockZeoProtocol, StateType]]):
56
71
  config_entry: RoborockConfigEntry
@@ -26,6 +26,8 @@ class RoborockEntityV1(RoborockEntity):
26
26
  _api: RoborockClientV1
27
27
  def __init__(self, unique_id: str, device_info: DeviceInfo, api: RoborockClientV1) -> None: ...
28
28
  def get_cache(self, attribute: CacheableAttribute) -> AttributeCache: ...
29
+ @classmethod
30
+ async def _send_command(cls, command: RoborockCommand | str, api: RoborockClientV1, params: dict[str, Any] | list[Any] | int | None = None) -> dict: ...
29
31
  async def send(self, command: RoborockCommand | str, params: dict[str, Any] | list[Any] | int | None = None) -> dict: ...
30
32
  @property
31
33
  def api(self) -> RoborockClientV1: ...
@@ -38,7 +40,7 @@ class RoborockCoordinatedEntityV1(RoborockEntityV1, CoordinatorEntity[RoborockDa
38
40
  _attr_has_entity_name: bool
39
41
  _attr_unique_id: Incomplete
40
42
  listener_requests: Incomplete
41
- def __init__(self, unique_id: str, coordinator: RoborockDataUpdateCoordinator, listener_request: list[RoborockDataProtocol] | RoborockDataProtocol | None = None) -> None: ...
43
+ def __init__(self, unique_id: str, coordinator: RoborockDataUpdateCoordinator, listener_request: list[RoborockDataProtocol] | RoborockDataProtocol | None = None, is_dock_entity: bool = False) -> None: ...
42
44
  async def async_added_to_hass(self) -> None: ...
43
45
  async def async_will_remove_from_hass(self) -> None: ...
44
46
  @property
@@ -1,17 +1,15 @@
1
- from .const import DEFAULT_DRAWABLES as DEFAULT_DRAWABLES, DOMAIN as DOMAIN, DRAWABLES as DRAWABLES, IMAGE_CACHE_INTERVAL as IMAGE_CACHE_INTERVAL, MAP_FILE_FORMAT as MAP_FILE_FORMAT, MAP_SLEEP as MAP_SLEEP
2
1
  from .coordinator import RoborockConfigEntry as RoborockConfigEntry, RoborockDataUpdateCoordinator as RoborockDataUpdateCoordinator
3
2
  from .entity import RoborockCoordinatedEntityV1 as RoborockCoordinatedEntityV1
4
3
  from _typeshed import Incomplete
5
- from collections.abc import Callable as Callable
6
4
  from datetime import datetime
7
5
  from homeassistant.components.image import ImageEntity as ImageEntity
8
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
9
7
  from homeassistant.const import EntityCategory as EntityCategory
10
8
  from homeassistant.core import HomeAssistant as HomeAssistant
11
- from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
12
9
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
13
10
 
14
11
  _LOGGER: Incomplete
12
+ PARALLEL_UPDATES: int
15
13
 
16
14
  async def async_setup_entry(hass: HomeAssistant, config_entry: RoborockConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
17
15
 
@@ -20,16 +18,13 @@ class RoborockMap(RoborockCoordinatedEntityV1, ImageEntity):
20
18
  image_last_updated: datetime
21
19
  _attr_name: str
22
20
  config_entry: Incomplete
23
- parser: Incomplete
24
21
  map_flag: Incomplete
25
22
  cached_map: bytes
26
23
  _attr_entity_category: Incomplete
27
- def __init__(self, config_entry: ConfigEntry, unique_id: str, coordinator: RoborockDataUpdateCoordinator, map_flag: int, map_name: str, parser: Callable[[bytes], bytes | None]) -> None: ...
24
+ def __init__(self, config_entry: ConfigEntry, unique_id: str, coordinator: RoborockDataUpdateCoordinator, map_flag: int, map_name: str) -> None: ...
28
25
  @property
29
26
  def is_selected(self) -> bool: ...
30
27
  _attr_image_last_updated: Incomplete
31
28
  async def async_added_to_hass(self) -> None: ...
32
29
  def _handle_coordinator_update(self) -> None: ...
33
30
  async def async_image(self) -> bytes | None: ...
34
-
35
- async def refresh_coordinators(hass: HomeAssistant, coord: RoborockDataUpdateCoordinator) -> None: ...
@@ -1,7 +1,9 @@
1
1
  from dataclasses import dataclass
2
+ from datetime import datetime
2
3
  from roborock.containers import HomeDataDevice as HomeDataDevice, HomeDataProduct as HomeDataProduct, NetworkInfo as NetworkInfo
3
4
  from roborock.roborock_typing import DeviceProp as DeviceProp
4
5
  from typing import Any
6
+ from vacuum_map_parser_base.map_data import MapData as MapData
5
7
 
6
8
  @dataclass
7
9
  class RoborockHassDeviceInfo:
@@ -22,3 +24,8 @@ class RoborockMapInfo:
22
24
  flag: int
23
25
  name: str
24
26
  rooms: dict[int, str]
27
+ image: bytes | None
28
+ last_updated: datetime
29
+ map_data: MapData | None
30
+ @property
31
+ def current_room(self) -> str | None: ...
@@ -14,6 +14,7 @@ from roborock.version_1_apis.roborock_client_v1 import AttributeCache as Attribu
14
14
  from typing import Any
15
15
 
16
16
  _LOGGER: Incomplete
17
+ PARALLEL_UPDATES: int
17
18
 
18
19
  @dataclass(frozen=True, kw_only=True)
19
20
  class RoborockNumberDescription(NumberEntityDescription):
@@ -8,17 +8,19 @@ from homeassistant.components.select import SelectEntity as SelectEntity, Select
8
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 AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
11
- from roborock.containers import Status as Status
12
11
  from roborock.roborock_message import RoborockDataProtocol
13
- from roborock.roborock_typing import RoborockCommand
12
+ from roborock.roborock_typing import DeviceProp as DeviceProp, RoborockCommand
13
+
14
+ PARALLEL_UPDATES: int
14
15
 
15
16
  @dataclass(frozen=True, kw_only=True)
16
17
  class RoborockSelectDescription(SelectEntityDescription):
17
18
  api_command: RoborockCommand
18
- value_fn: Callable[[Status], str | None]
19
- options_lambda: Callable[[Status], list[str] | None]
20
- parameter_lambda: Callable[[str, Status], list[int]]
19
+ value_fn: Callable[[DeviceProp], str | None]
20
+ options_lambda: Callable[[DeviceProp], list[str] | None]
21
+ parameter_lambda: Callable[[str, DeviceProp], list[int]]
21
22
  protocol_listener: RoborockDataProtocol | None = ...
23
+ is_dock_entity: bool = ...
22
24
 
23
25
  SELECT_DESCRIPTIONS: list[RoborockSelectDescription]
24
26
 
@@ -1,6 +1,6 @@
1
1
  import datetime
2
2
  from .coordinator import RoborockConfigEntry as RoborockConfigEntry, RoborockDataUpdateCoordinator as RoborockDataUpdateCoordinator, RoborockDataUpdateCoordinatorA01 as RoborockDataUpdateCoordinatorA01
3
- from .entity import RoborockCoordinatedEntityA01 as RoborockCoordinatedEntityA01, RoborockCoordinatedEntityV1 as RoborockCoordinatedEntityV1
3
+ from .entity import RoborockCoordinatedEntityA01 as RoborockCoordinatedEntityA01, RoborockCoordinatedEntityV1 as RoborockCoordinatedEntityV1, RoborockEntity as RoborockEntity
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import Callable as Callable
6
6
  from dataclasses import dataclass
@@ -12,10 +12,13 @@ from homeassistant.helpers.typing import StateType as StateType
12
12
  from roborock.roborock_message import RoborockDataProtocol, RoborockDyadDataProtocol, RoborockZeoProtocol
13
13
  from roborock.roborock_typing import DeviceProp as DeviceProp
14
14
 
15
+ PARALLEL_UPDATES: int
16
+
15
17
  @dataclass(frozen=True, kw_only=True)
16
18
  class RoborockSensorDescription(SensorEntityDescription):
17
19
  value_fn: Callable[[DeviceProp], StateType | datetime.datetime]
18
20
  protocol_listener: RoborockDataProtocol | None = ...
21
+ is_dock_entity: bool = ...
19
22
 
20
23
  @dataclass(frozen=True, kw_only=True)
21
24
  class RoborockSensorDescriptionA01(SensorEntityDescription):
@@ -34,6 +37,16 @@ class RoborockSensorEntity(RoborockCoordinatedEntityV1, SensorEntity):
34
37
  @property
35
38
  def native_value(self) -> StateType | datetime.datetime: ...
36
39
 
40
+ class RoborockCurrentRoom(RoborockCoordinatedEntityV1, SensorEntity):
41
+ _attr_device_class: Incomplete
42
+ _attr_translation_key: str
43
+ _attr_entity_category: Incomplete
44
+ def __init__(self, coordinator: RoborockDataUpdateCoordinator) -> None: ...
45
+ @property
46
+ def options(self) -> list[str]: ...
47
+ @property
48
+ def native_value(self) -> str | None: ...
49
+
37
50
  class RoborockSensorEntityA01(RoborockCoordinatedEntityA01, SensorEntity):
38
51
  entity_description: RoborockSensorDescriptionA01
39
52
  def __init__(self, coordinator: RoborockDataUpdateCoordinatorA01, description: RoborockSensorDescriptionA01) -> None: ...
@@ -14,12 +14,14 @@ from roborock.version_1_apis.roborock_client_v1 import AttributeCache as Attribu
14
14
  from typing import Any
15
15
 
16
16
  _LOGGER: Incomplete
17
+ PARALLEL_UPDATES: int
17
18
 
18
19
  @dataclass(frozen=True, kw_only=True)
19
20
  class RoborockSwitchDescription(SwitchEntityDescription):
20
21
  cache_key: CacheableAttribute
21
22
  update_value: Callable[[AttributeCache, bool], Coroutine[Any, Any, None]]
22
23
  attribute: str
24
+ is_dock_entity: bool = ...
23
25
 
24
26
  SWITCH_DESCRIPTIONS: list[RoborockSwitchDescription]
25
27
 
@@ -16,6 +16,7 @@ from roborock.version_1_apis.roborock_client_v1 import AttributeCache as Attribu
16
16
  from typing import Any
17
17
 
18
18
  _LOGGER: Incomplete
19
+ PARALLEL_UPDATES: int
19
20
 
20
21
  @dataclass(frozen=True, kw_only=True)
21
22
  class RoborockTimeDescription(TimeEntityDescription):
@@ -1,7 +1,6 @@
1
1
  from .const import DOMAIN as DOMAIN, GET_MAPS_SERVICE_NAME as GET_MAPS_SERVICE_NAME, GET_VACUUM_CURRENT_POSITION_SERVICE_NAME as GET_VACUUM_CURRENT_POSITION_SERVICE_NAME, SET_VACUUM_GOTO_POSITION_SERVICE_NAME as SET_VACUUM_GOTO_POSITION_SERVICE_NAME
2
2
  from .coordinator import RoborockConfigEntry as RoborockConfigEntry, RoborockDataUpdateCoordinator as RoborockDataUpdateCoordinator
3
3
  from .entity import RoborockCoordinatedEntityV1 as RoborockCoordinatedEntityV1
4
- from .image import ColorsPalette as ColorsPalette, ImageConfig as ImageConfig, RoborockMapDataParser as RoborockMapDataParser, Sizes as Sizes
5
4
  from _typeshed import Incomplete
6
5
  from homeassistant.components.vacuum import StateVacuumEntity as StateVacuumEntity, VacuumActivity as VacuumActivity, VacuumEntityFeature as VacuumEntityFeature
7
6
  from homeassistant.core import HomeAssistant as HomeAssistant, ServiceResponse as ServiceResponse, SupportsResponse as SupportsResponse
@@ -11,6 +10,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
11
10
  from typing import Any
12
11
 
13
12
  STATE_CODE_TO_STATE: Incomplete
13
+ PARALLEL_UPDATES: int
14
14
 
15
15
  async def async_setup_entry(hass: HomeAssistant, config_entry: RoborockConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
16
16
 
@@ -74,6 +74,7 @@ DEVICE_CLASSES: Final[list[str]]
74
74
 
75
75
  class SensorStateClass(StrEnum):
76
76
  MEASUREMENT = 'measurement'
77
+ MEASUREMENT_ANGLE = 'measurement_angle'
77
78
  TOTAL = 'total'
78
79
  TOTAL_INCREASING = 'total_increasing'
79
80
 
@@ -82,3 +83,4 @@ STATE_CLASSES: Final[list[str]]
82
83
  UNIT_CONVERTERS: dict[SensorDeviceClass | str | None, type[BaseUnitConverter]]
83
84
  DEVICE_CLASS_UNITS: dict[SensorDeviceClass, set[type[StrEnum] | str | None]]
84
85
  DEVICE_CLASS_STATE_CLASSES: dict[SensorDeviceClass, set[SensorStateClass]]
86
+ STATE_CLASS_UNITS: dict[SensorStateClass | str, set[type[StrEnum] | str | None]]
@@ -2,8 +2,9 @@ import datetime
2
2
  from .const import ATTR_LAST_RESET as ATTR_LAST_RESET, ATTR_STATE_CLASS as ATTR_STATE_CLASS, DOMAIN as DOMAIN, SensorStateClass as SensorStateClass, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
3
3
  from _typeshed import Incomplete
4
4
  from collections.abc import Callable as Callable, Iterable
5
+ from dataclasses import dataclass
5
6
  from homeassistant.components.recorder import get_instance as get_instance, history as history, statistics as statistics
6
- from homeassistant.components.recorder.models import StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, StatisticResult as StatisticResult
7
+ from homeassistant.components.recorder.models import StatisticData as StatisticData, StatisticMeanType as StatisticMeanType, StatisticMetaData as StatisticMetaData, StatisticResult as StatisticResult
7
8
  from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, REVOLUTIONS_PER_MINUTE as REVOLUTIONS_PER_MINUTE, UnitOfIrradiance as UnitOfIrradiance, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfVolume as UnitOfVolume
8
9
  from homeassistant.core import HomeAssistant as HomeAssistant, State as State, callback as callback, split_entity_id as split_entity_id
9
10
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
@@ -17,6 +18,12 @@ from sqlalchemy.orm.session import Session as Session
17
18
  from typing import Any
18
19
 
19
20
  _LOGGER: Incomplete
21
+
22
+ @dataclass
23
+ class _StatisticsConfig:
24
+ types: set[str]
25
+ mean_type: StatisticMeanType = ...
26
+
20
27
  DEFAULT_STATISTICS: Incomplete
21
28
  EQUIVALENT_UNITS: Incomplete
22
29
  SEEN_DIP: HassKey[set[str]]
@@ -24,10 +31,15 @@ WARN_DIP: HassKey[set[str]]
24
31
  WARN_NEGATIVE: HassKey[set[str]]
25
32
  WARN_UNSUPPORTED_UNIT: HassKey[set[str]]
26
33
  WARN_UNSTABLE_UNIT: HassKey[set[str]]
34
+ WARN_STATISTICS_MEAN_CHANGED: HassKey[set[str]]
27
35
  LINK_DEV_STATISTICS: str
36
+ STATE_CLASS_REMOVED_ISSUE: str
37
+ UNITS_CHANGED_ISSUE: str
38
+ MEAN_TYPE_CHANGED_ISSUE: str
28
39
 
29
40
  def _get_sensor_states(hass: HomeAssistant) -> list[State]: ...
30
- def _time_weighted_average(fstates: list[tuple[float, State]], start: datetime.datetime, end: datetime.datetime) -> float: ...
41
+ def _time_weighted_arithmetic_mean(fstates: list[tuple[float, State]], start: datetime.datetime, end: datetime.datetime) -> float: ...
42
+ def _time_weighted_circular_mean(fstates: list[tuple[float, State]], start: datetime.datetime, end: datetime.datetime) -> float: ...
31
43
  def _get_units(fstates: list[tuple[float, State]]) -> set[str | None]: ...
32
44
  def _equivalent_units(units: set[str | None]) -> bool: ...
33
45
  def _entity_history_to_float_and_state(entity_history: Iterable[State]) -> list[tuple[float, State]]: ...
@@ -37,7 +49,7 @@ def _suggest_report_issue(hass: HomeAssistant, entity_id: str) -> str: ...
37
49
  def warn_dip(hass: HomeAssistant, entity_id: str, state: State, previous_fstate: float) -> None: ...
38
50
  def warn_negative(hass: HomeAssistant, entity_id: str, state: State) -> None: ...
39
51
  def reset_detected(hass: HomeAssistant, entity_id: str, fstate: float, previous_fstate: float | None, state: State) -> bool: ...
40
- def _wanted_statistics(sensor_states: list[State]) -> dict[str, set[str]]: ...
52
+ def _wanted_statistics(sensor_states: list[State]) -> dict[str, _StatisticsConfig]: ...
41
53
  def _last_reset_as_utc_isoformat(last_reset_s: Any, entity_id: str) -> str | None: ...
42
54
  def _timestamp_to_isoformat_or_none(timestamp: float | None) -> str | None: ...
43
55
  def compile_statistics(hass: HomeAssistant, session: Session, start: datetime.datetime, end: datetime.datetime) -> statistics.PlatformCompiledStatistics: ...
@@ -1,9 +1,9 @@
1
1
  from .const import BLOCK_EXPECTED_SLEEP_PERIOD as BLOCK_EXPECTED_SLEEP_PERIOD, BLOCK_WRONG_SLEEP_PERIOD as BLOCK_WRONG_SLEEP_PERIOD, CONF_COAP_PORT as CONF_COAP_PORT, CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, FIRMWARE_UNSUPPORTED_ISSUE_ID as FIRMWARE_UNSUPPORTED_ISSUE_ID, LOGGER as LOGGER, MODELS_WITH_WRONG_SLEEP_PERIOD as MODELS_WITH_WRONG_SLEEP_PERIOD, PUSH_UPDATE_ISSUE_ID as PUSH_UPDATE_ISSUE_ID
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyEntryData as ShellyEntryData, ShellyRestCoordinator as ShellyRestCoordinator, ShellyRpcCoordinator as ShellyRpcCoordinator, ShellyRpcPollingCoordinator as ShellyRpcPollingCoordinator
3
- from .utils import async_create_issue_unsupported_firmware as async_create_issue_unsupported_firmware, get_coap_context as get_coap_context, get_device_entry_gen as get_device_entry_gen, get_http_port as get_http_port, get_ws_context as get_ws_context
3
+ from .utils import async_create_issue_unsupported_firmware as async_create_issue_unsupported_firmware, get_coap_context as get_coap_context, get_device_entry_gen as get_device_entry_gen, get_http_port as get_http_port, get_rpc_scripts_event_types as get_rpc_scripts_event_types, get_ws_context as get_ws_context
4
4
  from _typeshed import Incomplete
5
5
  from homeassistant.components.bluetooth import async_remove_scanner as async_remove_scanner
6
- from homeassistant.const import CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME, Platform as Platform
6
+ from homeassistant.const import CONF_HOST as CONF_HOST, CONF_MODEL as CONF_MODEL, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME, Platform as Platform
7
7
  from homeassistant.core import HomeAssistant as HomeAssistant
8
8
  from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed, ConfigEntryNotReady as ConfigEntryNotReady
9
9
  from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
@@ -1,7 +1,9 @@
1
1
  from ..const import BLEScannerMode as BLEScannerMode
2
2
  from ..coordinator import ShellyRpcCoordinator as ShellyRpcCoordinator
3
- from homeassistant.components.bluetooth import async_register_scanner as async_register_scanner
3
+ from _typeshed import Incomplete
4
+ from homeassistant.components.bluetooth import BluetoothScanningMode as BluetoothScanningMode, async_register_scanner as async_register_scanner
4
5
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant
5
- from homeassistant.helpers.device_registry import format_mac as format_mac
6
+
7
+ BLE_SCANNER_MODE_TO_BLUETOOTH_SCANNING_MODE: Incomplete
6
8
 
7
9
  async def async_connect_scanner(hass: HomeAssistant, coordinator: ShellyRpcCoordinator, scanner_mode: BLEScannerMode, device_id: str) -> CALLBACK_TYPE: ...
@@ -1,14 +1,15 @@
1
- from .const import LOGGER as LOGGER, SHELLY_GAS_MODELS as SHELLY_GAS_MODELS
1
+ from .const import DOMAIN as DOMAIN, LOGGER as LOGGER, SHELLY_GAS_MODELS as SHELLY_GAS_MODELS
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
- from .utils import get_device_entry_gen as get_device_entry_gen
3
+ from .utils import get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids
4
4
  from _typeshed import Incomplete
5
- from collections.abc import Callable as Callable, Coroutine
5
+ from collections.abc import Callable as Callable
6
6
  from dataclasses import dataclass
7
7
  from homeassistant.components.button import ButtonDeviceClass as ButtonDeviceClass, ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
8
8
  from homeassistant.const import EntityCategory as EntityCategory
9
9
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
10
+ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
10
11
  from homeassistant.helpers import entity_registry as er
11
- from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, DeviceInfo as DeviceInfo
12
+ from homeassistant.helpers.device_registry import CONNECTION_BLUETOOTH as CONNECTION_BLUETOOTH, CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, DeviceInfo as DeviceInfo
12
13
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
13
14
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
14
15
  from homeassistant.util import slugify as slugify
@@ -16,19 +17,33 @@ from typing import Any, Final
16
17
 
17
18
  @dataclass(frozen=True, kw_only=True)
18
19
  class ShellyButtonDescription[_ShellyCoordinatorT: ShellyBlockCoordinator | ShellyRpcCoordinator](ButtonEntityDescription):
19
- press_action: Callable[[_ShellyCoordinatorT], Coroutine[Any, Any, None]]
20
+ press_action: str
20
21
  supported: Callable[[_ShellyCoordinatorT], bool] = ...
21
22
 
22
23
  BUTTONS: Final[list[ShellyButtonDescription[Any]]]
24
+ BLU_TRV_BUTTONS: Final[list[ShellyButtonDescription]]
23
25
 
24
26
  @callback
25
27
  def async_migrate_unique_ids(coordinator: ShellyRpcCoordinator | ShellyBlockCoordinator, entity_entry: er.RegistryEntry) -> dict[str, Any] | None: ...
26
28
  async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
27
29
 
28
- class ShellyButton(CoordinatorEntity[ShellyRpcCoordinator | ShellyBlockCoordinator], ButtonEntity):
30
+ class ShellyBaseButton(CoordinatorEntity[ShellyRpcCoordinator | ShellyBlockCoordinator], ButtonEntity):
29
31
  entity_description: ShellyButtonDescription[ShellyRpcCoordinator | ShellyBlockCoordinator]
32
+ def __init__(self, coordinator: ShellyRpcCoordinator | ShellyBlockCoordinator, description: ShellyButtonDescription[ShellyRpcCoordinator | ShellyBlockCoordinator]) -> None: ...
33
+ async def async_press(self) -> None: ...
34
+ async def _press_method(self) -> None: ...
35
+
36
+ class ShellyButton(ShellyBaseButton):
30
37
  _attr_name: Incomplete
31
38
  _attr_unique_id: Incomplete
32
39
  _attr_device_info: Incomplete
33
40
  def __init__(self, coordinator: ShellyRpcCoordinator | ShellyBlockCoordinator, description: ShellyButtonDescription[ShellyRpcCoordinator | ShellyBlockCoordinator]) -> None: ...
34
- async def async_press(self) -> None: ...
41
+ async def _press_method(self) -> None: ...
42
+
43
+ class ShellyBluTrvButton(ShellyBaseButton):
44
+ _attr_name: Incomplete
45
+ _attr_unique_id: Incomplete
46
+ _attr_device_info: Incomplete
47
+ _id: Incomplete
48
+ def __init__(self, coordinator: ShellyRpcCoordinator, description: ShellyButtonDescription, id_: int) -> None: ...
49
+ async def _press_method(self) -> None: ...
@@ -1,4 +1,4 @@
1
- from .const import BLU_TRV_TEMPERATURE_SETTINGS as BLU_TRV_TEMPERATURE_SETTINGS, BLU_TRV_TIMEOUT as BLU_TRV_TIMEOUT, DOMAIN as DOMAIN, LOGGER as LOGGER, NOT_CALIBRATED_ISSUE_ID as NOT_CALIBRATED_ISSUE_ID, RPC_THERMOSTAT_SETTINGS as RPC_THERMOSTAT_SETTINGS, SHTRV_01_TEMPERATURE_SETTINGS as SHTRV_01_TEMPERATURE_SETTINGS
1
+ from .const import BLU_TRV_TEMPERATURE_SETTINGS as BLU_TRV_TEMPERATURE_SETTINGS, DOMAIN as DOMAIN, LOGGER as LOGGER, NOT_CALIBRATED_ISSUE_ID as NOT_CALIBRATED_ISSUE_ID, RPC_THERMOSTAT_SETTINGS as RPC_THERMOSTAT_SETTINGS, SHTRV_01_TEMPERATURE_SETTINGS as SHTRV_01_TEMPERATURE_SETTINGS
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .entity import ShellyRpcEntity as ShellyRpcEntity
4
4
  from .utils import async_remove_shelly_entity as async_remove_shelly_entity, get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids, is_rpc_thermostat_internal_actuator as is_rpc_thermostat_internal_actuator
@@ -1,10 +1,10 @@
1
1
  from .const import BLEScannerMode as BLEScannerMode, CONF_BLE_SCANNER_MODE as CONF_BLE_SCANNER_MODE, CONF_GEN as CONF_GEN, CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, LOGGER as LOGGER
2
- from .coordinator import async_reconnect_soon as async_reconnect_soon
2
+ from .coordinator import ShellyConfigEntry as ShellyConfigEntry, async_reconnect_soon as async_reconnect_soon
3
3
  from .utils import get_block_device_sleep_period as get_block_device_sleep_period, get_coap_context as get_coap_context, get_device_entry_gen as get_device_entry_gen, get_http_port as get_http_port, get_info_auth as get_info_auth, get_info_gen as get_info_gen, get_model_name as get_model_name, get_rpc_device_wakeup_period as get_rpc_device_wakeup_period, get_ws_context as get_ws_context, mac_address_from_name as mac_address_from_name
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import Mapping
6
- from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
7
- from homeassistant.const import CONF_HOST as CONF_HOST, CONF_MAC as CONF_MAC, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_USERNAME as CONF_USERNAME
6
+ from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
7
+ from homeassistant.const import CONF_HOST as CONF_HOST, CONF_MAC as CONF_MAC, CONF_MODEL as CONF_MODEL, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_USERNAME as CONF_USERNAME
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
9
9
  from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
10
10
  from homeassistant.helpers.selector import SelectSelector as SelectSelector, SelectSelectorConfig as SelectSelectorConfig
@@ -35,10 +35,10 @@ class ShellyConfigFlow(ConfigFlow, domain=DOMAIN):
35
35
  async def _async_get_info(self, host: str, port: int) -> dict[str, Any]: ...
36
36
  @staticmethod
37
37
  @callback
38
- def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlowHandler: ...
38
+ def async_get_options_flow(config_entry: ShellyConfigEntry) -> OptionsFlowHandler: ...
39
39
  @classmethod
40
40
  @callback
41
- def async_supports_options_flow(cls, config_entry: ConfigEntry) -> bool: ...
41
+ def async_supports_options_flow(cls, config_entry: ShellyConfigEntry) -> bool: ...
42
42
 
43
43
  class OptionsFlowHandler(OptionsFlow):
44
44
  async def async_step_init(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
@@ -79,5 +79,4 @@ VIRTUAL_COMPONENTS_MAP: Incomplete
79
79
  VIRTUAL_NUMBER_MODE_MAP: Incomplete
80
80
  API_WS_URL: str
81
81
  COMPONENT_ID_PATTERN: Incomplete
82
- BLU_TRV_TIMEOUT: int
83
82
  ROLE_TO_DEVICE_CLASS_MAP: Incomplete
@@ -9,7 +9,7 @@ from collections.abc import Callable as Callable, Coroutine
9
9
  from dataclasses import dataclass
10
10
  from homeassistant.components.bluetooth import async_remove_scanner as async_remove_scanner
11
11
  from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigEntryState as ConfigEntryState
12
- from homeassistant.const import ATTR_DEVICE_ID as ATTR_DEVICE_ID, CONF_HOST as CONF_HOST, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, Platform as Platform
12
+ from homeassistant.const import ATTR_DEVICE_ID as ATTR_DEVICE_ID, CONF_HOST as CONF_HOST, CONF_MODEL as CONF_MODEL, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, Platform as Platform
13
13
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
14
14
  from homeassistant.helpers.debounce import Debouncer as Debouncer
15
15
  from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, format_mac as format_mac
@@ -24,6 +24,8 @@ class ShellyEntryData:
24
24
  rest: ShellyRestCoordinator | None = ...
25
25
  rpc: ShellyRpcCoordinator | None = ...
26
26
  rpc_poll: ShellyRpcPollingCoordinator | None = ...
27
+ rpc_script_events: dict[int, list[str]] | None = ...
28
+ rpc_supports_scripts: bool | None = ...
27
29
  type ShellyConfigEntry = ConfigEntry[ShellyEntryData]
28
30
 
29
31
  class ShellyCoordinatorBase[_DeviceT: BlockDevice | RpcDevice](DataUpdateCoordinator[None]):
@@ -82,6 +84,8 @@ class ShellyRpcCoordinator(ShellyCoordinatorBase[RpcDevice]):
82
84
  _input_event_listeners: list[Callable[[dict[str, Any]], None]]
83
85
  _connect_task: asyncio.Task | None
84
86
  def __init__(self, hass: HomeAssistant, entry: ShellyConfigEntry, device: RpcDevice) -> None: ...
87
+ @cached_property
88
+ def bluetooth_source(self) -> str: ...
85
89
  async def async_device_online(self, source: str) -> None: ...
86
90
  update_interval: Incomplete
87
91
  def update_sleep_period(self) -> bool: ...
@@ -3,9 +3,8 @@ from .utils import get_rpc_ws_url as get_rpc_ws_url
3
3
  from _typeshed import Incomplete
4
4
  from homeassistant.components.bluetooth import async_scanner_by_source as async_scanner_by_source
5
5
  from homeassistant.components.diagnostics import async_redact_data as async_redact_data
6
- from homeassistant.const import CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME
6
+ from homeassistant.const import ATTR_MODEL as ATTR_MODEL, ATTR_NAME as ATTR_NAME, ATTR_SW_VERSION as ATTR_SW_VERSION, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME
7
7
  from homeassistant.core import HomeAssistant as HomeAssistant
8
- from homeassistant.helpers.device_registry import format_mac as format_mac
9
8
  from typing import Any
10
9
 
11
10
  TO_REDACT: Incomplete
@@ -1,4 +1,4 @@
1
- from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, LOGGER as LOGGER
1
+ from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, LOGGER as LOGGER
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .utils import async_remove_shelly_entity as async_remove_shelly_entity, get_block_entity_name as get_block_entity_name, get_rpc_entity_name as get_rpc_entity_name, get_rpc_key_instances as get_rpc_key_instances
4
4
  from _typeshed import Incomplete
@@ -46,7 +46,6 @@ class RpcEntityDescription(EntityDescription):
46
46
  value: Callable[[Any, Any], Any] | None = ...
47
47
  available: Callable[[dict], bool] | None = ...
48
48
  removal_condition: Callable[[dict, dict, str], bool] | None = ...
49
- extra_state_attributes: Callable[[dict, dict], dict | None] | None = ...
50
49
  use_polling_coordinator: bool = ...
51
50
  supported: Callable = ...
52
51
  unit: Callable[[dict], str | None] | None = ...
@@ -57,7 +56,6 @@ class RpcEntityDescription(EntityDescription):
57
56
  class RestEntityDescription(EntityDescription):
58
57
  name: str = ...
59
58
  value: Callable[[dict, Any], Any] | None = ...
60
- extra_state_attributes: Callable[[dict], dict | None] | None = ...
61
59
 
62
60
  class ShellyBlockEntity(CoordinatorEntity[ShellyBlockCoordinator]):
63
61
  block: Incomplete
@@ -1,7 +1,7 @@
1
1
  from .const import BASIC_INPUTS_EVENTS_TYPES as BASIC_INPUTS_EVENTS_TYPES, RPC_INPUTS_EVENTS_TYPES as RPC_INPUTS_EVENTS_TYPES, SHIX3_1_INPUTS_EVENTS_TYPES as SHIX3_1_INPUTS_EVENTS_TYPES
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .entity import ShellyBlockEntity as ShellyBlockEntity
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, get_device_entry_gen as get_device_entry_gen, get_rpc_entity_name as get_rpc_entity_name, get_rpc_key_instances as get_rpc_key_instances, get_rpc_script_event_types as get_rpc_script_event_types, is_block_momentary_input as is_block_momentary_input, is_rpc_momentary_input as is_rpc_momentary_input
4
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, get_device_entry_gen as get_device_entry_gen, get_rpc_entity_name as get_rpc_entity_name, get_rpc_key_instances as get_rpc_key_instances, is_block_momentary_input as is_block_momentary_input, is_rpc_momentary_input as is_rpc_momentary_input
5
5
  from _typeshed import Incomplete
6
6
  from aioshelly.block_device import Block as Block
7
7
  from collections.abc import Callable as Callable
@@ -1,4 +1,4 @@
1
- from .const import BLU_TRV_TIMEOUT as BLU_TRV_TIMEOUT, CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, LOGGER as LOGGER, VIRTUAL_NUMBER_MODE_MAP as VIRTUAL_NUMBER_MODE_MAP
1
+ from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, LOGGER as LOGGER, VIRTUAL_NUMBER_MODE_MAP as VIRTUAL_NUMBER_MODE_MAP
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .entity import BlockEntityDescription as BlockEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rpc as async_setup_entry_rpc
4
4
  from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids
@@ -1,7 +1,7 @@
1
- from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, ROLE_TO_DEVICE_CLASS_MAP as ROLE_TO_DEVICE_CLASS_MAP, SHAIR_MAX_WORK_HOURS as SHAIR_MAX_WORK_HOURS
1
+ from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, ROLE_TO_DEVICE_CLASS_MAP as ROLE_TO_DEVICE_CLASS_MAP
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .entity import BlockEntityDescription as BlockEntityDescription, RestEntityDescription as RestEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyRestAttributeEntity as ShellyRestAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, ShellySleepingRpcAttributeEntity as ShellySleepingRpcAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rest as async_setup_entry_rest, async_setup_entry_rpc as async_setup_entry_rpc
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime, get_virtual_component_ids as get_virtual_component_ids, is_rpc_wifi_stations_disabled as is_rpc_wifi_stations_disabled
4
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime, get_shelly_air_lamp_life as get_shelly_air_lamp_life, get_virtual_component_ids as get_virtual_component_ids, is_rpc_wifi_stations_disabled as is_rpc_wifi_stations_disabled
5
5
  from _typeshed import Incomplete
6
6
  from aioshelly.block_device import Block as Block
7
7
  from collections.abc import Callable as Callable
@@ -1,7 +1,6 @@
1
- from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, MOTION_MODELS as MOTION_MODELS
2
1
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
- from .entity import BlockEntityDescription as BlockEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockEntity as ShellyBlockEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellyRpcEntity as ShellyRpcEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rpc as async_setup_entry_rpc
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids, get_virtual_component_ids as get_virtual_component_ids, is_block_channel_type_light as is_block_channel_type_light, is_rpc_channel_type_light as is_rpc_channel_type_light, is_rpc_thermostat_internal_actuator as is_rpc_thermostat_internal_actuator, is_rpc_thermostat_mode as is_rpc_thermostat_mode
2
+ from .entity import BlockEntityDescription as BlockEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rpc as async_setup_entry_rpc
3
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, is_block_exclude_from_relay as is_block_exclude_from_relay, is_rpc_exclude_from_relay as is_rpc_exclude_from_relay
5
4
  from _typeshed import Incomplete
6
5
  from aioshelly.block_device import Block as Block
7
6
  from collections.abc import Callable as Callable
@@ -17,7 +16,8 @@ from typing import Any
17
16
  @dataclass(frozen=True, kw_only=True)
18
17
  class BlockSwitchDescription(BlockEntityDescription, SwitchEntityDescription): ...
19
18
 
20
- MOTION_SWITCH: Incomplete
19
+ BLOCK_RELAY_SWITCHES: Incomplete
20
+ BLOCK_SLEEPING_MOTION_SWITCH: Incomplete
21
21
 
22
22
  @dataclass(frozen=True, kw_only=True)
23
23
  class RpcSwitchDescription(RpcEntityDescription, SwitchEntityDescription):
@@ -26,6 +26,7 @@ class RpcSwitchDescription(RpcEntityDescription, SwitchEntityDescription):
26
26
  method_off: str
27
27
  method_params_fn: Callable[[int | None, bool], dict]
28
28
 
29
+ RPC_RELAY_SWITCHES: Incomplete
29
30
  RPC_SWITCHES: Incomplete
30
31
 
31
32
  async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
@@ -45,9 +46,11 @@ class BlockSleepingMotionSwitch(ShellySleepingBlockAttributeEntity, RestoreEntit
45
46
  async def async_turn_off(self, **kwargs: Any) -> None: ...
46
47
  async def async_added_to_hass(self) -> None: ...
47
48
 
48
- class BlockRelaySwitch(ShellyBlockEntity, SwitchEntity):
49
+ class BlockRelaySwitch(ShellyBlockAttributeEntity, SwitchEntity):
50
+ entity_description: BlockSwitchDescription
49
51
  control_result: dict[str, Any] | None
50
- def __init__(self, coordinator: ShellyBlockCoordinator, block: Block) -> None: ...
52
+ _attr_unique_id: str
53
+ def __init__(self, coordinator: ShellyBlockCoordinator, block: Block, attribute: str, description: BlockSwitchDescription) -> None: ...
51
54
  @property
52
55
  def is_on(self) -> bool: ...
53
56
  async def async_turn_on(self, **kwargs: Any) -> None: ...
@@ -55,14 +58,6 @@ class BlockRelaySwitch(ShellyBlockEntity, SwitchEntity):
55
58
  @callback
56
59
  def _update_callback(self) -> None: ...
57
60
 
58
- class RpcRelaySwitch(ShellyRpcEntity, SwitchEntity):
59
- _id: Incomplete
60
- def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None: ...
61
- @property
62
- def is_on(self) -> bool: ...
63
- async def async_turn_on(self, **kwargs: Any) -> None: ...
64
- async def async_turn_off(self, **kwargs: Any) -> None: ...
65
-
66
61
  class RpcSwitch(ShellyRpcAttributeEntity, SwitchEntity):
67
62
  entity_description: RpcSwitchDescription
68
63
  _attr_has_entity_name: bool
@@ -70,3 +65,8 @@ class RpcSwitch(ShellyRpcAttributeEntity, SwitchEntity):
70
65
  def is_on(self) -> bool: ...
71
66
  async def async_turn_on(self, **kwargs: Any) -> None: ...
72
67
  async def async_turn_off(self, **kwargs: Any) -> None: ...
68
+
69
+ class RpcRelaySwitch(RpcSwitch):
70
+ _attr_has_entity_name: bool
71
+ _attr_unique_id: str
72
+ def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcEntityDescription) -> None: ...
@@ -1,4 +1,4 @@
1
- from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, OTA_BEGIN as OTA_BEGIN, OTA_ERROR as OTA_ERROR, OTA_PROGRESS as OTA_PROGRESS, OTA_SUCCESS as OTA_SUCCESS
1
+ from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, OTA_BEGIN as OTA_BEGIN, OTA_ERROR as OTA_ERROR, OTA_PROGRESS as OTA_PROGRESS, OTA_SUCCESS as OTA_SUCCESS
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
3
  from .entity import RestEntityDescription as RestEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyRestAttributeEntity as ShellyRestAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingRpcAttributeEntity as ShellySleepingRpcAttributeEntity, async_setup_entry_rest as async_setup_entry_rest, async_setup_entry_rpc as async_setup_entry_rpc
4
4
  from .utils import get_device_entry_gen as get_device_entry_gen, get_release_url as get_release_url