homeassistant-stubs 2025.3.3__py3-none-any.whl → 2025.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. homeassistant-stubs/bootstrap.pyi +3 -2
  2. homeassistant-stubs/components/accuweather/const.pyi +3 -1
  3. homeassistant-stubs/components/accuweather/sensor.pyi +1 -1
  4. homeassistant-stubs/components/anova/config_flow.pyi +4 -1
  5. homeassistant-stubs/components/anthemav/media_player.pyi +2 -0
  6. homeassistant-stubs/components/arwn/sensor.pyi +3 -2
  7. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +14 -5
  8. homeassistant-stubs/components/assist_satellite/const.pyi +3 -0
  9. homeassistant-stubs/components/assist_satellite/entity.pyi +6 -4
  10. homeassistant-stubs/components/azure_storage/__init__.pyi +1 -1
  11. homeassistant-stubs/components/azure_storage/backup.pyi +1 -1
  12. homeassistant-stubs/components/azure_storage/config_flow.pyi +7 -0
  13. homeassistant-stubs/components/backup/__init__.pyi +2 -2
  14. homeassistant-stubs/components/backup/agent.pyi +1 -1
  15. homeassistant-stubs/components/backup/backup.pyi +1 -1
  16. homeassistant-stubs/components/backup/config_flow.pyi +7 -0
  17. homeassistant-stubs/components/backup/coordinator.pyi +28 -0
  18. homeassistant-stubs/components/backup/diagnostics.pyi +7 -0
  19. homeassistant-stubs/components/backup/entity.pyi +13 -0
  20. homeassistant-stubs/components/backup/http.pyi +1 -0
  21. homeassistant-stubs/components/backup/manager.pyi +8 -3
  22. homeassistant-stubs/components/backup/sensor.pyi +23 -0
  23. homeassistant-stubs/components/bosch_alarm/__init__.pyi +12 -0
  24. homeassistant-stubs/components/bosch_alarm/alarm_control_panel.pyi +31 -0
  25. homeassistant-stubs/components/bosch_alarm/config_flow.pyi +20 -0
  26. homeassistant-stubs/components/bosch_alarm/const.pyi +4 -0
  27. homeassistant-stubs/components/bring/diagnostics.pyi +5 -0
  28. homeassistant-stubs/components/brother/__init__.pyi +1 -0
  29. homeassistant-stubs/components/brother/coordinator.pyi +1 -0
  30. homeassistant-stubs/components/cloud/backup.pyi +3 -3
  31. homeassistant-stubs/components/cloud/http_api.pyi +6 -3
  32. homeassistant-stubs/components/cloud/tts.pyi +2 -2
  33. homeassistant-stubs/components/comelit/__init__.pyi +11 -0
  34. homeassistant-stubs/components/comelit/alarm_control_panel.pyi +44 -0
  35. homeassistant-stubs/components/comelit/binary_sensor.pyi +22 -0
  36. homeassistant-stubs/components/comelit/climate.pyi +60 -0
  37. homeassistant-stubs/components/comelit/config_flow.pyi +28 -0
  38. homeassistant-stubs/components/comelit/const.pyi +7 -0
  39. homeassistant-stubs/components/comelit/coordinator.pyi +38 -0
  40. homeassistant-stubs/components/comelit/cover.pyi +39 -0
  41. homeassistant-stubs/components/comelit/diagnostics.pyi +10 -0
  42. homeassistant-stubs/components/comelit/humidifier.pyi +61 -0
  43. homeassistant-stubs/components/comelit/light.pyi +28 -0
  44. homeassistant-stubs/components/comelit/sensor.pyi +45 -0
  45. homeassistant-stubs/components/comelit/switch.pyi +27 -0
  46. homeassistant-stubs/components/cover/reproduce_state.pyi +17 -6
  47. homeassistant-stubs/components/demo/valve.pyi +30 -0
  48. homeassistant-stubs/components/discovergy/__init__.pyi +1 -1
  49. homeassistant-stubs/components/energy/data.pyi +1 -0
  50. homeassistant-stubs/components/enigma2/config_flow.pyi +1 -0
  51. homeassistant-stubs/components/esphome/__init__.pyi +1 -1
  52. homeassistant-stubs/components/esphome/assist_satellite.pyi +2 -0
  53. homeassistant-stubs/components/esphome/config_flow.pyi +1 -0
  54. homeassistant-stubs/components/esphome/const.pyi +1 -0
  55. homeassistant-stubs/components/esphome/diagnostics.pyi +0 -1
  56. homeassistant-stubs/components/esphome/event.pyi +2 -0
  57. homeassistant-stubs/components/esphome/manager.pyi +1 -1
  58. homeassistant-stubs/components/fritzbox/climate.pyi +1 -1
  59. homeassistant-stubs/components/frontend/__init__.pyi +9 -10
  60. homeassistant-stubs/components/frontend/storage.pyi +2 -1
  61. homeassistant-stubs/components/gios/__init__.pyi +1 -0
  62. homeassistant-stubs/components/gios/config_flow.pyi +1 -0
  63. homeassistant-stubs/components/gios/coordinator.pyi +2 -2
  64. homeassistant-stubs/components/google/calendar.pyi +3 -2
  65. homeassistant-stubs/components/google_drive/backup.pyi +2 -2
  66. homeassistant-stubs/components/habitica/const.pyi +25 -0
  67. homeassistant-stubs/components/habitica/services.pyi +6 -2
  68. homeassistant-stubs/components/heos/const.pyi +1 -0
  69. homeassistant-stubs/components/heos/coordinator.pyi +5 -5
  70. homeassistant-stubs/components/heos/media_player.pyi +18 -8
  71. homeassistant-stubs/components/home_connect/__init__.pyi +6 -17
  72. homeassistant-stubs/components/home_connect/button.pyi +0 -2
  73. homeassistant-stubs/components/home_connect/const.pyi +1 -6
  74. homeassistant-stubs/components/home_connect/coordinator.pyi +4 -2
  75. homeassistant-stubs/components/home_connect/entity.pyi +7 -2
  76. homeassistant-stubs/components/home_connect/light.pyi +1 -1
  77. homeassistant-stubs/components/home_connect/number.pyi +4 -3
  78. homeassistant-stubs/components/home_connect/select.pyi +7 -3
  79. homeassistant-stubs/components/home_connect/sensor.pyi +3 -1
  80. homeassistant-stubs/components/home_connect/services.pyi +35 -0
  81. homeassistant-stubs/components/home_connect/switch.pyi +2 -1
  82. homeassistant-stubs/components/home_connect/time.pyi +6 -1
  83. homeassistant-stubs/components/homeassistant_hardware/coordinator.pyi +15 -0
  84. homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +2 -1
  85. homeassistant-stubs/components/homeassistant_hardware/update.pyi +68 -0
  86. homeassistant-stubs/components/homeassistant_hardware/util.pyi +6 -1
  87. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +7 -1
  88. homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +1 -1
  89. homeassistant-stubs/components/homeassistant_sky_connect/const.pyi +10 -0
  90. homeassistant-stubs/components/homeassistant_sky_connect/update.pyi +29 -0
  91. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +1 -1
  92. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +1 -1
  93. homeassistant-stubs/components/homeassistant_yellow/const.pyi +4 -0
  94. homeassistant-stubs/components/homeassistant_yellow/update.pyi +29 -0
  95. homeassistant-stubs/components/homee/binary_sensor.pyi +21 -0
  96. homeassistant-stubs/components/homee/button.pyi +1 -0
  97. homeassistant-stubs/components/homee/cover.pyi +1 -0
  98. homeassistant-stubs/components/homee/light.pyi +1 -0
  99. homeassistant-stubs/components/homee/lock.pyi +25 -0
  100. homeassistant-stubs/components/homee/number.pyi +1 -0
  101. homeassistant-stubs/components/homee/select.pyi +23 -0
  102. homeassistant-stubs/components/homee/sensor.pyi +2 -0
  103. homeassistant-stubs/components/homee/switch.pyi +2 -0
  104. homeassistant-stubs/components/homee/valve.pyi +1 -0
  105. homeassistant-stubs/components/homekit/__init__.pyi +3 -1
  106. homeassistant-stubs/components/homekit/accessories.pyi +1 -0
  107. homeassistant-stubs/components/homekit/type_switches.pyi +6 -0
  108. homeassistant-stubs/components/huawei_lte/__init__.pyi +1 -1
  109. homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +7 -7
  110. homeassistant-stubs/components/incomfort/config_flow.pyi +1 -0
  111. homeassistant-stubs/components/iron_os/coordinator.pyi +2 -0
  112. homeassistant-stubs/components/iron_os/number.pyi +2 -0
  113. homeassistant-stubs/components/iron_os/select.pyi +3 -0
  114. homeassistant-stubs/components/jewish_calendar/__init__.pyi +9 -2
  115. homeassistant-stubs/components/jewish_calendar/binary_sensor.pyi +4 -4
  116. homeassistant-stubs/components/jewish_calendar/const.pyi +3 -0
  117. homeassistant-stubs/components/jewish_calendar/entity.pyi +2 -2
  118. homeassistant-stubs/components/jewish_calendar/sensor.pyi +5 -6
  119. homeassistant-stubs/components/jewish_calendar/service.pyi +10 -0
  120. homeassistant-stubs/components/lawn_mower/__init__.pyi +1 -0
  121. homeassistant-stubs/components/linkplay/entity.pyi +0 -1
  122. homeassistant-stubs/components/linkplay/media_player.pyi +3 -2
  123. homeassistant-stubs/components/linkplay/utils.pyi +0 -32
  124. homeassistant-stubs/components/lovelace/__init__.pyi +3 -1
  125. homeassistant-stubs/components/mastodon/__init__.pyi +2 -2
  126. homeassistant-stubs/components/mastodon/config_flow.pyi +2 -1
  127. homeassistant-stubs/components/mastodon/const.pyi +0 -7
  128. homeassistant-stubs/components/mastodon/coordinator.pyi +5 -5
  129. homeassistant-stubs/components/mastodon/diagnostics.pyi +2 -1
  130. homeassistant-stubs/components/mastodon/entity.pyi +1 -1
  131. homeassistant-stubs/components/mastodon/notify.pyi +3 -2
  132. homeassistant-stubs/components/mastodon/sensor.pyi +2 -3
  133. homeassistant-stubs/components/mastodon/services.pyi +1 -0
  134. homeassistant-stubs/components/mastodon/utils.pyi +3 -2
  135. homeassistant-stubs/components/mcp/coordinator.pyi +2 -9
  136. homeassistant-stubs/components/mcp_server/config_flow.pyi +1 -1
  137. homeassistant-stubs/components/mcp_server/const.pyi +1 -2
  138. homeassistant-stubs/components/mcp_server/server.pyi +1 -0
  139. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  140. homeassistant-stubs/components/modbus/climate.pyi +6 -2
  141. homeassistant-stubs/components/modbus/const.pyi +10 -0
  142. homeassistant-stubs/components/mqtt/config_flow.pyi +95 -7
  143. homeassistant-stubs/components/mqtt/const.pyi +65 -0
  144. homeassistant-stubs/components/mqtt/cover.pyi +2 -0
  145. homeassistant-stubs/components/mqtt/entity.pyi +4 -4
  146. homeassistant-stubs/components/mqtt/lawn_mower.pyi +1 -2
  147. homeassistant-stubs/components/mqtt/light/schema_basic.pyi +2 -48
  148. homeassistant-stubs/components/mqtt/light/schema_json.pyi +1 -14
  149. homeassistant-stubs/components/mqtt/light/schema_template.pyi +3 -14
  150. homeassistant-stubs/components/mqtt/models.pyi +25 -1
  151. homeassistant-stubs/components/mqtt/sensor.pyi +6 -5
  152. homeassistant-stubs/components/mqtt/update.pyi +1 -1
  153. homeassistant-stubs/components/mqtt/util.pyi +2 -0
  154. homeassistant-stubs/components/mysensors/__init__.pyi +1 -1
  155. homeassistant-stubs/components/mysensors/binary_sensor.pyi +0 -1
  156. homeassistant-stubs/components/mysensors/climate.pyi +0 -1
  157. homeassistant-stubs/components/mysensors/const.pyi +0 -1
  158. homeassistant-stubs/components/mysensors/cover.pyi +1 -2
  159. homeassistant-stubs/components/mysensors/device_tracker.pyi +0 -1
  160. homeassistant-stubs/components/mysensors/gateway.pyi +1 -1
  161. homeassistant-stubs/components/mysensors/helpers.pyi +1 -3
  162. homeassistant-stubs/components/mysensors/light.pyi +4 -5
  163. homeassistant-stubs/components/mysensors/remote.pyi +0 -1
  164. homeassistant-stubs/components/mysensors/sensor.pyi +0 -1
  165. homeassistant-stubs/components/mysensors/switch.pyi +1 -2
  166. homeassistant-stubs/components/mysensors/text.pyi +0 -1
  167. homeassistant-stubs/components/nam/button.pyi +2 -0
  168. homeassistant-stubs/components/nam/const.pyi +1 -0
  169. homeassistant-stubs/components/nam/sensor.pyi +2 -2
  170. homeassistant-stubs/components/nest/media_source.pyi +5 -0
  171. homeassistant-stubs/components/nextdns/__init__.pyi +1 -1
  172. homeassistant-stubs/components/nextdns/button.pyi +2 -0
  173. homeassistant-stubs/components/nextdns/config_flow.pyi +1 -0
  174. homeassistant-stubs/components/nextdns/switch.pyi +1 -0
  175. homeassistant-stubs/components/nut/__init__.pyi +1 -0
  176. homeassistant-stubs/components/nut/button.pyi +14 -0
  177. homeassistant-stubs/components/nut/entity.pyi +19 -0
  178. homeassistant-stubs/components/nut/sensor.pyi +8 -13
  179. homeassistant-stubs/components/nut/switch.pyi +18 -0
  180. homeassistant-stubs/components/onboarding/views.pyi +2 -1
  181. homeassistant-stubs/components/onedrive/__init__.pyi +4 -0
  182. homeassistant-stubs/components/onedrive/backup.pyi +1 -1
  183. homeassistant-stubs/components/onedrive/services.pyi +15 -0
  184. homeassistant-stubs/components/openai_conversation/__init__.pyi +5 -1
  185. homeassistant-stubs/components/openai_conversation/config_flow.pyi +5 -2
  186. homeassistant-stubs/components/openai_conversation/const.pyi +22 -11
  187. homeassistant-stubs/components/openai_conversation/conversation.pyi +6 -7
  188. homeassistant-stubs/components/overkiz/water_heater/__init__.pyi +1 -0
  189. homeassistant-stubs/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.pyi +41 -0
  190. homeassistant-stubs/components/purpleair/__init__.pyi +5 -10
  191. homeassistant-stubs/components/purpleair/const.pyi +6 -4
  192. homeassistant-stubs/components/purpleair/coordinator.pyi +3 -2
  193. homeassistant-stubs/components/purpleair/diagnostics.pyi +2 -4
  194. homeassistant-stubs/components/purpleair/entity.pyi +2 -3
  195. homeassistant-stubs/components/purpleair/sensor.pyi +4 -5
  196. homeassistant-stubs/components/pyload/__init__.pyi +12 -0
  197. homeassistant-stubs/components/pyload/button.pyi +32 -0
  198. homeassistant-stubs/components/pyload/config_flow.pyi +23 -0
  199. homeassistant-stubs/components/pyload/const.pyi +6 -0
  200. homeassistant-stubs/components/pyload/coordinator.pyi +34 -0
  201. homeassistant-stubs/components/pyload/diagnostics.pyi +10 -0
  202. homeassistant-stubs/components/pyload/entity.pyi +13 -0
  203. homeassistant-stubs/components/pyload/sensor.pyi +33 -0
  204. homeassistant-stubs/components/pyload/switch.pyi +37 -0
  205. homeassistant-stubs/components/qbus/climate.pyi +41 -0
  206. homeassistant-stubs/components/qbus/light.pyi +3 -3
  207. homeassistant-stubs/components/recorder/const.pyi +1 -0
  208. homeassistant-stubs/components/recorder/core.pyi +1 -2
  209. homeassistant-stubs/components/recorder/db_schema.pyi +3 -1
  210. homeassistant-stubs/components/recorder/migration.pyi +16 -2
  211. homeassistant-stubs/components/recorder/models/__init__.pyi +2 -2
  212. homeassistant-stubs/components/recorder/models/statistics.pyi +10 -2
  213. homeassistant-stubs/components/recorder/statistics.pyi +27 -9
  214. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +5 -3
  215. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  216. homeassistant-stubs/components/remote_calendar/__init__.pyi +11 -0
  217. homeassistant-stubs/components/remote_calendar/calendar.pyi +26 -0
  218. homeassistant-stubs/components/remote_calendar/config_flow.pyi +13 -0
  219. homeassistant-stubs/components/remote_calendar/const.pyi +2 -0
  220. homeassistant-stubs/components/remote_calendar/coordinator.pyi +20 -0
  221. homeassistant-stubs/components/remote_calendar/diagnostics.pyi +5 -0
  222. homeassistant-stubs/components/renault/config_flow.pyi +1 -0
  223. homeassistant-stubs/components/reolink/__init__.pyi +1 -1
  224. homeassistant-stubs/components/reolink/binary_sensor.pyi +17 -1
  225. homeassistant-stubs/components/reolink/config_flow.pyi +1 -1
  226. homeassistant-stubs/components/reolink/const.pyi +1 -0
  227. homeassistant-stubs/components/reolink/host.pyi +4 -4
  228. homeassistant-stubs/components/reolink/number.pyi +21 -1
  229. homeassistant-stubs/components/reolink/select.pyi +17 -1
  230. homeassistant-stubs/components/reolink/update.pyi +2 -1
  231. homeassistant-stubs/components/reolink/util.pyi +7 -0
  232. homeassistant-stubs/components/roborock/__init__.pyi +5 -3
  233. homeassistant-stubs/components/roborock/binary_sensor.pyi +4 -1
  234. homeassistant-stubs/components/roborock/button.pyi +11 -1
  235. homeassistant-stubs/components/roborock/config_flow.pyi +7 -3
  236. homeassistant-stubs/components/roborock/const.pyi +7 -1
  237. homeassistant-stubs/components/roborock/coordinator.pyi +18 -3
  238. homeassistant-stubs/components/roborock/entity.pyi +3 -1
  239. homeassistant-stubs/components/roborock/image.pyi +2 -7
  240. homeassistant-stubs/components/roborock/models.pyi +7 -0
  241. homeassistant-stubs/components/roborock/number.pyi +1 -0
  242. homeassistant-stubs/components/roborock/select.pyi +7 -5
  243. homeassistant-stubs/components/roborock/sensor.pyi +14 -1
  244. homeassistant-stubs/components/roborock/switch.pyi +2 -0
  245. homeassistant-stubs/components/roborock/time.pyi +1 -0
  246. homeassistant-stubs/components/roborock/vacuum.pyi +1 -1
  247. homeassistant-stubs/components/sensor/const.pyi +2 -0
  248. homeassistant-stubs/components/sensor/recorder.pyi +15 -3
  249. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  250. homeassistant-stubs/components/shelly/bluetooth/__init__.pyi +4 -2
  251. homeassistant-stubs/components/shelly/button.pyi +22 -7
  252. homeassistant-stubs/components/shelly/climate.pyi +1 -1
  253. homeassistant-stubs/components/shelly/config_flow.pyi +5 -5
  254. homeassistant-stubs/components/shelly/const.pyi +0 -1
  255. homeassistant-stubs/components/shelly/coordinator.pyi +5 -1
  256. homeassistant-stubs/components/shelly/diagnostics.pyi +1 -2
  257. homeassistant-stubs/components/shelly/entity.pyi +1 -3
  258. homeassistant-stubs/components/shelly/event.pyi +1 -1
  259. homeassistant-stubs/components/shelly/number.pyi +1 -1
  260. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  261. homeassistant-stubs/components/shelly/switch.pyi +14 -14
  262. homeassistant-stubs/components/shelly/update.pyi +1 -1
  263. homeassistant-stubs/components/shelly/utils.pyi +6 -2
  264. homeassistant-stubs/components/skybell/config_flow.pyi +3 -0
  265. homeassistant-stubs/components/smlight/__init__.pyi +0 -2
  266. homeassistant-stubs/components/smlight/sensor.pyi +5 -2
  267. homeassistant-stubs/components/smlight/update.pyi +0 -1
  268. homeassistant-stubs/components/squeezebox/browse_media.pyi +6 -11
  269. homeassistant-stubs/components/squeezebox/button.pyi +31 -0
  270. homeassistant-stubs/components/squeezebox/entity.pyi +8 -2
  271. homeassistant-stubs/components/squeezebox/media_player.pyi +3 -5
  272. homeassistant-stubs/components/synology_dsm/__init__.pyi +5 -7
  273. homeassistant-stubs/components/synology_dsm/backup.pyi +3 -4
  274. homeassistant-stubs/components/synology_dsm/binary_sensor.pyi +2 -5
  275. homeassistant-stubs/components/synology_dsm/button.pyi +2 -3
  276. homeassistant-stubs/components/synology_dsm/camera.pyi +2 -4
  277. homeassistant-stubs/components/synology_dsm/config_flow.pyi +3 -2
  278. homeassistant-stubs/components/synology_dsm/coordinator.pyi +15 -5
  279. homeassistant-stubs/components/synology_dsm/diagnostics.pyi +3 -4
  280. homeassistant-stubs/components/synology_dsm/media_source.pyi +3 -1
  281. homeassistant-stubs/components/synology_dsm/repairs.pyi +2 -3
  282. homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -5
  283. homeassistant-stubs/components/synology_dsm/service.pyi +1 -1
  284. homeassistant-stubs/components/synology_dsm/switch.pyi +2 -4
  285. homeassistant-stubs/components/synology_dsm/update.pyi +2 -5
  286. homeassistant-stubs/components/tibber/coordinator.pyi +1 -1
  287. homeassistant-stubs/components/todo/intent.pyi +8 -0
  288. homeassistant-stubs/components/trafikverket_ferry/config_flow.pyi +1 -0
  289. homeassistant-stubs/components/trafikverket_weatherstation/config_flow.pyi +3 -0
  290. homeassistant-stubs/components/tts/__init__.pyi +66 -51
  291. homeassistant-stubs/components/tts/entity.pyi +54 -0
  292. homeassistant-stubs/components/tts/media_source.pyi +1 -1
  293. homeassistant-stubs/components/update/__init__.pyi +2 -2
  294. homeassistant-stubs/components/usb/__init__.pyi +1 -5
  295. homeassistant-stubs/components/usb/utils.pyi +2 -0
  296. homeassistant-stubs/components/vodafone_station/__init__.pyi +11 -0
  297. homeassistant-stubs/components/vodafone_station/button.pyi +31 -0
  298. homeassistant-stubs/components/vodafone_station/config_flow.pyi +29 -0
  299. homeassistant-stubs/components/vodafone_station/const.pyi +9 -0
  300. homeassistant-stubs/components/vodafone_station/coordinator.pyi +43 -0
  301. homeassistant-stubs/components/vodafone_station/device_tracker.pyi +30 -0
  302. homeassistant-stubs/components/vodafone_station/diagnostics.pyi +10 -0
  303. homeassistant-stubs/components/vodafone_station/helpers.pyi +8 -0
  304. homeassistant-stubs/components/vodafone_station/sensor.pyi +38 -0
  305. homeassistant-stubs/components/zwave_js/__init__.pyi +5 -9
  306. homeassistant-stubs/components/zwave_js/api.pyi +15 -0
  307. homeassistant-stubs/components/zwave_js/config_flow.pyi +0 -1
  308. homeassistant-stubs/config_entries.pyi +2 -5
  309. homeassistant-stubs/helpers/backup.pyi +4 -1
  310. homeassistant-stubs/helpers/config_entry_oauth2_flow.pyi +14 -0
  311. homeassistant-stubs/helpers/config_validation.pyi +5 -2
  312. homeassistant-stubs/helpers/frame.pyi +14 -5
  313. homeassistant-stubs/helpers/intent.pyi +13 -4
  314. homeassistant-stubs/helpers/llm.pyi +7 -1
  315. homeassistant-stubs/helpers/script.pyi +1 -1
  316. homeassistant-stubs/helpers/selector.pyi +1 -0
  317. homeassistant-stubs/helpers/template.pyi +14 -1
  318. homeassistant-stubs/loader.pyi +18 -8
  319. homeassistant-stubs/scripts/check_config.pyi +0 -1
  320. homeassistant-stubs/util/logging.pyi +18 -1
  321. homeassistant-stubs/util/unit_conversion.pyi +3 -0
  322. homeassistant-stubs/util/unit_system.pyi +12 -10
  323. homeassistant-stubs/util/yaml/__init__.pyi +3 -4
  324. homeassistant-stubs/util/yaml/dumper.pyi +2 -8
  325. homeassistant-stubs/util/yaml/input.pyi +2 -9
  326. homeassistant-stubs/util/yaml/loader.pyi +4 -72
  327. homeassistant-stubs/util/yaml/objects.pyi +2 -26
  328. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/METADATA +2 -2
  329. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/RECORD +331 -270
  330. homeassistant-stubs/components/mcp_server/llm_api.pyi +0 -15
  331. homeassistant-stubs/components/synology_dsm/models.pyi +0 -10
  332. homeassistant-stubs/util/yaml/const.pyi +0 -1
  333. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/WHEEL +0 -0
  334. {homeassistant_stubs-2025.3.3.dist-info → homeassistant_stubs-2025.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -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
@@ -1,4 +1,4 @@
1
- from .const import API_WS_URL as API_WS_URL, BASIC_INPUTS_EVENTS_TYPES as BASIC_INPUTS_EVENTS_TYPES, COMPONENT_ID_PATTERN as COMPONENT_ID_PATTERN, CONF_COAP_PORT as CONF_COAP_PORT, CONF_GEN as CONF_GEN, DEVICES_WITHOUT_FIRMWARE_CHANGELOG as DEVICES_WITHOUT_FIRMWARE_CHANGELOG, DOMAIN as DOMAIN, FIRMWARE_UNSUPPORTED_ISSUE_ID as FIRMWARE_UNSUPPORTED_ISSUE_ID, GEN1_RELEASE_URL as GEN1_RELEASE_URL, GEN2_BETA_RELEASE_URL as GEN2_BETA_RELEASE_URL, GEN2_RELEASE_URL as GEN2_RELEASE_URL, LOGGER as LOGGER, RPC_INPUTS_EVENTS_TYPES as RPC_INPUTS_EVENTS_TYPES, SHBTN_INPUTS_EVENTS_TYPES as SHBTN_INPUTS_EVENTS_TYPES, SHBTN_MODELS as SHBTN_MODELS, SHELLY_EMIT_EVENT_PATTERN as SHELLY_EMIT_EVENT_PATTERN, SHIX3_1_INPUTS_EVENTS_TYPES as SHIX3_1_INPUTS_EVENTS_TYPES, UPTIME_DEVIATION as UPTIME_DEVIATION, VIRTUAL_COMPONENTS_MAP as VIRTUAL_COMPONENTS_MAP
1
+ from .const import API_WS_URL as API_WS_URL, BASIC_INPUTS_EVENTS_TYPES as BASIC_INPUTS_EVENTS_TYPES, COMPONENT_ID_PATTERN as COMPONENT_ID_PATTERN, CONF_COAP_PORT as CONF_COAP_PORT, CONF_GEN as CONF_GEN, DEVICES_WITHOUT_FIRMWARE_CHANGELOG as DEVICES_WITHOUT_FIRMWARE_CHANGELOG, DOMAIN as DOMAIN, FIRMWARE_UNSUPPORTED_ISSUE_ID as FIRMWARE_UNSUPPORTED_ISSUE_ID, GEN1_RELEASE_URL as GEN1_RELEASE_URL, GEN2_BETA_RELEASE_URL as GEN2_BETA_RELEASE_URL, GEN2_RELEASE_URL as GEN2_RELEASE_URL, LOGGER as LOGGER, RPC_INPUTS_EVENTS_TYPES as RPC_INPUTS_EVENTS_TYPES, SHAIR_MAX_WORK_HOURS as SHAIR_MAX_WORK_HOURS, SHBTN_INPUTS_EVENTS_TYPES as SHBTN_INPUTS_EVENTS_TYPES, SHBTN_MODELS as SHBTN_MODELS, SHELLY_EMIT_EVENT_PATTERN as SHELLY_EMIT_EVENT_PATTERN, SHIX3_1_INPUTS_EVENTS_TYPES as SHIX3_1_INPUTS_EVENTS_TYPES, UPTIME_DEVIATION as UPTIME_DEVIATION, VIRTUAL_COMPONENTS_MAP as VIRTUAL_COMPONENTS_MAP
2
2
  from _typeshed import Incomplete
3
3
  from aiohttp.web import Request as Request, WebSocketResponse as WebSocketResponse
4
4
  from aioshelly.block_device import Block as Block, BlockDevice as BlockDevice, COAP
@@ -8,7 +8,7 @@ from datetime import datetime
8
8
  from homeassistant.components import network as network
9
9
  from homeassistant.components.http import HomeAssistantView as HomeAssistantView
10
10
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
11
- from homeassistant.const import CONF_PORT as CONF_PORT, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
11
+ from homeassistant.const import CONF_HOST as CONF_HOST, CONF_MODEL as CONF_MODEL, CONF_PORT as CONF_PORT, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
12
12
  from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
13
13
  from homeassistant.helpers import singleton as singleton
14
14
  from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC
@@ -23,6 +23,7 @@ def get_number_of_channels(device: BlockDevice, block: Block) -> int: ...
23
23
  def get_block_entity_name(device: BlockDevice, block: Block | None, description: str | None = None) -> str: ...
24
24
  def get_block_channel_name(device: BlockDevice, block: Block | None) -> str: ...
25
25
  def is_block_momentary_input(settings: dict[str, Any], block: Block, include_detached: bool = False) -> bool: ...
26
+ def is_block_exclude_from_relay(settings: dict[str, Any], block: Block) -> bool: ...
26
27
  def get_device_uptime(uptime: float, last_uptime: datetime | None) -> datetime: ...
27
28
  def get_block_input_triggers(device: BlockDevice, block: Block) -> list[tuple[str, str]]: ...
28
29
  def get_shbtn_input_triggers() -> list[tuple[str, str]]: ...
@@ -72,3 +73,6 @@ def get_virtual_component_ids(config: dict[str, Any], platform: str) -> list[str
72
73
  def async_remove_orphaned_entities(hass: HomeAssistant, config_entry_id: str, mac: str, platform: str, keys: Iterable[str], key_suffix: str | None = None) -> None: ...
73
74
  def get_rpc_ws_url(hass: HomeAssistant) -> str | None: ...
74
75
  async def get_rpc_script_event_types(device: RpcDevice, id: int) -> list[str]: ...
76
+ def is_rpc_exclude_from_relay(settings: dict[str, Any], status: dict[str, Any], channel: str) -> bool: ...
77
+ def get_shelly_air_lamp_life(lamp_seconds: int) -> float: ...
78
+ async def get_rpc_scripts_event_types(device: RpcDevice, ignore_scripts: list[str]) -> dict[int, list[str]]: ...
@@ -1,10 +1,13 @@
1
1
  from .const import DOMAIN as DOMAIN
2
+ from _typeshed import Incomplete
2
3
  from collections.abc import Mapping
3
4
  from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
4
5
  from homeassistant.const import CONF_EMAIL as CONF_EMAIL, CONF_PASSWORD as CONF_PASSWORD
5
6
  from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
6
7
  from typing import Any
7
8
 
9
+ _LOGGER: Incomplete
10
+
8
11
  class SkybellFlowHandler(ConfigFlow, domain=DOMAIN):
9
12
  reauth_email: str
10
13
  async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
@@ -2,10 +2,8 @@ from .coordinator import SmConfigEntry as SmConfigEntry, SmDataUpdateCoordinator
2
2
  from homeassistant.const import CONF_HOST as CONF_HOST, Platform as Platform
3
3
  from homeassistant.core import HomeAssistant as HomeAssistant
4
4
  from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
5
- from pysmlight import Info as Info, Radio as Radio
6
5
 
7
6
  PLATFORMS: list[Platform]
8
7
 
9
8
  async def async_setup_entry(hass: HomeAssistant, entry: SmConfigEntry) -> bool: ...
10
9
  async def async_unload_entry(hass: HomeAssistant, entry: SmConfigEntry) -> bool: ...
11
- def get_radio(info: Info, idx: int) -> Radio: ...
@@ -19,10 +19,12 @@ class SmSensorEntityDescription(SensorEntityDescription):
19
19
 
20
20
  @dataclass(frozen=True, kw_only=True)
21
21
  class SmInfoEntityDescription(SensorEntityDescription):
22
- value_fn: Callable[[Info], StateType]
22
+ value_fn: Callable[[Info, int], StateType]
23
23
 
24
24
  INFO: list[SmInfoEntityDescription]
25
+ RADIO_INFO: Incomplete
25
26
  SENSORS: list[SmSensorEntityDescription]
27
+ EXTRA_SENSOR: Incomplete
26
28
  UPTIME: list[SmSensorEntityDescription]
27
29
 
28
30
  async def async_setup_entry(hass: HomeAssistant, entry: SmConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
@@ -40,8 +42,9 @@ class SmInfoSensorEntity(SmEntity, SensorEntity):
40
42
  coordinator: SmDataUpdateCoordinator
41
43
  entity_description: SmInfoEntityDescription
42
44
  _attr_entity_category: Incomplete
45
+ idx: Incomplete
43
46
  _attr_unique_id: Incomplete
44
- def __init__(self, coordinator: SmDataUpdateCoordinator, description: SmInfoEntityDescription) -> None: ...
47
+ def __init__(self, coordinator: SmDataUpdateCoordinator, description: SmInfoEntityDescription, idx: int = 0) -> None: ...
45
48
  @property
46
49
  def native_value(self) -> StateType: ...
47
50
 
@@ -1,4 +1,3 @@
1
- from . import get_radio as get_radio
2
1
  from .const import LOGGER as LOGGER
3
2
  from .coordinator import SmConfigEntry as SmConfigEntry, SmFirmwareUpdateCoordinator as SmFirmwareUpdateCoordinator, SmFwData as SmFwData
4
3
  from .entity import SmEntity as SmEntity
@@ -11,28 +11,23 @@ from typing import Any
11
11
  LIBRARY: Incomplete
12
12
  MEDIA_TYPE_TO_SQUEEZEBOX: dict[str | MediaType, str]
13
13
  SQUEEZEBOX_ID_BY_TYPE: dict[str | MediaType, str]
14
- CONTENT_TYPE_MEDIA_CLASS: dict[str | MediaType, dict[str, MediaClass | None]]
14
+ CONTENT_TYPE_MEDIA_CLASS: dict[str | MediaType, dict[str, MediaClass | str]]
15
15
  CONTENT_TYPE_TO_CHILD_TYPE: dict[str | MediaType, str | MediaType | None]
16
16
 
17
17
  @dataclass
18
18
  class BrowseData:
19
19
  content_type_to_child_type: dict[str | MediaType, str | MediaType | None] = field(default_factory=dict)
20
- content_type_media_class: dict[str | MediaType, dict[str, MediaClass | None]] = field(default_factory=dict)
20
+ content_type_media_class: dict[str | MediaType, dict[str, MediaClass | str]] = field(default_factory=dict)
21
21
  squeezebox_id_by_type: dict[str | MediaType, str] = field(default_factory=dict)
22
22
  media_type_to_squeezebox: dict[str | MediaType, str] = field(default_factory=dict)
23
23
  known_apps_radios: set[str] = field(default_factory=set)
24
24
  def __post_init__(self) -> None: ...
25
25
 
26
- @dataclass
27
- class BrowseItemResponse:
28
- child_item_type: str | MediaType
29
- child_media_class: dict[str, MediaClass | None]
30
- can_expand: bool
31
- can_play: bool
32
-
33
26
  def _add_new_command_to_browse_data(browse_data: BrowseData, cmd: str | MediaType, type: str) -> None: ...
34
- def _build_response_apps_radios_category(browse_data: BrowseData, cmd: str | MediaType) -> BrowseItemResponse: ...
35
- def _build_response_known_app(browse_data: BrowseData, search_type: str, item: dict[str, Any]) -> BrowseItemResponse: ...
27
+ def _build_response_apps_radios_category(browse_data: BrowseData, cmd: str | MediaType, item: dict[str, Any]) -> BrowseMedia: ...
28
+ def _build_response_known_app(browse_data: BrowseData, search_type: str, item: dict[str, Any]) -> BrowseMedia: ...
29
+ def _build_response_favorites(item: dict[str, Any]) -> BrowseMedia: ...
30
+ def _get_item_thumbnail(item: dict[str, Any], player: Player, entity: MediaPlayerEntity, item_type: str | MediaType | None, search_type: str, internal_request: bool) -> str | None: ...
36
31
  async def build_item_response(entity: MediaPlayerEntity, player: Player, payload: dict[str, str | None], browse_limit: int, browse_data: BrowseData) -> BrowseMedia: ...
37
32
  async def library_payload(hass: HomeAssistant, player: Player, browse_media: BrowseData) -> BrowseMedia: ...
38
33
  def media_source_content_filter(item: BrowseMedia) -> bool: ...
@@ -0,0 +1,31 @@
1
+ from . import SqueezeboxConfigEntry as SqueezeboxConfigEntry
2
+ from .const import SIGNAL_PLAYER_DISCOVERED as SIGNAL_PLAYER_DISCOVERED
3
+ from .coordinator import SqueezeBoxPlayerUpdateCoordinator as SqueezeBoxPlayerUpdateCoordinator
4
+ from .entity import SqueezeboxEntity as SqueezeboxEntity
5
+ from _typeshed import Incomplete
6
+ from dataclasses import dataclass
7
+ from homeassistant.components.button import ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
8
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.helpers.device_registry import format_mac as format_mac
10
+ from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
11
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
12
+
13
+ _LOGGER: Incomplete
14
+ HARDWARE_MODELS_WITH_SCREEN: Incomplete
15
+ HARDWARE_MODELS_WITH_TONE: Incomplete
16
+
17
+ @dataclass(frozen=True, kw_only=True)
18
+ class SqueezeboxButtonEntityDescription(ButtonEntityDescription):
19
+ press_action: str
20
+
21
+ BUTTON_ENTITIES: tuple[SqueezeboxButtonEntityDescription, ...]
22
+ SCREEN_BUTTON_ENTITIES: tuple[SqueezeboxButtonEntityDescription, ...]
23
+ TONE_BUTTON_ENTITIES: tuple[SqueezeboxButtonEntityDescription, ...]
24
+
25
+ async def async_setup_entry(hass: HomeAssistant, entry: SqueezeboxConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
26
+
27
+ class SqueezeboxButtonEntity(SqueezeboxEntity, ButtonEntity):
28
+ entity_description: SqueezeboxButtonEntityDescription
29
+ _attr_unique_id: Incomplete
30
+ def __init__(self, coordinator: SqueezeBoxPlayerUpdateCoordinator, entity_description: SqueezeboxButtonEntityDescription) -> None: ...
31
+ async def async_press(self) -> None: ...
@@ -1,10 +1,16 @@
1
1
  from .const import DOMAIN as DOMAIN, STATUS_QUERY_UUID as STATUS_QUERY_UUID
2
- from .coordinator import LMSStatusDataUpdateCoordinator as LMSStatusDataUpdateCoordinator
2
+ from .coordinator import LMSStatusDataUpdateCoordinator as LMSStatusDataUpdateCoordinator, SqueezeBoxPlayerUpdateCoordinator as SqueezeBoxPlayerUpdateCoordinator
3
3
  from _typeshed import Incomplete
4
- from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
4
+ from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, DeviceInfo as DeviceInfo, format_mac as format_mac
5
5
  from homeassistant.helpers.entity import EntityDescription as EntityDescription
6
6
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
7
7
 
8
+ class SqueezeboxEntity(CoordinatorEntity[SqueezeBoxPlayerUpdateCoordinator]):
9
+ _attr_has_entity_name: bool
10
+ _player: Incomplete
11
+ _attr_device_info: Incomplete
12
+ def __init__(self, coordinator: SqueezeBoxPlayerUpdateCoordinator) -> None: ...
13
+
8
14
  class LMSStatusEntity(CoordinatorEntity[LMSStatusDataUpdateCoordinator]):
9
15
  _attr_has_entity_name: bool
10
16
  entity_description: Incomplete
@@ -2,6 +2,7 @@ from . import SqueezeboxConfigEntry as SqueezeboxConfigEntry
2
2
  from .browse_media import BrowseData as BrowseData, build_item_response as build_item_response, generate_playlist as generate_playlist, library_payload as library_payload, media_source_content_filter as media_source_content_filter
3
3
  from .const import ATTR_ANNOUNCE_TIMEOUT as ATTR_ANNOUNCE_TIMEOUT, ATTR_ANNOUNCE_VOLUME as ATTR_ANNOUNCE_VOLUME, CONF_BROWSE_LIMIT as CONF_BROWSE_LIMIT, CONF_VOLUME_STEP as CONF_VOLUME_STEP, DEFAULT_BROWSE_LIMIT as DEFAULT_BROWSE_LIMIT, DEFAULT_VOLUME_STEP as DEFAULT_VOLUME_STEP, DISCOVERY_TASK as DISCOVERY_TASK, DOMAIN as DOMAIN, KNOWN_PLAYERS as KNOWN_PLAYERS, KNOWN_SERVERS as KNOWN_SERVERS, SIGNAL_PLAYER_DISCOVERED as SIGNAL_PLAYER_DISCOVERED, SQUEEZEBOX_SOURCE_STRINGS as SQUEEZEBOX_SOURCE_STRINGS
4
4
  from .coordinator import SqueezeBoxPlayerUpdateCoordinator as SqueezeBoxPlayerUpdateCoordinator
5
+ from .entity import SqueezeboxEntity as SqueezeboxEntity
5
6
  from _typeshed import Incomplete
6
7
  from collections.abc import Callable as Callable
7
8
  from datetime import datetime
@@ -12,11 +13,10 @@ from homeassistant.const import ATTR_COMMAND as ATTR_COMMAND, CONF_HOST as CONF_
12
13
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
13
14
  from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
14
15
  from homeassistant.helpers import discovery_flow as discovery_flow, entity_platform as entity_platform
15
- from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, DeviceInfo as DeviceInfo, format_mac as format_mac
16
+ from homeassistant.helpers.device_registry import format_mac as format_mac
16
17
  from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
17
18
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
18
19
  from homeassistant.helpers.start import async_at_start as async_at_start
19
- from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
20
20
  from homeassistant.util.dt import utcnow as utcnow
21
21
  from pysqueezebox import Server as Server
22
22
  from typing import Any
@@ -35,17 +35,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: SqueezeboxConfigEntry, a
35
35
  def get_announce_volume(extra: dict) -> float | None: ...
36
36
  def get_announce_timeout(extra: dict) -> int | None: ...
37
37
 
38
- class SqueezeBoxMediaPlayerEntity(CoordinatorEntity[SqueezeBoxPlayerUpdateCoordinator], MediaPlayerEntity):
38
+ class SqueezeBoxMediaPlayerEntity(SqueezeboxEntity, MediaPlayerEntity):
39
39
  _attr_supported_features: Incomplete
40
40
  _attr_has_entity_name: bool
41
41
  _attr_name: Incomplete
42
42
  _last_update: datetime | None
43
- _player: Incomplete
44
43
  _query_result: bool | dict
45
44
  _remove_dispatcher: Callable | None
46
45
  _previous_media_position: int
47
46
  _attr_unique_id: Incomplete
48
- _attr_device_info: Incomplete
49
47
  _browse_data: Incomplete
50
48
  def __init__(self, coordinator: SqueezeBoxPlayerUpdateCoordinator) -> None: ...
51
49
  @callback
@@ -1,10 +1,8 @@
1
1
  from .common import SynoApi as SynoApi, raise_config_entry_auth_error as raise_config_entry_auth_error
2
2
  from .const import CONF_BACKUP_PATH as CONF_BACKUP_PATH, CONF_BACKUP_SHARE as CONF_BACKUP_SHARE, DATA_BACKUP_AGENT_LISTENERS as DATA_BACKUP_AGENT_LISTENERS, DEFAULT_VERIFY_SSL as DEFAULT_VERIFY_SSL, DOMAIN as DOMAIN, EXCEPTION_DETAILS as EXCEPTION_DETAILS, EXCEPTION_UNKNOWN as EXCEPTION_UNKNOWN, PLATFORMS as PLATFORMS, SYNOLOGY_AUTH_FAILED_EXCEPTIONS as SYNOLOGY_AUTH_FAILED_EXCEPTIONS, SYNOLOGY_CONNECTION_EXCEPTIONS as SYNOLOGY_CONNECTION_EXCEPTIONS
3
- from .coordinator import SynologyDSMCameraUpdateCoordinator as SynologyDSMCameraUpdateCoordinator, SynologyDSMCentralUpdateCoordinator as SynologyDSMCentralUpdateCoordinator, SynologyDSMSwitchUpdateCoordinator as SynologyDSMSwitchUpdateCoordinator
4
- from .models import SynologyDSMData as SynologyDSMData
3
+ from .coordinator import SynologyDSMCameraUpdateCoordinator as SynologyDSMCameraUpdateCoordinator, SynologyDSMCentralUpdateCoordinator as SynologyDSMCentralUpdateCoordinator, SynologyDSMConfigEntry as SynologyDSMConfigEntry, SynologyDSMData as SynologyDSMData, SynologyDSMSwitchUpdateCoordinator as SynologyDSMSwitchUpdateCoordinator
5
4
  from .service import async_setup_services as async_setup_services
6
5
  from _typeshed import Incomplete
7
- from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
6
  from homeassistant.const import CONF_MAC as CONF_MAC, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, CONF_VERIFY_SSL as CONF_VERIFY_SSL
9
7
  from homeassistant.core import HomeAssistant as HomeAssistant
10
8
  from homeassistant.exceptions import ConfigEntryNotReady as ConfigEntryNotReady
@@ -13,7 +11,7 @@ from synology_dsm.api.surveillance_station.camera import SynoCamera as SynoCamer
13
11
 
14
12
  _LOGGER: Incomplete
15
13
 
16
- async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
17
- async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
18
- async def _async_update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
19
- async def async_remove_config_entry_device(hass: HomeAssistant, entry: ConfigEntry, device_entry: dr.DeviceEntry) -> bool: ...
14
+ async def async_setup_entry(hass: HomeAssistant, entry: SynologyDSMConfigEntry) -> bool: ...
15
+ async def async_unload_entry(hass: HomeAssistant, entry: SynologyDSMConfigEntry) -> bool: ...
16
+ async def _async_update_listener(hass: HomeAssistant, entry: SynologyDSMConfigEntry) -> None: ...
17
+ async def async_remove_config_entry_device(hass: HomeAssistant, entry: SynologyDSMConfigEntry, device_entry: dr.DeviceEntry) -> bool: ...