homeassistant-stubs 2025.9.3__py3-none-any.whl → 2025.10.0b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (309) hide show
  1. homeassistant-stubs/components/acaia/coordinator.pyi +1 -0
  2. homeassistant-stubs/components/accuweather/__init__.pyi +3 -3
  3. homeassistant-stubs/components/accuweather/config_flow.pyi +5 -0
  4. homeassistant-stubs/components/accuweather/const.pyi +1 -0
  5. homeassistant-stubs/components/accuweather/coordinator.pyi +17 -4
  6. homeassistant-stubs/components/accuweather/weather.pyi +5 -2
  7. homeassistant-stubs/components/airos/binary_sensor.pyi +2 -2
  8. homeassistant-stubs/components/airos/config_flow.pyi +1 -1
  9. homeassistant-stubs/components/airos/coordinator.pyi +4 -4
  10. homeassistant-stubs/components/airos/sensor.pyi +2 -2
  11. homeassistant-stubs/components/airzone/select.pyi +1 -0
  12. homeassistant-stubs/components/alexa_devices/coordinator.pyi +2 -0
  13. homeassistant-stubs/components/analytics/__init__.pyi +4 -21
  14. homeassistant-stubs/components/analytics/analytics.pyi +42 -5
  15. homeassistant-stubs/components/androidtv/__init__.pyi +5 -1
  16. homeassistant-stubs/components/androidtv/media_player.pyi +1 -10
  17. homeassistant-stubs/components/androidtv/services.pyi +16 -0
  18. homeassistant-stubs/components/androidtv_remote/entity.pyi +1 -3
  19. homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
  20. homeassistant-stubs/components/assist_pipeline/const.pyi +1 -0
  21. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +7 -4
  22. homeassistant-stubs/components/assist_pipeline/select.pyi +1 -1
  23. homeassistant-stubs/components/asuswrt/bridge.pyi +12 -0
  24. homeassistant-stubs/components/auth/login_flow.pyi +1 -1
  25. homeassistant-stubs/components/blue_current/__init__.pyi +11 -5
  26. homeassistant-stubs/components/blue_current/const.pyi +6 -0
  27. homeassistant-stubs/components/bluetooth/__init__.pyi +2 -2
  28. homeassistant-stubs/components/bluetooth/api.pyi +5 -2
  29. homeassistant-stubs/components/bluetooth/manager.pyi +7 -1
  30. homeassistant-stubs/components/bluetooth/websocket_api.pyi +6 -1
  31. homeassistant-stubs/components/brother/__init__.pyi +4 -2
  32. homeassistant-stubs/components/brother/config_flow.pyi +5 -2
  33. homeassistant-stubs/components/brother/const.pyi +4 -0
  34. homeassistant-stubs/components/bthome/sensor.pyi +1 -1
  35. homeassistant-stubs/components/camera/__init__.pyi +1 -1
  36. homeassistant-stubs/components/camera/prefs.pyi +3 -1
  37. homeassistant-stubs/components/cloud/http_api.pyi +2 -0
  38. homeassistant-stubs/components/comelit/coordinator.pyi +2 -1
  39. homeassistant-stubs/components/comelit/sensor.pyi +1 -1
  40. homeassistant-stubs/components/compit/__init__.pyi +11 -0
  41. homeassistant-stubs/components/compit/climate.pyi +63 -0
  42. homeassistant-stubs/components/compit/config_flow.pyi +17 -0
  43. homeassistant-stubs/components/compit/const.pyi +2 -0
  44. homeassistant-stubs/components/compit/coordinator.pyi +16 -0
  45. homeassistant-stubs/components/derivative/diagnostics.pyi +5 -0
  46. homeassistant-stubs/components/droplet/__init__.pyi +10 -0
  47. homeassistant-stubs/components/droplet/config_flow.pyi +13 -0
  48. homeassistant-stubs/components/droplet/const.pyi +7 -0
  49. homeassistant-stubs/components/droplet/coordinator.pyi +23 -0
  50. homeassistant-stubs/components/droplet/sensor.pyi +37 -0
  51. homeassistant-stubs/components/ecovacs/number.pyi +4 -1
  52. homeassistant-stubs/components/elkm1/config_flow.pyi +2 -0
  53. homeassistant-stubs/components/elkm1/sensor.pyi +8 -1
  54. homeassistant-stubs/components/energy/sensor.pyi +1 -1
  55. homeassistant-stubs/components/esphome/assist_satellite.pyi +5 -1
  56. homeassistant-stubs/components/esphome/climate.pyi +2 -0
  57. homeassistant-stubs/components/esphome/config_flow.pyi +2 -0
  58. homeassistant-stubs/components/esphome/const.pyi +1 -0
  59. homeassistant-stubs/components/esphome/entry_data.pyi +8 -4
  60. homeassistant-stubs/components/esphome/lock.pyi +1 -1
  61. homeassistant-stubs/components/esphome/select.pyi +4 -3
  62. homeassistant-stubs/components/fritz/sensor.pyi +2 -1
  63. homeassistant-stubs/components/frontend/__init__.pyi +5 -2
  64. homeassistant-stubs/components/geocaching/entity.pyi +14 -0
  65. homeassistant-stubs/components/geocaching/sensor.pyi +25 -5
  66. homeassistant-stubs/components/go2rtc/__init__.pyi +3 -0
  67. homeassistant-stubs/components/google/__init__.pyi +0 -1
  68. homeassistant-stubs/components/google/config_flow.pyi +3 -3
  69. homeassistant-stubs/components/google_cloud/__init__.pyi +0 -1
  70. homeassistant-stubs/components/google_cloud/config_flow.pyi +2 -2
  71. homeassistant-stubs/components/google_photos/media_source.pyi +2 -2
  72. homeassistant-stubs/components/habitica/binary_sensor.pyi +1 -1
  73. homeassistant-stubs/components/habitica/const.pyi +1 -0
  74. homeassistant-stubs/components/habitica/sensor.pyi +3 -1
  75. homeassistant-stubs/components/habitica/services.pyi +2 -1
  76. homeassistant-stubs/components/habitica/util.pyi +1 -0
  77. homeassistant-stubs/components/here_travel_time/__init__.pyi +3 -1
  78. homeassistant-stubs/components/history_stats/config_flow.pyi +7 -2
  79. homeassistant-stubs/components/history_stats/diagnostics.pyi +5 -0
  80. homeassistant-stubs/components/home_connect/application_credentials.pyi +0 -1
  81. homeassistant-stubs/components/home_connect/coordinator.pyi +0 -1
  82. homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +38 -11
  83. homeassistant-stubs/components/homee/alarm_control_panel.pyi +3 -2
  84. homeassistant-stubs/components/homee/binary_sensor.pyi +4 -2
  85. homeassistant-stubs/components/homee/button.pyi +3 -1
  86. homeassistant-stubs/components/homee/climate.pyi +3 -1
  87. homeassistant-stubs/components/homee/cover.pyi +3 -1
  88. homeassistant-stubs/components/homee/event.pyi +3 -1
  89. homeassistant-stubs/components/homee/fan.pyi +3 -1
  90. homeassistant-stubs/components/homee/helpers.pyi +6 -0
  91. homeassistant-stubs/components/homee/light.pyi +2 -0
  92. homeassistant-stubs/components/homee/lock.pyi +4 -2
  93. homeassistant-stubs/components/homee/number.pyi +3 -1
  94. homeassistant-stubs/components/homee/select.pyi +3 -1
  95. homeassistant-stubs/components/homee/sensor.pyi +2 -2
  96. homeassistant-stubs/components/homee/siren.pyi +4 -1
  97. homeassistant-stubs/components/homee/switch.pyi +4 -2
  98. homeassistant-stubs/components/homee/valve.pyi +3 -1
  99. homeassistant-stubs/components/homekit/type_switches.pyi +7 -1
  100. homeassistant-stubs/components/homewizard/sensor.pyi +3 -1
  101. homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +1 -1
  102. homeassistant-stubs/components/image/__init__.pyi +1 -0
  103. homeassistant-stubs/components/image_upload/__init__.pyi +1 -1
  104. homeassistant-stubs/components/image_upload/const.pyi +1 -0
  105. homeassistant-stubs/components/image_upload/media_source.pyi +5 -1
  106. homeassistant-stubs/components/immich/media_source.pyi +2 -2
  107. homeassistant-stubs/components/integration/__init__.pyi +0 -1
  108. homeassistant-stubs/components/integration/config_flow.pyi +1 -0
  109. homeassistant-stubs/components/lamarzocco/__init__.pyi +4 -2
  110. homeassistant-stubs/components/lamarzocco/config_flow.pyi +4 -2
  111. homeassistant-stubs/components/lamarzocco/const.pyi +1 -0
  112. homeassistant-stubs/components/lawn_mower/intent.pyi +8 -0
  113. homeassistant-stubs/components/letpot/number.pyi +34 -0
  114. homeassistant-stubs/components/libre_hardware_monitor/__init__.pyi +9 -0
  115. homeassistant-stubs/components/libre_hardware_monitor/config_flow.pyi +12 -0
  116. homeassistant-stubs/components/libre_hardware_monitor/const.pyi +4 -0
  117. homeassistant-stubs/components/libre_hardware_monitor/coordinator.pyi +21 -0
  118. homeassistant-stubs/components/libre_hardware_monitor/sensor.pyi +34 -0
  119. homeassistant-stubs/components/litterrobot/select.pyi +1 -1
  120. homeassistant-stubs/components/litterrobot/switch.pyi +5 -1
  121. homeassistant-stubs/components/logbook/helpers.pyi +4 -3
  122. homeassistant-stubs/components/mastodon/const.pyi +1 -0
  123. homeassistant-stubs/components/mastodon/services.pyi +1 -1
  124. homeassistant-stubs/components/matter/models.pyi +1 -0
  125. homeassistant-stubs/components/matter/sensor.pyi +1 -0
  126. homeassistant-stubs/components/mcp_server/session.pyi +2 -2
  127. homeassistant-stubs/components/media_source/__init__.pyi +2 -10
  128. homeassistant-stubs/components/media_source/helper.pyi +16 -0
  129. homeassistant-stubs/components/media_source/http.pyi +13 -0
  130. homeassistant-stubs/components/media_source/local_source.pyi +19 -11
  131. homeassistant-stubs/components/metoffice/sensor.pyi +1 -1
  132. homeassistant-stubs/components/miele/const.pyi +193 -17
  133. homeassistant-stubs/components/miele/sensor.pyi +12 -3
  134. homeassistant-stubs/components/miele/vacuum.pyi +1 -2
  135. homeassistant-stubs/components/min_max/sensor.pyi +1 -1
  136. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  137. homeassistant-stubs/components/modbus/binary_sensor.pyi +2 -2
  138. homeassistant-stubs/components/modbus/climate.pyi +2 -2
  139. homeassistant-stubs/components/modbus/const.pyi +1 -0
  140. homeassistant-stubs/components/modbus/cover.pyi +2 -2
  141. homeassistant-stubs/components/modbus/entity.pyi +4 -4
  142. homeassistant-stubs/components/modbus/fan.pyi +2 -2
  143. homeassistant-stubs/components/modbus/light.pyi +2 -2
  144. homeassistant-stubs/components/modbus/modbus.pyi +1 -2
  145. homeassistant-stubs/components/modbus/sensor.pyi +2 -2
  146. homeassistant-stubs/components/modbus/switch.pyi +2 -2
  147. homeassistant-stubs/components/modbus/validators.pyi +1 -1
  148. homeassistant-stubs/components/motionmount/select.pyi +1 -0
  149. homeassistant-stubs/components/mqtt/config_flow.pyi +61 -60
  150. homeassistant-stubs/components/mqtt/const.pyi +6 -0
  151. homeassistant-stubs/components/mqtt/device_automation.pyi +1 -1
  152. homeassistant-stubs/components/mqtt/entity.pyi +2 -2
  153. homeassistant-stubs/components/mqtt/image.pyi +1 -5
  154. homeassistant-stubs/components/mqtt/light/schema_json.pyi +0 -1
  155. homeassistant-stubs/components/mqtt/schemas.pyi +1 -1
  156. homeassistant-stubs/components/mqtt/tag.pyi +1 -1
  157. homeassistant-stubs/components/music_assistant/__init__.pyi +2 -1
  158. homeassistant-stubs/components/music_assistant/config_flow.pyi +1 -1
  159. homeassistant-stubs/components/music_assistant/const.pyi +1 -0
  160. homeassistant-stubs/components/nordpool/coordinator.pyi +4 -2
  161. homeassistant-stubs/components/ntfy/config_flow.pyi +4 -2
  162. homeassistant-stubs/components/ntfy/const.pyi +6 -0
  163. homeassistant-stubs/components/ntfy/entity.pyi +18 -0
  164. homeassistant-stubs/components/ntfy/event.pyi +29 -0
  165. homeassistant-stubs/components/ntfy/notify.pyi +19 -13
  166. homeassistant-stubs/components/{home_connect → ntfy}/repairs.pyi +7 -3
  167. homeassistant-stubs/components/number/const.pyi +1 -1
  168. homeassistant-stubs/components/openai_conversation/ai_task.pyi +5 -1
  169. homeassistant-stubs/components/openai_conversation/const.pyi +1 -0
  170. homeassistant-stubs/components/openai_conversation/entity.pyi +2 -2
  171. homeassistant-stubs/components/openuv/__init__.pyi +1 -1
  172. homeassistant-stubs/components/openuv/binary_sensor.pyi +2 -2
  173. homeassistant-stubs/components/openuv/coordinator.pyi +14 -1
  174. homeassistant-stubs/components/opnsense/__init__.pyi +11 -0
  175. homeassistant-stubs/components/opnsense/const.pyi +5 -0
  176. homeassistant-stubs/components/opnsense/device_tracker.pyi +23 -0
  177. homeassistant-stubs/components/portainer/__init__.pyi +11 -0
  178. homeassistant-stubs/components/portainer/binary_sensor.pyi +39 -0
  179. homeassistant-stubs/components/portainer/config_flow.pyi +20 -0
  180. homeassistant-stubs/components/portainer/const.pyi +2 -0
  181. homeassistant-stubs/components/portainer/coordinator.pyi +29 -0
  182. homeassistant-stubs/components/portainer/entity.pyi +22 -0
  183. homeassistant-stubs/components/prusalink/coordinator.pyi +2 -0
  184. homeassistant-stubs/components/radio_browser/media_source.pyi +3 -0
  185. homeassistant-stubs/components/recorder/models/statistics.pyi +1 -0
  186. homeassistant-stubs/components/recorder/statistics.pyi +1 -1
  187. homeassistant-stubs/components/recorder/util.pyi +1 -0
  188. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  189. homeassistant-stubs/components/reolink/entity.pyi +10 -0
  190. homeassistant-stubs/components/reolink/light.pyi +7 -1
  191. homeassistant-stubs/components/reolink/number.pyi +10 -1
  192. homeassistant-stubs/components/reolink/select.pyi +11 -3
  193. homeassistant-stubs/components/reolink/siren.pyi +11 -1
  194. homeassistant-stubs/components/reolink/switch.pyi +11 -1
  195. homeassistant-stubs/components/roborock/config_flow.pyi +1 -1
  196. homeassistant-stubs/components/roborock/const.pyi +1 -0
  197. homeassistant-stubs/components/roborock/coordinator.pyi +1 -1
  198. homeassistant-stubs/components/route_b_smart_meter/__init__.pyi +10 -0
  199. homeassistant-stubs/components/route_b_smart_meter/config_flow.pyi +22 -0
  200. homeassistant-stubs/components/route_b_smart_meter/const.pyi +9 -0
  201. homeassistant-stubs/components/route_b_smart_meter/coordinator.pyi +26 -0
  202. homeassistant-stubs/components/route_b_smart_meter/sensor.pyi +30 -0
  203. homeassistant-stubs/components/scrape/__init__.pyi +0 -1
  204. homeassistant-stubs/components/scrape/config_flow.pyi +1 -0
  205. homeassistant-stubs/components/scrape/coordinator.pyi +5 -1
  206. homeassistant-stubs/components/sensor/const.pyi +2 -1
  207. homeassistant-stubs/components/sensor/device_condition.pyi +1 -0
  208. homeassistant-stubs/components/sensor/device_trigger.pyi +1 -0
  209. homeassistant-stubs/components/sftp_storage/__init__.pyi +21 -0
  210. homeassistant-stubs/components/sftp_storage/backup.pyi +24 -0
  211. homeassistant-stubs/components/sftp_storage/client.pyi +48 -0
  212. homeassistant-stubs/components/sftp_storage/config_flow.pyi +25 -0
  213. homeassistant-stubs/components/sftp_storage/const.pyi +16 -0
  214. homeassistant-stubs/components/shelly/__init__.pyi +2 -2
  215. homeassistant-stubs/components/shelly/binary_sensor.pyi +5 -1
  216. homeassistant-stubs/components/shelly/button.pyi +10 -2
  217. homeassistant-stubs/components/shelly/const.pyi +5 -2
  218. homeassistant-stubs/components/shelly/cover.pyi +6 -0
  219. homeassistant-stubs/components/shelly/entity.pyi +1 -3
  220. homeassistant-stubs/components/shelly/light.pyi +18 -10
  221. homeassistant-stubs/components/shelly/number.pyi +1 -1
  222. homeassistant-stubs/components/shelly/repairs.pyi +4 -2
  223. homeassistant-stubs/components/shelly/select.pyi +1 -1
  224. homeassistant-stubs/components/shelly/sensor.pyi +12 -8
  225. homeassistant-stubs/components/shelly/switch.pyi +1 -1
  226. homeassistant-stubs/components/shelly/text.pyi +1 -1
  227. homeassistant-stubs/components/shelly/utils.pyi +7 -2
  228. homeassistant-stubs/components/sql/__init__.pyi +2 -2
  229. homeassistant-stubs/components/sql/config_flow.pyi +6 -2
  230. homeassistant-stubs/components/sql/const.pyi +1 -0
  231. homeassistant-stubs/components/sql/sensor.pyi +1 -1
  232. homeassistant-stubs/components/squeezebox/browse_media.pyi +1 -1
  233. homeassistant-stubs/components/ssdp/server.pyi +2 -3
  234. homeassistant-stubs/components/starlink/sensor.pyi +8 -1
  235. homeassistant-stubs/components/statistics/__init__.pyi +0 -1
  236. homeassistant-stubs/components/statistics/config_flow.pyi +1 -0
  237. homeassistant-stubs/components/switchbot_cloud/__init__.pyi +1 -0
  238. homeassistant-stubs/components/switchbot_cloud/binary_sensor.pyi +7 -0
  239. homeassistant-stubs/components/switchbot_cloud/climate.pyi +7 -3
  240. homeassistant-stubs/components/switchbot_cloud/const.pyi +13 -0
  241. homeassistant-stubs/components/switchbot_cloud/humidifier.pyi +48 -0
  242. homeassistant-stubs/components/switchbot_cloud/light.pyi +1 -0
  243. homeassistant-stubs/components/switchbot_cloud/sensor.pyi +13 -1
  244. homeassistant-stubs/components/synology_dsm/media_source.pyi +2 -2
  245. homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -0
  246. homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +1 -1
  247. homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
  248. homeassistant-stubs/components/systemmonitor/coordinator.pyi +2 -0
  249. homeassistant-stubs/components/systemmonitor/sensor.pyi +2 -0
  250. homeassistant-stubs/components/telegram_bot/__init__.pyi +2 -1
  251. homeassistant-stubs/components/telegram_bot/bot.pyi +1 -0
  252. homeassistant-stubs/components/telegram_bot/const.pyi +13 -0
  253. homeassistant-stubs/components/threshold/__init__.pyi +0 -1
  254. homeassistant-stubs/components/threshold/config_flow.pyi +1 -0
  255. homeassistant-stubs/components/tolo/config_flow.pyi +5 -3
  256. homeassistant-stubs/components/tts/__init__.pyi +5 -0
  257. homeassistant-stubs/components/uptimerobot/config_flow.pyi +1 -0
  258. homeassistant-stubs/components/vacuum/intent.pyi +1 -1
  259. homeassistant-stubs/components/volvo/__init__.pyi +1 -1
  260. homeassistant-stubs/components/volvo/api.pyi +4 -0
  261. homeassistant-stubs/components/volvo/coordinator.pyi +28 -15
  262. homeassistant-stubs/components/wake_on_lan/__init__.pyi +0 -1
  263. homeassistant-stubs/components/wake_on_lan/config_flow.pyi +1 -0
  264. homeassistant-stubs/components/webhook/trigger.pyi +2 -1
  265. homeassistant-stubs/components/workday/calendar.pyi +25 -0
  266. homeassistant-stubs/components/yalexs_ble/__init__.pyi +0 -1
  267. homeassistant-stubs/components/yalexs_ble/config_flow.pyi +2 -2
  268. homeassistant-stubs/components/zwave_js/__init__.pyi +1 -1
  269. homeassistant-stubs/components/zwave_js/config_flow.pyi +6 -3
  270. homeassistant-stubs/components/zwave_js/const.pyi +3 -0
  271. homeassistant-stubs/components/zwave_js/device_trigger.pyi +1 -1
  272. homeassistant-stubs/components/zwave_js/triggers/event.pyi +24 -9
  273. homeassistant-stubs/components/zwave_js/triggers/value_updated.pyi +11 -7
  274. homeassistant-stubs/config_entries.pyi +6 -1
  275. homeassistant-stubs/const.pyi +7 -46
  276. homeassistant-stubs/data_entry_flow.pyi +16 -3
  277. homeassistant-stubs/generated/entity_platforms.pyi +46 -0
  278. homeassistant-stubs/helpers/condition.pyi +3 -1
  279. homeassistant-stubs/helpers/config_validation.pyi +1 -1
  280. homeassistant-stubs/helpers/deprecation.pyi +1 -0
  281. homeassistant-stubs/helpers/device_registry.pyi +4 -3
  282. homeassistant-stubs/helpers/entity_component.pyi +1 -3
  283. homeassistant-stubs/helpers/event.pyi +2 -1
  284. homeassistant-stubs/helpers/intent.pyi +5 -8
  285. homeassistant-stubs/helpers/schema_config_entry_flow.pyi +5 -1
  286. homeassistant-stubs/helpers/selector.pyi +16 -16
  287. homeassistant-stubs/helpers/service.pyi +12 -14
  288. homeassistant-stubs/helpers/service_info/esphome.pyi +12 -0
  289. homeassistant-stubs/helpers/{template.pyi → template/__init__.pyi} +14 -97
  290. homeassistant-stubs/helpers/template/context.pyi +16 -0
  291. homeassistant-stubs/helpers/template/extensions/__init__.pyi +8 -0
  292. homeassistant-stubs/helpers/template/extensions/base.pyi +21 -0
  293. homeassistant-stubs/helpers/template/extensions/base64.pyi +9 -0
  294. homeassistant-stubs/helpers/template/extensions/collection.pyi +18 -0
  295. homeassistant-stubs/helpers/template/extensions/crypto.pyi +13 -0
  296. homeassistant-stubs/helpers/template/extensions/math.pyi +43 -0
  297. homeassistant-stubs/helpers/template/extensions/regex.pyi +14 -0
  298. homeassistant-stubs/helpers/template/extensions/string.pyi +9 -0
  299. homeassistant-stubs/helpers/template/helpers.pyi +4 -0
  300. homeassistant-stubs/helpers/template/render_info.pyi +39 -0
  301. homeassistant-stubs/helpers/trigger.pyi +16 -5
  302. homeassistant-stubs/helpers/trigger_template_entity.pyi +2 -1
  303. homeassistant-stubs/runner.pyi +16 -0
  304. homeassistant-stubs/util/unit_conversion.pyi +6 -0
  305. {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/METADATA +2 -2
  306. {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/RECORD +308 -250
  307. homeassistant-stubs/components/home_connect/time.pyi +0 -29
  308. {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/WHEEL +0 -0
  309. {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,30 @@
1
+ from . import BRouteConfigEntry as BRouteConfigEntry
2
+ from .const import ATTR_API_INSTANTANEOUS_CURRENT_R_PHASE as ATTR_API_INSTANTANEOUS_CURRENT_R_PHASE, ATTR_API_INSTANTANEOUS_CURRENT_T_PHASE as ATTR_API_INSTANTANEOUS_CURRENT_T_PHASE, ATTR_API_INSTANTANEOUS_POWER as ATTR_API_INSTANTANEOUS_POWER, ATTR_API_TOTAL_CONSUMPTION as ATTR_API_TOTAL_CONSUMPTION, DOMAIN as DOMAIN
3
+ from .coordinator import BRouteData as BRouteData, BRouteUpdateCoordinator as BRouteUpdateCoordinator
4
+ from _typeshed import Incomplete
5
+ from collections.abc import Callable as Callable
6
+ from dataclasses import dataclass
7
+ from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
8
+ from homeassistant.const import UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfEnergy as UnitOfEnergy, UnitOfPower as UnitOfPower
9
+ from homeassistant.core import HomeAssistant as HomeAssistant
10
+ from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
11
+ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
12
+ from homeassistant.helpers.typing import StateType as StateType
13
+ from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
14
+
15
+ @dataclass(frozen=True, kw_only=True)
16
+ class SensorEntityDescriptionWithValueAccessor(SensorEntityDescription):
17
+ value_accessor: Callable[[BRouteData], StateType]
18
+
19
+ SENSOR_DESCRIPTIONS: Incomplete
20
+
21
+ async def async_setup_entry(hass: HomeAssistant, entry: BRouteConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
22
+
23
+ class SmartMeterBRouteSensor(CoordinatorEntity[BRouteUpdateCoordinator], SensorEntity):
24
+ _attr_has_entity_name: bool
25
+ entity_description: SensorEntityDescriptionWithValueAccessor
26
+ _attr_unique_id: Incomplete
27
+ _attr_device_info: Incomplete
28
+ def __init__(self, coordinator: BRouteUpdateCoordinator, description: SensorEntityDescriptionWithValueAccessor) -> None: ...
29
+ @property
30
+ def native_value(self) -> StateType: ...
@@ -18,5 +18,4 @@ CONFIG_SCHEMA: Incomplete
18
18
  async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
19
19
  async def async_setup_entry(hass: HomeAssistant, entry: ScrapeConfigEntry) -> bool: ...
20
20
  async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
21
- async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
22
21
  async def async_remove_config_entry_device(hass: HomeAssistant, entry: ConfigEntry, device: DeviceEntry) -> bool: ...
@@ -35,4 +35,5 @@ OPTIONS_FLOW: Incomplete
35
35
  class ScrapeConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
36
36
  config_flow = CONFIG_FLOW
37
37
  options_flow = OPTIONS_FLOW
38
+ options_flow_reloads: bool
38
39
  def async_config_entry_title(self, options: Mapping[str, Any]) -> str: ...
@@ -2,13 +2,17 @@ from _typeshed import Incomplete
2
2
  from bs4 import BeautifulSoup
3
3
  from datetime import timedelta
4
4
  from homeassistant.components.rest import RestData as RestData
5
+ from homeassistant.components.rest.const import CONF_PAYLOAD_TEMPLATE as CONF_PAYLOAD_TEMPLATE
5
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
+ from homeassistant.const import CONF_RESOURCE_TEMPLATE as CONF_RESOURCE_TEMPLATE
6
8
  from homeassistant.core import HomeAssistant as HomeAssistant
7
9
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
10
+ from typing import Any
8
11
 
9
12
  _LOGGER: Incomplete
10
13
 
11
14
  class ScrapeCoordinator(DataUpdateCoordinator[BeautifulSoup]):
12
15
  _rest: Incomplete
13
- def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry | None, rest: RestData, update_interval: timedelta) -> None: ...
16
+ _rest_config: Incomplete
17
+ def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry | None, rest: RestData, rest_config: dict[str, Any], update_interval: timedelta) -> None: ...
14
18
  async def _async_update_data(self) -> BeautifulSoup: ...
@@ -1,7 +1,7 @@
1
1
  from _typeshed import Incomplete
2
2
  from enum import StrEnum
3
3
  from homeassistant.const import CONCENTRATION_GRAMS_PER_CUBIC_METER as CONCENTRATION_GRAMS_PER_CUBIC_METER, CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT as CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER as CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION as CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS as SIGNAL_STRENGTH_DECIBELS, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfArea as UnitOfArea, UnitOfBloodGlucoseConcentration as UnitOfBloodGlucoseConcentration, UnitOfConductivity as UnitOfConductivity, UnitOfDataRate as UnitOfDataRate, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfEnergyDistance as UnitOfEnergyDistance, UnitOfFrequency as UnitOfFrequency, UnitOfInformation as UnitOfInformation, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfPrecipitationDepth as UnitOfPrecipitationDepth, UnitOfPressure as UnitOfPressure, UnitOfReactiveEnergy as UnitOfReactiveEnergy, UnitOfReactivePower as UnitOfReactivePower, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate, UnitOfVolumetricFlux as UnitOfVolumetricFlux
4
- from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, ConductivityConverter as ConductivityConverter, DataRateConverter as DataRateConverter, DistanceConverter as DistanceConverter, DurationConverter as DurationConverter, ElectricCurrentConverter as ElectricCurrentConverter, ElectricPotentialConverter as ElectricPotentialConverter, EnergyConverter as EnergyConverter, EnergyDistanceConverter as EnergyDistanceConverter, InformationConverter as InformationConverter, MassConverter as MassConverter, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
4
+ from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, CarbonMonoxideConcentrationConverter as CarbonMonoxideConcentrationConverter, ConductivityConverter as ConductivityConverter, DataRateConverter as DataRateConverter, DistanceConverter as DistanceConverter, DurationConverter as DurationConverter, ElectricCurrentConverter as ElectricCurrentConverter, ElectricPotentialConverter as ElectricPotentialConverter, EnergyConverter as EnergyConverter, EnergyDistanceConverter as EnergyDistanceConverter, InformationConverter as InformationConverter, MassConverter as MassConverter, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
5
5
  from typing import Final
6
6
 
7
7
  DOMAIN: Final[str]
@@ -47,6 +47,7 @@ class SensorDeviceClass(StrEnum):
47
47
  PM1 = 'pm1'
48
48
  PM10 = 'pm10'
49
49
  PM25 = 'pm25'
50
+ PM4 = 'pm4'
50
51
  POWER_FACTOR = 'power_factor'
51
52
  POWER = 'power'
52
53
  PRECIPITATION = 'precipitation'
@@ -42,6 +42,7 @@ CONF_IS_PH: str
42
42
  CONF_IS_PM1: str
43
43
  CONF_IS_PM10: str
44
44
  CONF_IS_PM25: str
45
+ CONF_IS_PM4: str
45
46
  CONF_IS_POWER: str
46
47
  CONF_IS_POWER_FACTOR: str
47
48
  CONF_IS_PRECIPITATION: str
@@ -42,6 +42,7 @@ CONF_PH: str
42
42
  CONF_PM1: str
43
43
  CONF_PM10: str
44
44
  CONF_PM25: str
45
+ CONF_PM4: str
45
46
  CONF_POWER: str
46
47
  CONF_POWER_FACTOR: str
47
48
  CONF_PRECIPITATION: str
@@ -0,0 +1,21 @@
1
+ from .client import BackupAgentClient as BackupAgentClient
2
+ from .const import CONF_BACKUP_LOCATION as CONF_BACKUP_LOCATION, CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_PRIVATE_KEY_FILE as CONF_PRIVATE_KEY_FILE, CONF_USERNAME as CONF_USERNAME, DATA_BACKUP_AGENT_LISTENERS as DATA_BACKUP_AGENT_LISTENERS, DOMAIN as DOMAIN, LOGGER as LOGGER
3
+ from dataclasses import dataclass, field
4
+ from homeassistant.components.backup import BackupAgentError as BackupAgentError
5
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
6
+ from homeassistant.core import HomeAssistant as HomeAssistant
7
+ from homeassistant.exceptions import ConfigEntryError as ConfigEntryError
8
+
9
+ type SFTPConfigEntry = ConfigEntry[SFTPConfigEntryData]
10
+ @dataclass(kw_only=True)
11
+ class SFTPConfigEntryData:
12
+ host: str
13
+ port: int
14
+ username: str
15
+ password: str | None = field(repr=False)
16
+ private_key_file: str | None
17
+ backup_location: str
18
+
19
+ async def async_setup_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> bool: ...
20
+ async def async_remove_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> None: ...
21
+ async def async_unload_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> bool: ...
@@ -0,0 +1,24 @@
1
+ from . import SFTPConfigEntry as SFTPConfigEntry
2
+ from .client import BackupAgentClient as BackupAgentClient
3
+ from .const import DATA_BACKUP_AGENT_LISTENERS as DATA_BACKUP_AGENT_LISTENERS, DOMAIN as DOMAIN, LOGGER as LOGGER
4
+ from collections.abc import AsyncIterator, Callable as Callable, Coroutine
5
+ from homeassistant.components.backup import AgentBackup as AgentBackup, BackupAgent as BackupAgent, BackupAgentError as BackupAgentError, BackupNotFound as BackupNotFound
6
+ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
7
+ from typing import Any
8
+
9
+ async def async_get_backup_agents(hass: HomeAssistant) -> list[BackupAgent]: ...
10
+ @callback
11
+ def async_register_backup_agents_listener(hass: HomeAssistant, *, listener: Callable[[], None], **kwargs: Any) -> Callable[[], None]: ...
12
+
13
+ class SFTPBackupAgent(BackupAgent):
14
+ domain = DOMAIN
15
+ _entry: SFTPConfigEntry
16
+ _hass: HomeAssistant
17
+ name: str
18
+ unique_id: str
19
+ def __init__(self, hass: HomeAssistant, entry: SFTPConfigEntry) -> None: ...
20
+ async def async_download_backup(self, backup_id: str, **kwargs: Any) -> AsyncIterator[bytes]: ...
21
+ async def async_upload_backup(self, *, open_stream: Callable[[], Coroutine[Any, Any, AsyncIterator[bytes]]], backup: AgentBackup, **kwargs: Any) -> None: ...
22
+ async def async_delete_backup(self, backup_id: str, **kwargs: Any) -> None: ...
23
+ async def async_list_backups(self, **kwargs: Any) -> list[AgentBackup]: ...
24
+ async def async_get_backup(self, backup_id: str, **kwargs: Any) -> AgentBackup: ...
@@ -0,0 +1,48 @@
1
+ from . import SFTPConfigEntry as SFTPConfigEntry, SFTPConfigEntryData as SFTPConfigEntryData
2
+ from .const import BUF_SIZE as BUF_SIZE, LOGGER as LOGGER
3
+ from _typeshed import Incomplete
4
+ from asyncssh import SFTPClient as SFTPClient, SFTPClientFile as SFTPClientFile, SSHClientConnection as SSHClientConnection, SSHClientConnectionOptions
5
+ from collections.abc import AsyncIterator
6
+ from dataclasses import dataclass
7
+ from homeassistant.components.backup import AgentBackup as AgentBackup, BackupAgentError as BackupAgentError, suggested_filename as suggested_filename
8
+ from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from types import TracebackType
10
+ from typing import Self
11
+
12
+ def get_client_options(cfg: SFTPConfigEntryData) -> SSHClientConnectionOptions: ...
13
+
14
+ class AsyncFileIterator:
15
+ _client: BackupAgentClient
16
+ _fileobj: SFTPClientFile
17
+ cfg: SFTPConfigEntry
18
+ hass: HomeAssistant
19
+ file_path: str
20
+ buffer_size: Incomplete
21
+ _initialized: bool
22
+ def __init__(self, cfg: SFTPConfigEntry, hass: HomeAssistant, file_path: str, buffer_size: int = ...) -> None: ...
23
+ async def _initialize(self) -> None: ...
24
+ def __aiter__(self) -> AsyncIterator[bytes]: ...
25
+ async def __anext__(self) -> bytes: ...
26
+
27
+ @dataclass(kw_only=True)
28
+ class BackupMetadata:
29
+ file_path: str
30
+ metadata: dict[str, str | dict[str, list[str]]]
31
+ metadata_file: str
32
+
33
+ class BackupAgentClient:
34
+ sftp: SFTPClient
35
+ cfg: SFTPConfigEntry
36
+ hass: HomeAssistant
37
+ _ssh: SSHClientConnection | None
38
+ def __init__(self, config: SFTPConfigEntry, hass: HomeAssistant) -> None: ...
39
+ async def __aenter__(self) -> Self: ...
40
+ async def __aexit__(self, exc_type: type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None) -> None: ...
41
+ async def _load_metadata(self, backup_id: str) -> BackupMetadata: ...
42
+ async def async_delete_backup(self, backup_id: str) -> None: ...
43
+ async def async_list_backups(self) -> list[AgentBackup]: ...
44
+ async def async_upload_backup(self, iterator: AsyncIterator[bytes], backup: AgentBackup) -> None: ...
45
+ async def close(self) -> None: ...
46
+ async def iter_file(self, backup_id: str) -> AsyncFileIterator: ...
47
+ async def list_backup_location(self) -> list[str]: ...
48
+ async def open(self) -> BackupAgentClient: ...
@@ -0,0 +1,25 @@
1
+ from . import SFTPConfigEntryData as SFTPConfigEntryData
2
+ from .client import get_client_options as get_client_options
3
+ from .const import CONF_BACKUP_LOCATION as CONF_BACKUP_LOCATION, CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_PRIVATE_KEY_FILE as CONF_PRIVATE_KEY_FILE, CONF_USERNAME as CONF_USERNAME, DEFAULT_PKEY_NAME as DEFAULT_PKEY_NAME, DOMAIN as DOMAIN, LOGGER as LOGGER
4
+ from _typeshed import Incomplete
5
+ from homeassistant.components.file_upload import process_uploaded_file as process_uploaded_file
6
+ from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
7
+ from homeassistant.core import HomeAssistant as HomeAssistant
8
+ from homeassistant.helpers.selector import FileSelector as FileSelector, FileSelectorConfig as FileSelectorConfig, TextSelector as TextSelector, TextSelectorConfig as TextSelectorConfig, TextSelectorType as TextSelectorType
9
+ from homeassistant.helpers.storage import STORAGE_DIR as STORAGE_DIR
10
+ from homeassistant.util.ulid import ulid as ulid
11
+ from typing import Any
12
+
13
+ DATA_SCHEMA: Incomplete
14
+
15
+ class SFTPStorageException(Exception): ...
16
+ class SFTPStorageInvalidPrivateKey(SFTPStorageException): ...
17
+ class SFTPStorageMissingPasswordOrPkey(SFTPStorageException): ...
18
+
19
+ class SFTPFlowHandler(ConfigFlow, domain=DOMAIN):
20
+ _client_keys: list
21
+ def __init__(self) -> None: ...
22
+ async def _validate_auth_and_save_keyfile(self, user_input: dict[str, Any]) -> dict[str, Any]: ...
23
+ async def async_step_user(self, user_input: dict[str, Any] | None = None, step_id: str = 'user') -> ConfigFlowResult: ...
24
+
25
+ async def save_uploaded_pkey_file(hass: HomeAssistant, uploaded_file_id: str) -> str: ...
@@ -0,0 +1,16 @@
1
+ from _typeshed import Incomplete
2
+ from collections.abc import Callable as Callable
3
+ from homeassistant.util.hass_dict import HassKey as HassKey
4
+ from typing import Final
5
+
6
+ DOMAIN: Final[str]
7
+ LOGGER: Incomplete
8
+ CONF_HOST: Final[str]
9
+ CONF_PORT: Final[str]
10
+ CONF_USERNAME: Final[str]
11
+ CONF_PASSWORD: Final[str]
12
+ CONF_PRIVATE_KEY_FILE: Final[str]
13
+ CONF_BACKUP_LOCATION: Final[str]
14
+ BUF_SIZE: Incomplete
15
+ DATA_BACKUP_AGENT_LISTENERS: HassKey[list[Callable[[], None]]]
16
+ DEFAULT_PKEY_NAME: str
@@ -1,7 +1,7 @@
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 .repairs import async_manage_ble_scanner_firmware_unsupported_issue as async_manage_ble_scanner_firmware_unsupported_issue, async_manage_outbound_websocket_incorrectly_enabled_issue as async_manage_outbound_websocket_incorrectly_enabled_issue
4
- 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, remove_stale_blu_trv_devices as remove_stale_blu_trv_devices
3
+ from .repairs import async_manage_ble_scanner_firmware_unsupported_issue as async_manage_ble_scanner_firmware_unsupported_issue, async_manage_outbound_websocket_incorrectly_enabled_issue as async_manage_outbound_websocket_incorrectly_enabled_issue, async_manage_wall_display_firmware_unsupported_issue as async_manage_wall_display_firmware_unsupported_issue
4
+ 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, remove_empty_sub_devices as remove_empty_sub_devices, remove_stale_blu_trv_devices as remove_stale_blu_trv_devices
5
5
  from _typeshed import Incomplete
6
6
  from homeassistant.components.bluetooth import async_remove_scanner as async_remove_scanner
7
7
  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
@@ -1,7 +1,7 @@
1
1
  from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD
2
2
  from .coordinator import 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_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, 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, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, is_block_momentary_input as is_block_momentary_input, is_rpc_momentary_input as is_rpc_momentary_input, is_view_for_platform as is_view_for_platform
5
5
  from _typeshed import Incomplete
6
6
  from dataclasses import dataclass
7
7
  from homeassistant.components.binary_sensor import BinarySensorDeviceClass as BinarySensorDeviceClass, BinarySensorEntity as BinarySensorEntity, BinarySensorEntityDescription as BinarySensorEntityDescription
@@ -25,6 +25,10 @@ class RpcBinarySensor(ShellyRpcAttributeEntity, BinarySensorEntity):
25
25
  @property
26
26
  def is_on(self) -> bool: ...
27
27
 
28
+ class RpcPresenceBinarySensor(RpcBinarySensor):
29
+ @property
30
+ def available(self) -> bool: ...
31
+
28
32
  class RpcBluTrvBinarySensor(RpcBinarySensor):
29
33
  _attr_device_info: Incomplete
30
34
  def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcBinarySensorDescription) -> None: ...
@@ -1,7 +1,7 @@
1
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
3
  from .entity import get_entity_block_device_info as get_entity_block_device_info, get_entity_rpc_device_info as get_entity_rpc_device_info
4
- from .utils import get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids
4
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, format_ble_addr as format_ble_addr, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_rpc_entity_name as get_rpc_entity_name, get_rpc_key_ids as get_rpc_key_ids, get_virtual_component_ids as get_virtual_component_ids
5
5
  from _typeshed import Incomplete
6
6
  from collections.abc import Callable as Callable
7
7
  from dataclasses import dataclass
@@ -12,7 +12,6 @@ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
12
12
  from homeassistant.helpers import entity_registry as er
13
13
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
14
14
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
15
- from homeassistant.util import slugify as slugify
16
15
  from typing import Any, Final
17
16
 
18
17
  PARALLEL_UPDATES: int
@@ -24,6 +23,7 @@ class ShellyButtonDescription[_ShellyCoordinatorT: ShellyBlockCoordinator | Shel
24
23
 
25
24
  BUTTONS: Final[list[ShellyButtonDescription[Any]]]
26
25
  BLU_TRV_BUTTONS: Final[list[ShellyButtonDescription]]
26
+ VIRTUAL_BUTTONS: Final[list[ShellyButtonDescription]]
27
27
 
28
28
  @callback
29
29
  def async_migrate_unique_ids(coordinator: ShellyRpcCoordinator | ShellyBlockCoordinator, entity_entry: er.RegistryEntry) -> dict[str, Any] | None: ...
@@ -48,3 +48,11 @@ class ShellyBluTrvButton(ShellyBaseButton):
48
48
  _id: Incomplete
49
49
  def __init__(self, coordinator: ShellyRpcCoordinator, description: ShellyButtonDescription, id_: int) -> None: ...
50
50
  async def _press_method(self) -> None: ...
51
+
52
+ class ShellyVirtualButton(ShellyBaseButton):
53
+ _attr_unique_id: Incomplete
54
+ _attr_device_info: Incomplete
55
+ _attr_name: Incomplete
56
+ _id: Incomplete
57
+ def __init__(self, coordinator: ShellyRpcCoordinator, description: ShellyButtonDescription, _id: int) -> None: ...
58
+ async def _press_method(self) -> None: ...
@@ -1,7 +1,7 @@
1
1
  from _typeshed import Incomplete
2
2
  from enum import StrEnum
3
3
  from homeassistant.components.number import NumberMode as NumberMode
4
- from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass
4
+ from homeassistant.const import UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
5
5
  from logging import Logger
6
6
  from typing import Final
7
7
 
@@ -11,6 +11,7 @@ CONF_COAP_PORT: Final[str]
11
11
  FIRMWARE_PATTERN: Final[Incomplete]
12
12
  BLOCK_MAX_TRANSITION_TIME_MS: Final[int]
13
13
  RPC_MIN_TRANSITION_TIME_SEC: float
14
+ RPC_COVER_UPDATE_TIME_SEC: float
14
15
  RGBW_MODELS: Final[Incomplete]
15
16
  MOTION_MODELS: Final[Incomplete]
16
17
  MODELS_SUPPORTING_LIGHT_TRANSITION: Final[Incomplete]
@@ -62,12 +63,14 @@ class BLEScannerMode(StrEnum):
62
63
  PASSIVE = 'passive'
63
64
 
64
65
  BLE_SCANNER_MIN_FIRMWARE: str
66
+ WALL_DISPLAY_MIN_FIRMWARE: str
65
67
  MAX_PUSH_UPDATE_FAILURES: int
66
68
  PUSH_UPDATE_ISSUE_ID: str
67
69
  NOT_CALIBRATED_ISSUE_ID: str
68
70
  FIRMWARE_UNSUPPORTED_ISSUE_ID: str
69
71
  BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID: str
70
72
  OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID: str
73
+ WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID: str
71
74
  GAS_VALVE_OPEN_STATES: Incomplete
72
75
  OTA_BEGIN: str
73
76
  OTA_ERROR: str
@@ -83,6 +86,6 @@ VIRTUAL_COMPONENTS_MAP: Incomplete
83
86
  VIRTUAL_NUMBER_MODE_MAP: Incomplete
84
87
  API_WS_URL: str
85
88
  COMPONENT_ID_PATTERN: Incomplete
86
- ROLE_TO_DEVICE_CLASS_MAP: Incomplete
89
+ DEVICE_UNIT_MAP: Incomplete
87
90
  MAX_SCRIPT_SIZE: int
88
91
  All_LIGHT_TYPES: Incomplete
@@ -1,3 +1,5 @@
1
+ import asyncio
2
+ from .const import RPC_COVER_UPDATE_TIME_SEC as RPC_COVER_UPDATE_TIME_SEC
1
3
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
2
4
  from .entity import ShellyBlockEntity as ShellyBlockEntity, ShellyRpcEntity as ShellyRpcEntity
3
5
  from .utils import get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids
@@ -40,6 +42,7 @@ class RpcShellyCover(ShellyRpcEntity, CoverEntity):
40
42
  _attr_device_class: Incomplete
41
43
  _attr_supported_features: CoverEntityFeature
42
44
  _id: Incomplete
45
+ _update_task: asyncio.Task | None
43
46
  def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None: ...
44
47
  @property
45
48
  def is_closed(self) -> bool | None: ...
@@ -51,6 +54,9 @@ class RpcShellyCover(ShellyRpcEntity, CoverEntity):
51
54
  def is_closing(self) -> bool: ...
52
55
  @property
53
56
  def is_opening(self) -> bool: ...
57
+ def launch_update_task(self) -> None: ...
58
+ async def update_position(self) -> None: ...
59
+ def _update_callback(self) -> None: ...
54
60
  async def async_close_cover(self, **kwargs: Any) -> None: ...
55
61
  async def async_open_cover(self, **kwargs: Any) -> None: ...
56
62
  async def async_set_cover_position(self, **kwargs: Any) -> None: ...
@@ -37,7 +37,6 @@ class BlockEntityDescription(EntityDescription):
37
37
  value: Callable[[Any], Any] = ...
38
38
  available: Callable[[Block], bool] | None = ...
39
39
  removal_condition: Callable[[dict, Block], bool] | None = ...
40
- extra_state_attributes: Callable[[Block], dict | None] | None = ...
41
40
 
42
41
  @dataclass(frozen=True, kw_only=True)
43
42
  class RpcEntityDescription(EntityDescription):
@@ -51,6 +50,7 @@ class RpcEntityDescription(EntityDescription):
51
50
  unit: Callable[[dict], str | None] | None = ...
52
51
  options_fn: Callable[[dict], list[str]] | None = ...
53
52
  entity_class: Callable | None = ...
53
+ role: str | None = ...
54
54
 
55
55
  @dataclass(frozen=True)
56
56
  class RestEntityDescription(EntityDescription):
@@ -98,8 +98,6 @@ class ShellyBlockAttributeEntity(ShellyBlockEntity, Entity):
98
98
  def attribute_value(self) -> StateType: ...
99
99
  @property
100
100
  def available(self) -> bool: ...
101
- @property
102
- def extra_state_attributes(self) -> dict[str, Any] | None: ...
103
101
 
104
102
  class ShellyRestAttributeEntity(CoordinatorEntity[ShellyBlockCoordinator]):
105
103
  _attr_has_entity_name: bool
@@ -1,21 +1,20 @@
1
1
  from .const import BLOCK_MAX_TRANSITION_TIME_MS as BLOCK_MAX_TRANSITION_TIME_MS, DUAL_MODE_LIGHT_MODELS as DUAL_MODE_LIGHT_MODELS, KELVIN_MAX_VALUE as KELVIN_MAX_VALUE, KELVIN_MIN_VALUE_COLOR as KELVIN_MIN_VALUE_COLOR, KELVIN_MIN_VALUE_WHITE as KELVIN_MIN_VALUE_WHITE, LOGGER as LOGGER, MODELS_SUPPORTING_LIGHT_TRANSITION as MODELS_SUPPORTING_LIGHT_TRANSITION, RGBW_MODELS as RGBW_MODELS, RPC_MIN_TRANSITION_TIME_SEC as RPC_MIN_TRANSITION_TIME_SEC, SHBLB_1_RGB_EFFECTS as SHBLB_1_RGB_EFFECTS, STANDARD_RGB_EFFECTS as STANDARD_RGB_EFFECTS
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
3
- from .entity import ShellyBlockEntity as ShellyBlockEntity, ShellyRpcEntity as ShellyRpcEntity
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, brightness_to_percentage as brightness_to_percentage, get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids, is_block_channel_type_light as is_block_channel_type_light, is_rpc_channel_type_light as is_rpc_channel_type_light, percentage_to_brightness as percentage_to_brightness
3
+ from .entity import RpcEntityDescription as RpcEntityDescription, ShellyBlockEntity as ShellyBlockEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, 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, brightness_to_percentage as brightness_to_percentage, get_device_entry_gen as get_device_entry_gen, is_block_channel_type_light as is_block_channel_type_light, is_rpc_channel_type_light as is_rpc_channel_type_light, percentage_to_brightness as percentage_to_brightness
5
5
  from _typeshed import Incomplete
6
6
  from aioshelly.block_device import Block as Block
7
- from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP_KELVIN as ATTR_COLOR_TEMP_KELVIN, ATTR_EFFECT as ATTR_EFFECT, ATTR_RGBW_COLOR as ATTR_RGBW_COLOR, ATTR_RGB_COLOR as ATTR_RGB_COLOR, ATTR_TRANSITION as ATTR_TRANSITION, ColorMode as ColorMode, LightEntity as LightEntity, LightEntityFeature as LightEntityFeature, brightness_supported as brightness_supported
7
+ from dataclasses import dataclass
8
+ from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP_KELVIN as ATTR_COLOR_TEMP_KELVIN, ATTR_EFFECT as ATTR_EFFECT, ATTR_RGBW_COLOR as ATTR_RGBW_COLOR, ATTR_RGB_COLOR as ATTR_RGB_COLOR, ATTR_TRANSITION as ATTR_TRANSITION, ColorMode as ColorMode, LightEntity as LightEntity, LightEntityDescription as LightEntityDescription, LightEntityFeature as LightEntityFeature, brightness_supported as brightness_supported
8
9
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
9
10
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
10
- from typing import Any
11
+ from typing import Any, Final
11
12
 
12
13
  PARALLEL_UPDATES: int
13
14
 
14
15
  async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
15
16
  @callback
16
17
  def async_setup_block_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
17
- @callback
18
- def async_setup_rpc_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
19
18
 
20
19
  class BlockShellyLight(ShellyBlockEntity, LightEntity):
21
20
  _attr_supported_color_modes: set[str]
@@ -46,10 +45,14 @@ class BlockShellyLight(ShellyBlockEntity, LightEntity):
46
45
  @callback
47
46
  def _update_callback(self) -> None: ...
48
47
 
49
- class RpcShellyLightBase(ShellyRpcEntity, LightEntity):
48
+ @dataclass(frozen=True, kw_only=True)
49
+ class RpcLightDescription(RpcEntityDescription, LightEntityDescription): ...
50
+
51
+ class RpcShellyLightBase(ShellyRpcAttributeEntity, LightEntity):
52
+ entity_description: RpcLightDescription
50
53
  _component: str
51
- _id: Incomplete
52
- def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None: ...
54
+ _attr_unique_id: Incomplete
55
+ def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcEntityDescription) -> None: ...
53
56
  @property
54
57
  def is_on(self) -> bool: ...
55
58
  @property
@@ -79,7 +82,7 @@ class RpcShellyCctLight(RpcShellyLightBase):
79
82
  _attr_supported_features: Incomplete
80
83
  _attr_min_color_temp_kelvin: Incomplete
81
84
  _attr_max_color_temp_kelvin: Incomplete
82
- def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None: ...
85
+ def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcEntityDescription) -> None: ...
83
86
  @property
84
87
  def color_temp_kelvin(self) -> int: ...
85
88
 
@@ -94,3 +97,8 @@ class RpcShellyRgbwLight(RpcShellyLightBase):
94
97
  _attr_color_mode: Incomplete
95
98
  _attr_supported_color_modes: Incomplete
96
99
  _attr_supported_features: Incomplete
100
+
101
+ LIGHTS: Final[Incomplete]
102
+
103
+ @callback
104
+ def async_setup_rpc_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
@@ -1,7 +1,7 @@
1
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, rpc_call as rpc_call
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids
4
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, get_virtual_component_unit as get_virtual_component_unit, is_view_for_platform as is_view_for_platform
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 BLEScannerMode as BLEScannerMode, BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID as BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLE_SCANNER_MIN_FIRMWARE as BLE_SCANNER_MIN_FIRMWARE, CONF_BLE_SCANNER_MODE as CONF_BLE_SCANNER_MODE, DOMAIN as DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID as OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID
1
+ from .const import BLEScannerMode as BLEScannerMode, BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID as BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLE_SCANNER_MIN_FIRMWARE as BLE_SCANNER_MIN_FIRMWARE, CONF_BLE_SCANNER_MODE as CONF_BLE_SCANNER_MODE, DOMAIN as DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID as OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID, WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID as WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID, WALL_DISPLAY_MIN_FIRMWARE as WALL_DISPLAY_MIN_FIRMWARE
2
2
  from .coordinator import ShellyConfigEntry as ShellyConfigEntry
3
3
  from .utils import get_rpc_ws_url as get_rpc_ws_url
4
4
  from _typeshed import Incomplete
@@ -10,6 +10,8 @@ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callb
10
10
  @callback
11
11
  def async_manage_ble_scanner_firmware_unsupported_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
12
12
  @callback
13
+ def async_manage_wall_display_firmware_unsupported_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
14
+ @callback
13
15
  def async_manage_outbound_websocket_incorrectly_enabled_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
14
16
 
15
17
  class ShellyRpcRepairsFlow(RepairsFlow):
@@ -19,7 +21,7 @@ class ShellyRpcRepairsFlow(RepairsFlow):
19
21
  async def async_step_confirm(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
20
22
  async def _async_step_confirm(self) -> data_entry_flow.FlowResult: ...
21
23
 
22
- class BleScannerFirmwareUpdateFlow(ShellyRpcRepairsFlow):
24
+ class FirmwareUpdateFlow(ShellyRpcRepairsFlow):
23
25
  async def _async_step_confirm(self) -> data_entry_flow.FlowResult: ...
24
26
  async def async_step_update_firmware(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
25
27
 
@@ -1,6 +1,6 @@
1
1
  from .coordinator import ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
2
2
  from .entity import RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, async_setup_entry_rpc as async_setup_entry_rpc, rpc_call as rpc_call
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
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_view_for_platform as is_view_for_platform
4
4
  from _typeshed import Incomplete
5
5
  from dataclasses import dataclass
6
6
  from homeassistant.components.select import SelectEntity as SelectEntity, SelectEntityDescription as SelectEntityDescription
@@ -1,18 +1,18 @@
1
- from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, ROLE_TO_DEVICE_CLASS_MAP as ROLE_TO_DEVICE_CLASS_MAP
1
+ from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, LOGGER as LOGGER
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, get_entity_rpc_device_info as get_entity_rpc_device_info
4
- from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, 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
4
+ from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, 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_unit as get_virtual_component_unit, is_rpc_wifi_stations_disabled as is_rpc_wifi_stations_disabled, is_view_for_platform as is_view_for_platform
5
5
  from _typeshed import Incomplete
6
6
  from aioshelly.block_device import Block as Block
7
- from collections.abc import Callable as Callable
8
7
  from dataclasses import dataclass
9
8
  from homeassistant.components.sensor import RestoreSensor as RestoreSensor, SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorExtraStoredData as SensorExtraStoredData, SensorStateClass as SensorStateClass
10
- from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, EntityCategory as EntityCategory, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfPower as UnitOfPower, UnitOfTemperature as UnitOfTemperature
11
- from homeassistant.core import HomeAssistant as HomeAssistant
9
+ from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, EntityCategory as EntityCategory, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfPower as UnitOfPower, UnitOfPressure as UnitOfPressure, UnitOfTemperature as UnitOfTemperature, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
10
+ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
11
+ from homeassistant.helpers import entity_registry as er
12
12
  from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
13
13
  from homeassistant.helpers.entity_registry import RegistryEntry as RegistryEntry
14
14
  from homeassistant.helpers.typing import StateType as StateType
15
- from typing import Final
15
+ from typing import Any, Final
16
16
 
17
17
  PARALLEL_UPDATES: int
18
18
 
@@ -21,7 +21,6 @@ class BlockSensorDescription(BlockEntityDescription, SensorEntityDescription): .
21
21
 
22
22
  @dataclass(frozen=True, kw_only=True)
23
23
  class RpcSensorDescription(RpcEntityDescription, SensorEntityDescription):
24
- device_class_fn: Callable[[dict], SensorDeviceClass | None] | None = ...
25
24
  emeter_phase: str | None = ...
26
25
 
27
26
  @dataclass(frozen=True, kw_only=True)
@@ -30,11 +29,14 @@ class RestSensorDescription(RestEntityDescription, SensorEntityDescription): ...
30
29
  class RpcSensor(ShellyRpcAttributeEntity, SensorEntity):
31
30
  entity_description: RpcSensorDescription
32
31
  _attr_options: Incomplete
33
- _attr_device_class: Incomplete
34
32
  def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcSensorDescription) -> None: ...
35
33
  @property
36
34
  def native_value(self) -> StateType: ...
37
35
 
36
+ class RpcPresenceSensor(RpcSensor):
37
+ @property
38
+ def available(self) -> bool: ...
39
+
38
40
  class RpcEmeterPhaseSensor(RpcSensor):
39
41
  entity_description: RpcSensorDescription
40
42
  _attr_device_info: Incomplete
@@ -48,6 +50,8 @@ SENSORS: dict[tuple[str, str], BlockSensorDescription]
48
50
  REST_SENSORS: Final[Incomplete]
49
51
  RPC_SENSORS: Final[Incomplete]
50
52
 
53
+ @callback
54
+ def async_migrate_unique_ids(coordinator: ShellyRpcCoordinator, entity_entry: er.RegistryEntry) -> dict[str, Any] | None: ...
51
55
  async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
52
56
 
53
57
  class BlockSensor(ShellyBlockAttributeEntity, SensorEntity):
@@ -1,6 +1,6 @@
1
1
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
2
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
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, is_view_for_platform as is_view_for_platform
4
4
  from _typeshed import Incomplete
5
5
  from aioshelly.block_device import Block as Block
6
6
  from collections.abc import Callable as Callable
@@ -1,6 +1,6 @@
1
1
  from .coordinator import ShellyConfigEntry as ShellyConfigEntry
2
2
  from .entity import RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, async_setup_entry_rpc as async_setup_entry_rpc, rpc_call as rpc_call
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
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_view_for_platform as is_view_for_platform
4
4
  from _typeshed import Incomplete
5
5
  from dataclasses import dataclass
6
6
  from homeassistant.components.text import TextEntity as TextEntity, TextEntityDescription as TextEntityDescription