homeassistant-stubs 2024.2.5__py3-none-any.whl → 2024.3.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.
Files changed (275) hide show
  1. homeassistant-stubs/bootstrap.pyi +20 -4
  2. homeassistant-stubs/components/aftership/const.pyi +0 -1
  3. homeassistant-stubs/components/aftership/sensor.pyi +2 -2
  4. homeassistant-stubs/components/airthings_ble/config_flow.pyi +1 -0
  5. homeassistant-stubs/components/airzone_cloud/sensor.pyi +1 -1
  6. homeassistant-stubs/components/alexa/config.pyi +2 -0
  7. homeassistant-stubs/components/amberelectric/sensor.pyi +0 -1
  8. homeassistant-stubs/components/androidtv/entity.pyi +30 -0
  9. homeassistant-stubs/components/androidtv/media_player.pyi +5 -23
  10. homeassistant-stubs/components/anthemav/media_player.pyi +0 -1
  11. homeassistant-stubs/components/apple_tv/__init__.pyi +68 -0
  12. homeassistant-stubs/components/apple_tv/browse_media.pyi +5 -0
  13. homeassistant-stubs/components/apple_tv/config_flow.pyi +63 -0
  14. homeassistant-stubs/components/apple_tv/const.pyi +4 -0
  15. homeassistant-stubs/components/apple_tv/media_player.pyi +93 -0
  16. homeassistant-stubs/components/apple_tv/remote.pyi +23 -0
  17. homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
  18. homeassistant-stubs/components/assist_pipeline/const.pyi +1 -1
  19. homeassistant-stubs/components/assist_pipeline/error.pyi +4 -0
  20. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +5 -5
  21. homeassistant-stubs/components/asterisk_mbox/__init__.pyi +1 -0
  22. homeassistant-stubs/components/asuswrt/router.pyi +1 -1
  23. homeassistant-stubs/components/auth/__init__.pyi +2 -2
  24. homeassistant-stubs/components/automation/__init__.pyi +2 -1
  25. homeassistant-stubs/components/axis/binary_sensor.pyi +4 -0
  26. homeassistant-stubs/components/backup/manager.pyi +5 -3
  27. homeassistant-stubs/components/backup/websocket.pyi +4 -2
  28. homeassistant-stubs/components/blue_current/__init__.pyi +4 -3
  29. homeassistant-stubs/components/blue_current/entity.pyi +5 -2
  30. homeassistant-stubs/components/bluetooth/manager.pyi +2 -2
  31. homeassistant-stubs/components/bluetooth/match.pyi +3 -0
  32. homeassistant-stubs/components/bmw_connected_drive/device_tracker.pyi +1 -0
  33. homeassistant-stubs/components/braviatv/coordinator.pyi +2 -0
  34. homeassistant-stubs/components/braviatv/media_player.pyi +5 -0
  35. homeassistant-stubs/components/brother/sensor.pyi +3 -3
  36. homeassistant-stubs/components/camera/media_source.pyi +1 -0
  37. homeassistant-stubs/components/cert_expiry/sensor.pyi +0 -1
  38. homeassistant-stubs/components/climate/__init__.pyi +3 -1
  39. homeassistant-stubs/components/cloud/const.pyi +2 -0
  40. homeassistant-stubs/components/cloud/google_config.pyi +7 -5
  41. homeassistant-stubs/components/cloud/http_api.pyi +1 -1
  42. homeassistant-stubs/components/cloud/prefs.pyi +6 -2
  43. homeassistant-stubs/components/cloud/tts.pyi +3 -2
  44. homeassistant-stubs/components/config/area_registry.pyi +1 -1
  45. homeassistant-stubs/components/config/auth.pyi +2 -2
  46. homeassistant-stubs/components/config/auth_provider_homeassistant.pyi +2 -2
  47. homeassistant-stubs/components/config/automation.pyi +2 -2
  48. homeassistant-stubs/components/config/config_entries.pyi +5 -4
  49. homeassistant-stubs/components/config/core.pyi +2 -2
  50. homeassistant-stubs/components/config/device_registry.pyi +1 -1
  51. homeassistant-stubs/components/config/entity_registry.pyi +1 -1
  52. homeassistant-stubs/components/config/floor_registry.pyi +12 -0
  53. homeassistant-stubs/components/config/label_registry.pyi +12 -0
  54. homeassistant-stubs/components/config/scene.pyi +2 -2
  55. homeassistant-stubs/components/config/script.pyi +2 -2
  56. homeassistant-stubs/components/cover/intent.pyi +2 -2
  57. homeassistant-stubs/components/cpuspeed/sensor.pyi +0 -1
  58. homeassistant-stubs/components/crownstone/light.pyi +1 -1
  59. homeassistant-stubs/components/demo/fan.pyi +1 -0
  60. homeassistant-stubs/components/dhcp/__init__.pyi +24 -32
  61. homeassistant-stubs/components/dlna_dmr/media_player.pyi +8 -3
  62. homeassistant-stubs/components/dnsip/sensor.pyi +1 -1
  63. homeassistant-stubs/components/dunehd/media_player.pyi +5 -2
  64. homeassistant-stubs/components/ecovacs/binary_sensor.pyi +3 -3
  65. homeassistant-stubs/components/ecovacs/button.pyi +5 -5
  66. homeassistant-stubs/components/ecovacs/controller.pyi +6 -3
  67. homeassistant-stubs/components/ecovacs/entity.pyi +11 -9
  68. homeassistant-stubs/components/ecovacs/image.pyi +2 -2
  69. homeassistant-stubs/components/ecovacs/lawn_mower.pyi +28 -0
  70. homeassistant-stubs/components/ecovacs/number.pyi +3 -3
  71. homeassistant-stubs/components/ecovacs/select.pyi +3 -3
  72. homeassistant-stubs/components/ecovacs/sensor.pyi +6 -6
  73. homeassistant-stubs/components/ecovacs/switch.pyi +4 -4
  74. homeassistant-stubs/components/ecovacs/vacuum.pyi +3 -3
  75. homeassistant-stubs/components/emulated_hue/config.pyi +1 -1
  76. homeassistant-stubs/components/enphase_envoy/sensor.pyi +39 -4
  77. homeassistant-stubs/components/esphome/bluetooth.pyi +1 -1
  78. homeassistant-stubs/components/esphome/camera.pyi +2 -2
  79. homeassistant-stubs/components/esphome/entry_data.pyi +3 -5
  80. homeassistant-stubs/components/esphome/manager.pyi +6 -7
  81. homeassistant-stubs/components/esphome/sensor.pyi +4 -2
  82. homeassistant-stubs/components/esphome/update.pyi +0 -1
  83. homeassistant-stubs/components/esphome/voice_assistant.pyi +1 -1
  84. homeassistant-stubs/components/fastdotcom/sensor.pyi +0 -1
  85. homeassistant-stubs/components/filesize/sensor.pyi +0 -1
  86. homeassistant-stubs/components/flexit_bacnet/climate.pyi +4 -2
  87. homeassistant-stubs/components/flexit_bacnet/number.pyi +31 -0
  88. homeassistant-stubs/components/fritz/common.pyi +2 -1
  89. homeassistant-stubs/components/fully_kiosk/media_player.pyi +2 -1
  90. homeassistant-stubs/components/generic_thermostat/climate.pyi +1 -1
  91. homeassistant-stubs/components/goalzero/__init__.pyi +1 -0
  92. homeassistant-stubs/components/gpsd/sensor.pyi +15 -9
  93. homeassistant-stubs/components/group/__init__.pyi +1 -1
  94. homeassistant-stubs/components/group/light.pyi +3 -3
  95. homeassistant-stubs/components/hardkernel/__init__.pyi +1 -1
  96. homeassistant-stubs/components/hardware/hardware.pyi +2 -2
  97. homeassistant-stubs/components/hardware/websocket_api.pyi +1 -1
  98. homeassistant-stubs/components/homeassistant_green/__init__.pyi +1 -1
  99. homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +2 -1
  100. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +3 -2
  101. homeassistant-stubs/components/homekit/__init__.pyi +1 -1
  102. homeassistant-stubs/components/homekit/accessories.pyi +1 -1
  103. homeassistant-stubs/components/homekit/config_flow.pyi +13 -4
  104. homeassistant-stubs/components/homekit/type_cameras.pyi +1 -1
  105. homeassistant-stubs/components/homekit/type_covers.pyi +1 -1
  106. homeassistant-stubs/components/homekit/type_humidifiers.pyi +1 -1
  107. homeassistant-stubs/components/homekit/type_triggers.pyi +3 -1
  108. homeassistant-stubs/components/homekit_controller/alarm_control_panel.pyi +0 -1
  109. homeassistant-stubs/components/homekit_controller/button.pyi +8 -4
  110. homeassistant-stubs/components/homekit_controller/utils.pyi +4 -0
  111. homeassistant-stubs/components/huawei_lte/binary_sensor.pyi +0 -6
  112. homeassistant-stubs/components/huawei_lte/switch.pyi +0 -4
  113. homeassistant-stubs/components/idasen_desk/sensor.pyi +2 -1
  114. homeassistant-stubs/components/image/__init__.pyi +13 -3
  115. homeassistant-stubs/components/image/media_source.pyi +18 -0
  116. homeassistant-stubs/components/imap/coordinator.pyi +8 -0
  117. homeassistant-stubs/components/imap/diagnostics.pyi +13 -0
  118. homeassistant-stubs/components/intent/__init__.pyi +1 -0
  119. homeassistant-stubs/components/islamic_prayer_times/config_flow.pyi +1 -1
  120. homeassistant-stubs/components/knx/config_flow.pyi +1 -1
  121. homeassistant-stubs/components/knx/schema.pyi +3 -18
  122. homeassistant-stubs/components/knx/validation.pyi +19 -0
  123. homeassistant-stubs/components/lamarzocco/calendar.pyi +21 -0
  124. homeassistant-stubs/components/lamarzocco/entity.pyi +7 -4
  125. homeassistant-stubs/components/lamarzocco/number.pyi +26 -1
  126. homeassistant-stubs/components/light/__init__.pyi +3 -0
  127. homeassistant-stubs/components/local_todo/todo.pyi +3 -1
  128. homeassistant-stubs/components/logbook/__init__.pyi +1 -1
  129. homeassistant-stubs/components/logbook/helpers.pyi +2 -2
  130. homeassistant-stubs/components/logbook/models.pyi +2 -2
  131. homeassistant-stubs/components/mailbox/__init__.pyi +1 -0
  132. homeassistant-stubs/components/matter/light.pyi +6 -5
  133. homeassistant-stubs/components/media_player/intent.pyi +11 -0
  134. homeassistant-stubs/components/modbus/__init__.pyi +1 -1
  135. homeassistant-stubs/components/modbus/climate.pyi +1 -0
  136. homeassistant-stubs/components/modbus/validators.pyi +4 -4
  137. homeassistant-stubs/components/mqtt/__init__.pyi +3 -3
  138. homeassistant-stubs/components/mqtt/climate.pyi +1 -8
  139. homeassistant-stubs/components/mqtt/const.pyi +2 -0
  140. homeassistant-stubs/components/mqtt/event.pyi +1 -1
  141. homeassistant-stubs/components/mqtt/image.pyi +1 -1
  142. homeassistant-stubs/components/mqtt/mixins.pyi +2 -2
  143. homeassistant-stubs/components/mqtt/models.pyi +10 -0
  144. homeassistant-stubs/components/mqtt/tag.pyi +1 -1
  145. homeassistant-stubs/components/myuplink/__init__.pyi +2 -1
  146. homeassistant-stubs/components/myuplink/binary_sensor.pyi +24 -0
  147. homeassistant-stubs/components/myuplink/config_flow.pyi +7 -0
  148. homeassistant-stubs/components/myuplink/coordinator.pyi +1 -2
  149. homeassistant-stubs/components/myuplink/diagnostics.pyi +11 -0
  150. homeassistant-stubs/components/myuplink/helpers.pyi +6 -0
  151. homeassistant-stubs/components/myuplink/number.pyi +30 -0
  152. homeassistant-stubs/components/myuplink/sensor.pyi +20 -3
  153. homeassistant-stubs/components/myuplink/switch.pyi +29 -0
  154. homeassistant-stubs/components/myuplink/update.pyi +20 -0
  155. homeassistant-stubs/components/notion/__init__.pyi +10 -6
  156. homeassistant-stubs/components/notion/config_flow.pyi +11 -3
  157. homeassistant-stubs/components/notion/const.pyi +2 -0
  158. homeassistant-stubs/components/notion/diagnostics.pyi +2 -2
  159. homeassistant-stubs/components/notion/model.pyi +1 -1
  160. homeassistant-stubs/components/notion/util.pyi +7 -0
  161. homeassistant-stubs/components/rainmachine/util.pyi +1 -1
  162. homeassistant-stubs/components/raspberry_pi/__init__.pyi +1 -1
  163. homeassistant-stubs/components/recorder/__init__.pyi +1 -1
  164. homeassistant-stubs/components/recorder/core.pyi +1 -0
  165. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -5
  166. homeassistant-stubs/components/repairs/issue_handler.pyi +1 -1
  167. homeassistant-stubs/components/rfxtrx/__init__.pyi +3 -1
  168. homeassistant-stubs/components/samsungtv/__init__.pyi +1 -1
  169. homeassistant-stubs/components/samsungtv/config_flow.pyi +1 -0
  170. homeassistant-stubs/components/sensor/recorder.pyi +0 -2
  171. homeassistant-stubs/components/shelly/binary_sensor.pyi +1 -1
  172. homeassistant-stubs/components/shelly/button.pyi +1 -1
  173. homeassistant-stubs/components/shelly/climate.pyi +1 -3
  174. homeassistant-stubs/components/shelly/entity.pyi +1 -2
  175. homeassistant-stubs/components/shelly/number.pyi +1 -1
  176. homeassistant-stubs/components/shelly/sensor.pyi +2 -2
  177. homeassistant-stubs/components/shelly/switch.pyi +4 -5
  178. homeassistant-stubs/components/shelly/utils.pyi +2 -0
  179. homeassistant-stubs/components/shelly/valve.pyi +1 -1
  180. homeassistant-stubs/components/ssdp/__init__.pyi +1 -0
  181. homeassistant-stubs/components/statistics/sensor.pyi +4 -1
  182. homeassistant-stubs/components/system_health/__init__.pyi +1 -1
  183. homeassistant-stubs/components/systemmonitor/__init__.pyi +3 -0
  184. homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +48 -0
  185. homeassistant-stubs/components/systemmonitor/config_flow.pyi +2 -0
  186. homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
  187. homeassistant-stubs/components/systemmonitor/coordinator.pyi +14 -10
  188. homeassistant-stubs/components/systemmonitor/diagnostics.pyi +7 -0
  189. homeassistant-stubs/components/systemmonitor/repairs.pyi +15 -0
  190. homeassistant-stubs/components/systemmonitor/sensor.pyi +5 -4
  191. homeassistant-stubs/components/systemmonitor/util.pyi +6 -5
  192. homeassistant-stubs/components/technove/helpers.pyi +9 -0
  193. homeassistant-stubs/components/technove/switch.pyi +33 -0
  194. homeassistant-stubs/components/tedee/config_flow.pyi +1 -0
  195. homeassistant-stubs/components/tedee/sensor.pyi +1 -1
  196. homeassistant-stubs/components/tibber/sensor.pyi +3 -4
  197. homeassistant-stubs/components/tplink/config_flow.pyi +2 -2
  198. homeassistant-stubs/components/tplink/light.pyi +1 -0
  199. homeassistant-stubs/components/tplink_omada/binary_sensor.pyi +2 -2
  200. homeassistant-stubs/components/tplink_omada/config_flow.pyi +1 -1
  201. homeassistant-stubs/components/tplink_omada/controller.pyi +1 -1
  202. homeassistant-stubs/components/tplink_omada/coordinator.pyi +1 -1
  203. homeassistant-stubs/components/tplink_omada/update.pyi +1 -1
  204. homeassistant-stubs/components/tractive/device_tracker.pyi +0 -1
  205. homeassistant-stubs/components/unifi/__init__.pyi +1 -1
  206. homeassistant-stubs/components/unifi/button.pyi +1 -1
  207. homeassistant-stubs/components/unifi/config_flow.pyi +2 -2
  208. homeassistant-stubs/components/unifi/device_tracker.pyi +6 -6
  209. homeassistant-stubs/components/unifi/diagnostics.pyi +1 -1
  210. homeassistant-stubs/components/unifi/entity.pyi +13 -13
  211. homeassistant-stubs/components/unifi/hub/__init__.pyi +2 -0
  212. homeassistant-stubs/components/unifi/hub/api.pyi +10 -0
  213. homeassistant-stubs/components/unifi/{controller.pyi → hub/hub.pyi} +9 -19
  214. homeassistant-stubs/components/unifi/hub/websocket.pyi +25 -0
  215. homeassistant-stubs/components/unifi/image.pyi +4 -4
  216. homeassistant-stubs/components/unifi/sensor.pyi +14 -14
  217. homeassistant-stubs/components/unifi/switch.pyi +14 -14
  218. homeassistant-stubs/components/unifi/update.pyi +1 -1
  219. homeassistant-stubs/components/unifiprotect/__init__.pyi +1 -1
  220. homeassistant-stubs/components/unifiprotect/const.pyi +1 -0
  221. homeassistant-stubs/components/unifiprotect/data.pyi +3 -2
  222. homeassistant-stubs/components/unifiprotect/media_source.pyi +6 -3
  223. homeassistant-stubs/components/unifiprotect/repairs.pyi +8 -2
  224. homeassistant-stubs/components/usb/__init__.pyi +1 -1
  225. homeassistant-stubs/components/vacuum/intent.pyi +8 -0
  226. homeassistant-stubs/components/vallox/__init__.pyi +5 -23
  227. homeassistant-stubs/components/vallox/fan.pyi +1 -1
  228. homeassistant-stubs/components/valve/intent.pyi +6 -0
  229. homeassistant-stubs/components/wake_word/models.pyi +4 -2
  230. homeassistant-stubs/components/water_heater/__init__.pyi +2 -0
  231. homeassistant-stubs/components/websocket_api/http.pyi +1 -0
  232. homeassistant-stubs/components/wiz/light.pyi +3 -2
  233. homeassistant-stubs/components/xiaomi_ble/const.pyi +9 -0
  234. homeassistant-stubs/components/xiaomi_ble/device_trigger.pyi +1 -1
  235. homeassistant-stubs/components/xiaomi_ble/event.pyi +1 -1
  236. homeassistant-stubs/components/yalexs_ble/__init__.pyi +1 -1
  237. homeassistant-stubs/components/yalexs_ble/config_flow.pyi +1 -1
  238. homeassistant-stubs/components/zwave_js/climate.pyi +4 -0
  239. homeassistant-stubs/components/zwave_js/sensor.pyi +0 -1
  240. homeassistant-stubs/config.pyi +4 -2
  241. homeassistant-stubs/config_entries.pyi +38 -22
  242. homeassistant-stubs/core.pyi +8 -7
  243. homeassistant-stubs/data_entry_flow.pyi +1 -0
  244. homeassistant-stubs/helpers/area_registry.pyi +9 -4
  245. homeassistant-stubs/helpers/collection.pyi +19 -0
  246. homeassistant-stubs/helpers/config_validation.pyi +4 -0
  247. homeassistant-stubs/helpers/data_entry_flow.pyi +2 -1
  248. homeassistant-stubs/helpers/debounce.pyi +3 -1
  249. homeassistant-stubs/helpers/device_registry.pyi +13 -6
  250. homeassistant-stubs/helpers/entity.pyi +4 -2
  251. homeassistant-stubs/helpers/entity_component.pyi +1 -1
  252. homeassistant-stubs/helpers/entity_platform.pyi +7 -3
  253. homeassistant-stubs/helpers/entity_registry.pyi +10 -4
  254. homeassistant-stubs/helpers/event.pyi +28 -2
  255. homeassistant-stubs/helpers/floor_registry.pyi +59 -0
  256. homeassistant-stubs/helpers/icon.pyi +1 -1
  257. homeassistant-stubs/helpers/integration_platform.pyi +12 -8
  258. homeassistant-stubs/helpers/intent.pyi +8 -2
  259. homeassistant-stubs/helpers/json.pyi +1 -0
  260. homeassistant-stubs/helpers/label_registry.pyi +59 -0
  261. homeassistant-stubs/helpers/redact.pyi +13 -0
  262. homeassistant-stubs/helpers/service.pyi +1 -0
  263. homeassistant-stubs/helpers/storage.pyi +7 -3
  264. homeassistant-stubs/helpers/template.pyi +7 -0
  265. homeassistant-stubs/helpers/translation.pyi +18 -4
  266. homeassistant-stubs/helpers/update_coordinator.pyi +1 -0
  267. homeassistant-stubs/loader.pyi +24 -11
  268. homeassistant-stubs/setup.pyi +9 -3
  269. homeassistant-stubs/util/async_.pyi +3 -3
  270. homeassistant-stubs/util/file.pyi +2 -2
  271. homeassistant-stubs/util/yaml/loader.pyi +3 -0
  272. {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/METADATA +2 -2
  273. {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/RECORD +275 -239
  274. {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/LICENSE +0 -0
  275. {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/WHEEL +0 -0
@@ -1,7 +1,7 @@
1
1
  from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, SHAIR_MAX_WORK_HOURS as SHAIR_MAX_WORK_HOURS
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, 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 get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime
4
+ from .utils import get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime, 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 dataclasses import dataclass
@@ -16,7 +16,7 @@ from typing import Final
16
16
 
17
17
  @dataclass(frozen=True)
18
18
  class BlockSensorDescription(BlockEntityDescription, SensorEntityDescription):
19
- def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, icon_fn, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
19
+ def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
20
20
 
21
21
  @dataclass(frozen=True)
22
22
  class RpcSensorDescription(RpcEntityDescription, SensorEntityDescription):
@@ -1,7 +1,7 @@
1
- from .const import DOMAIN as DOMAIN, GAS_VALVE_OPEN_STATES as GAS_VALVE_OPEN_STATES, MODEL_WALL_DISPLAY as MODEL_WALL_DISPLAY
1
+ from .const import DOMAIN as DOMAIN, GAS_VALVE_OPEN_STATES as GAS_VALVE_OPEN_STATES
2
2
  from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyRpcCoordinator as ShellyRpcCoordinator, get_entry_data as get_entry_data
3
3
  from .entity import BlockEntityDescription as BlockEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyBlockEntity as ShellyBlockEntity, ShellyRpcEntity as ShellyRpcEntity, async_setup_block_attribute_entities as async_setup_block_attribute_entities
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_block_channel_type_light as is_block_channel_type_light, is_rpc_channel_type_light as is_rpc_channel_type_light
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_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
5
5
  from _typeshed import Incomplete
6
6
  from aioshelly.block_device import Block as Block
7
7
  from dataclasses import dataclass
@@ -16,7 +16,7 @@ from typing import Any
16
16
 
17
17
  @dataclass(frozen=True)
18
18
  class BlockSwitchDescription(BlockEntityDescription, SwitchEntityDescription):
19
- def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, icon_fn, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
19
+ def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
20
20
 
21
21
  GAS_VALVE_SWITCH: Incomplete
22
22
 
@@ -26,12 +26,11 @@ def async_setup_rpc_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_
26
26
 
27
27
  class BlockValveSwitch(ShellyBlockAttributeEntity, SwitchEntity):
28
28
  entity_description: BlockSwitchDescription
29
+ _attr_translation_key: str
29
30
  control_result: Incomplete
30
31
  def __init__(self, coordinator: ShellyBlockCoordinator, block: Block, attribute: str, description: BlockSwitchDescription) -> None: ...
31
32
  @property
32
33
  def is_on(self) -> bool: ...
33
- @property
34
- def icon(self) -> str: ...
35
34
  async def async_turn_on(self, **kwargs: Any) -> None: ...
36
35
  async def async_turn_off(self, **kwargs: Any) -> None: ...
37
36
  async def async_added_to_hass(self) -> None: ...
@@ -45,6 +45,7 @@ def get_rpc_key_ids(keys_dict: dict[str, Any], key: str) -> list[int]: ...
45
45
  def is_rpc_momentary_input(config: dict[str, Any], status: dict[str, Any], key: str) -> bool: ...
46
46
  def is_block_channel_type_light(settings: dict[str, Any], channel: int) -> bool: ...
47
47
  def is_rpc_channel_type_light(config: dict[str, Any], channel: int) -> bool: ...
48
+ def is_rpc_thermostat_internal_actuator(status: dict[str, Any]) -> bool: ...
48
49
  def get_rpc_input_triggers(device: RpcDevice) -> list[tuple[str, str]]: ...
49
50
  def update_device_fw_info(hass: HomeAssistant, shellydevice: BlockDevice | RpcDevice, entry: ConfigEntry) -> None: ...
50
51
  def brightness_to_percentage(brightness: int) -> int: ...
@@ -52,3 +53,4 @@ def percentage_to_brightness(percentage: int) -> int: ...
52
53
  def mac_address_from_name(name: str) -> str | None: ...
53
54
  def get_release_url(gen: int, model: str, beta: bool) -> str | None: ...
54
55
  def async_create_issue_unsupported_firmware(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
56
+ def is_rpc_wifi_stations_disabled(config: dict[str, Any], _status: dict[str, Any], key: str) -> bool: ...
@@ -12,7 +12,7 @@ from typing import Any
12
12
 
13
13
  @dataclass(kw_only=True, frozen=True)
14
14
  class BlockValveDescription(BlockEntityDescription, ValveEntityDescription):
15
- def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, reports_position, icon_fn, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
15
+ def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, reports_position, unit_fn, value, available, removal_condition, extra_state_attributes) -> None: ...
16
16
 
17
17
  GAS_VALVE: Incomplete
18
18
 
@@ -17,6 +17,7 @@ from homeassistant.helpers.network import NoURLAvailableError as NoURLAvailableE
17
17
  from homeassistant.helpers.system_info import async_get_system_info as async_get_system_info
18
18
  from homeassistant.helpers.typing import ConfigType as ConfigType
19
19
  from homeassistant.loader import async_get_ssdp as async_get_ssdp, bind_hass as bind_hass
20
+ from homeassistant.util.async_ import create_eager_task as create_eager_task
20
21
  from ipaddress import IPv4Address, IPv6Address
21
22
  from typing import Any
22
23
 
@@ -56,6 +56,7 @@ STATS_BINARY_PERCENTAGE: Incomplete
56
56
  CONF_STATE_CHARACTERISTIC: str
57
57
  CONF_SAMPLES_MAX_BUFFER_SIZE: str
58
58
  CONF_MAX_AGE: str
59
+ CONF_KEEP_LAST_SAMPLE: str
59
60
  CONF_PRECISION: str
60
61
  CONF_PERCENTILE: str
61
62
  DEFAULT_NAME: str
@@ -64,6 +65,7 @@ ICON: str
64
65
 
65
66
  def valid_state_characteristic_configuration(config: dict[str, Any]) -> dict[str, Any]: ...
66
67
  def valid_boundary_configuration(config: dict[str, Any]) -> dict[str, Any]: ...
68
+ def valid_keep_last_sample(config: dict[str, Any]) -> dict[str, Any]: ...
67
69
 
68
70
  _PLATFORM_SCHEMA_BASE: Incomplete
69
71
 
@@ -79,6 +81,7 @@ class StatisticsSensor(SensorEntity):
79
81
  _state_characteristic: Incomplete
80
82
  _samples_max_buffer_size: Incomplete
81
83
  _samples_max_age: Incomplete
84
+ samples_keep_last: Incomplete
82
85
  _precision: Incomplete
83
86
  _percentile: Incomplete
84
87
  _value: Incomplete
@@ -89,7 +92,7 @@ class StatisticsSensor(SensorEntity):
89
92
  attributes: Incomplete
90
93
  _state_characteristic_fn: Incomplete
91
94
  _update_listener: Incomplete
92
- def __init__(self, source_entity_id: str, name: str, unique_id: str | None, state_characteristic: str, samples_max_buffer_size: int | None, samples_max_age: timedelta | None, precision: int, percentile: int) -> None: ...
95
+ def __init__(self, source_entity_id: str, name: str, unique_id: str | None, state_characteristic: str, samples_max_buffer_size: int | None, samples_max_age: timedelta | None, samples_keep_last: bool, precision: int, percentile: int) -> None: ...
93
96
  async def async_added_to_hass(self) -> None: ...
94
97
  def _add_state_to_queue(self, new_state: State) -> None: ...
95
98
  def _derive_unit_of_measurement(self, new_state: State) -> str | None: ...
@@ -18,7 +18,7 @@ class SystemHealthProtocol(Protocol):
18
18
 
19
19
  def async_register_info(hass: HomeAssistant, domain: str, info_callback: Callable[[HomeAssistant], Awaitable[dict]]) -> None: ...
20
20
  async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
21
- async def _register_system_health_platform(hass: HomeAssistant, integration_domain: str, platform: SystemHealthProtocol) -> None: ...
21
+ def _register_system_health_platform(hass: HomeAssistant, integration_domain: str, platform: SystemHealthProtocol) -> None: ...
22
22
  async def get_integration_info(hass: HomeAssistant, registration: SystemHealthRegistration) -> dict[str, Any]: ...
23
23
  def _format_value(val: Any) -> Any: ...
24
24
  async def handle_info(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]) -> None: ...
@@ -1,10 +1,13 @@
1
+ from .const import DOMAIN as DOMAIN
1
2
  from _typeshed import Incomplete
2
3
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
3
4
  from homeassistant.const import Platform as Platform
4
5
  from homeassistant.core import HomeAssistant as HomeAssistant
5
6
 
7
+ _LOGGER: Incomplete
6
8
  PLATFORMS: Incomplete
7
9
 
8
10
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
9
11
  async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
10
12
  async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
13
+ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
@@ -0,0 +1,48 @@
1
+ from .const import CONF_PROCESS as CONF_PROCESS, DOMAIN as DOMAIN
2
+ from .coordinator import MonitorCoordinator as MonitorCoordinator, SystemMonitorProcessCoordinator as SystemMonitorProcessCoordinator, dataT as dataT
3
+ from _typeshed import Incomplete
4
+ from collections.abc import Callable as Callable
5
+ from dataclasses import dataclass
6
+ from homeassistant.components.binary_sensor import BinarySensorDeviceClass as BinarySensorDeviceClass, BinarySensorEntity as BinarySensorEntity, BinarySensorEntityDescription as BinarySensorEntityDescription
7
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
+ from homeassistant.const import EntityCategory as EntityCategory
9
+ from homeassistant.core import HomeAssistant as HomeAssistant
10
+ from homeassistant.helpers.device_registry import DeviceEntryType as DeviceEntryType, DeviceInfo as DeviceInfo
11
+ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
12
+ from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
13
+ from homeassistant.util import slugify as slugify
14
+ from psutil import Process
15
+ from typing import Generic, Literal
16
+
17
+ _LOGGER: Incomplete
18
+ CONF_ARG: str
19
+ SENSOR_TYPE_NAME: int
20
+ SENSOR_TYPE_UOM: int
21
+ SENSOR_TYPE_ICON: int
22
+ SENSOR_TYPE_DEVICE_CLASS: int
23
+ SENSOR_TYPE_MANDATORY_ARG: int
24
+ SIGNAL_SYSTEMMONITOR_UPDATE: str
25
+
26
+ def get_cpu_icon() -> Literal['mdi:cpu-64-bit', 'mdi:cpu-32-bit']: ...
27
+ def get_process(entity: SystemMonitorSensor[list[Process]]) -> bool: ...
28
+
29
+ @dataclass(frozen=True, kw_only=True)
30
+ class SysMonitorBinarySensorEntityDescription(BinarySensorEntityDescription, Generic[dataT]):
31
+ value_fn: Callable[[SystemMonitorSensor[dataT]], bool]
32
+ def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, value_fn) -> None: ...
33
+
34
+ SENSOR_TYPES: tuple[SysMonitorBinarySensorEntityDescription[list[Process]], ...]
35
+
36
+ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
37
+
38
+ class SystemMonitorSensor(CoordinatorEntity[MonitorCoordinator[dataT]], BinarySensorEntity):
39
+ _attr_has_entity_name: bool
40
+ _attr_entity_category: Incomplete
41
+ entity_description: SysMonitorBinarySensorEntityDescription[dataT]
42
+ _attr_translation_placeholders: Incomplete
43
+ _attr_unique_id: Incomplete
44
+ _attr_device_info: Incomplete
45
+ argument: Incomplete
46
+ def __init__(self, coordinator: MonitorCoordinator[dataT], sensor_description: SysMonitorBinarySensorEntityDescription[dataT], entry_id: str, argument: str) -> None: ...
47
+ @property
48
+ def is_on(self) -> bool | None: ...
@@ -22,5 +22,7 @@ OPTIONS_FLOW: Incomplete
22
22
  class SystemMonitorConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
23
23
  config_flow = CONFIG_FLOW
24
24
  options_flow = OPTIONS_FLOW
25
+ VERSION: int
26
+ MINOR_VERSION: int
25
27
  def async_config_entry_title(self, options: Mapping[str, Any]) -> str: ...
26
28
  def async_create_entry(self, data: Mapping[str, Any], **kwargs: Any) -> FlowResult: ...
@@ -1,6 +1,7 @@
1
1
  from _typeshed import Incomplete
2
2
 
3
3
  DOMAIN: str
4
+ DOMAIN_COORDINATORS: str
4
5
  CONF_INDEX: str
5
6
  CONF_PROCESS: str
6
7
  NET_IO_TYPES: Incomplete
@@ -1,11 +1,12 @@
1
1
  import abc
2
- import psutil
2
+ import psutil_home_assistant as ha_psutil
3
3
  from _typeshed import Incomplete
4
4
  from abc import abstractmethod
5
5
  from datetime import datetime
6
6
  from homeassistant.core import HomeAssistant as HomeAssistant
7
7
  from homeassistant.helpers.entity_component import DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL
8
- from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
8
+ from homeassistant.helpers.update_coordinator import TimestampDataUpdateCoordinator as TimestampDataUpdateCoordinator, UpdateFailed as UpdateFailed
9
+ from psutil import Process
9
10
  from psutil._common import sdiskusage, shwtemp, snetio, snicaddr, sswap
10
11
  from typing import NamedTuple, TypeVar
11
12
 
@@ -17,17 +18,18 @@ class VirtualMemory(NamedTuple):
17
18
  percent: float
18
19
  used: float
19
20
  free: float
20
- dataT = TypeVar('dataT', bound=datetime | dict[str, list[shwtemp]] | dict[str, list[snicaddr]] | dict[str, snetio] | float | list[psutil.Process] | sswap | VirtualMemory | tuple[float, float, float] | sdiskusage | None)
21
+ dataT = TypeVar('dataT', bound=datetime | dict[str, list[shwtemp]] | dict[str, list[snicaddr]] | dict[str, snetio] | float | list[Process] | sswap | VirtualMemory | tuple[float, float, float] | sdiskusage | None)
21
22
 
22
- class MonitorCoordinator(DataUpdateCoordinator[dataT], metaclass=abc.ABCMeta):
23
- def __init__(self, hass: HomeAssistant, name: str) -> None: ...
23
+ class MonitorCoordinator(TimestampDataUpdateCoordinator[dataT], metaclass=abc.ABCMeta):
24
+ _psutil: Incomplete
25
+ def __init__(self, hass: HomeAssistant, psutil_wrapper: ha_psutil.PsutilWrapper, name: str) -> None: ...
24
26
  async def _async_update_data(self) -> dataT: ...
25
27
  @abstractmethod
26
28
  def update_data(self) -> dataT: ...
27
29
 
28
30
  class SystemMonitorDiskCoordinator(MonitorCoordinator[sdiskusage]):
29
31
  _argument: Incomplete
30
- def __init__(self, hass: HomeAssistant, name: str, argument: str) -> None: ...
32
+ def __init__(self, hass: HomeAssistant, psutil_wrapper: ha_psutil.PsutilWrapper, name: str, argument: str) -> None: ...
31
33
  def update_data(self) -> sdiskusage: ...
32
34
 
33
35
  class SystemMonitorSwapCoordinator(MonitorCoordinator[sswap]):
@@ -42,17 +44,19 @@ class SystemMonitorNetIOCoordinator(MonitorCoordinator[dict[str, snetio]]):
42
44
  class SystemMonitorNetAddrCoordinator(MonitorCoordinator[dict[str, list[snicaddr]]]):
43
45
  def update_data(self) -> dict[str, list[snicaddr]]: ...
44
46
 
45
- class SystemMonitorLoadCoordinator(MonitorCoordinator[tuple[float, float, float]]):
46
- def update_data(self) -> tuple[float, float, float]: ...
47
+ class SystemMonitorLoadCoordinator(MonitorCoordinator[tuple[float, float, float] | None]):
48
+ def update_data(self) -> tuple[float, float, float] | None: ...
49
+ async def _async_update_data(self) -> tuple[float, float, float] | None: ...
47
50
 
48
51
  class SystemMonitorProcessorCoordinator(MonitorCoordinator[float | None]):
49
52
  def update_data(self) -> float | None: ...
53
+ async def _async_update_data(self) -> float | None: ...
50
54
 
51
55
  class SystemMonitorBootTimeCoordinator(MonitorCoordinator[datetime]):
52
56
  def update_data(self) -> datetime: ...
53
57
 
54
- class SystemMonitorProcessCoordinator(MonitorCoordinator[list[psutil.Process]]):
55
- def update_data(self) -> list[psutil.Process]: ...
58
+ class SystemMonitorProcessCoordinator(MonitorCoordinator[list[Process]]):
59
+ def update_data(self) -> list[Process]: ...
56
60
 
57
61
  class SystemMonitorCPUtempCoordinator(MonitorCoordinator[dict[str, list[shwtemp]]]):
58
62
  def update_data(self) -> dict[str, list[shwtemp]]: ...
@@ -0,0 +1,7 @@
1
+ from .const import DOMAIN_COORDINATORS as DOMAIN_COORDINATORS
2
+ from .coordinator import MonitorCoordinator as MonitorCoordinator
3
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
4
+ from homeassistant.core import HomeAssistant as HomeAssistant
5
+ from typing import Any
6
+
7
+ async def async_get_config_entry_diagnostics(hass: HomeAssistant, entry: ConfigEntry) -> dict[str, Any]: ...
@@ -0,0 +1,15 @@
1
+ from _typeshed import Incomplete
2
+ from homeassistant import data_entry_flow as data_entry_flow
3
+ from homeassistant.components.repairs import ConfirmRepairFlow as ConfirmRepairFlow, RepairsFlow as RepairsFlow
4
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
5
+ from homeassistant.core import HomeAssistant as HomeAssistant
6
+ from typing import Any
7
+
8
+ class ProcessFixFlow(RepairsFlow):
9
+ entry: Incomplete
10
+ _processes: Incomplete
11
+ def __init__(self, entry: ConfigEntry, processes: list[str]) -> None: ...
12
+ async def async_step_init(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
13
+ async def async_step_migrate_process_sensor(self, user_input: dict[str, Any] | None = None) -> data_entry_flow.FlowResult: ...
14
+
15
+ async def async_create_fix_flow(hass: HomeAssistant, issue_id: str, data: dict[str, Any] | None) -> RepairsFlow: ...
@@ -1,5 +1,4 @@
1
- import psutil
2
- from .const import CONF_PROCESS as CONF_PROCESS, DOMAIN as DOMAIN, NET_IO_TYPES as NET_IO_TYPES
1
+ from .const import CONF_PROCESS as CONF_PROCESS, DOMAIN as DOMAIN, DOMAIN_COORDINATORS as DOMAIN_COORDINATORS, NET_IO_TYPES as NET_IO_TYPES
3
2
  from .coordinator import MonitorCoordinator as MonitorCoordinator, SystemMonitorBootTimeCoordinator as SystemMonitorBootTimeCoordinator, SystemMonitorCPUtempCoordinator as SystemMonitorCPUtempCoordinator, SystemMonitorDiskCoordinator as SystemMonitorDiskCoordinator, SystemMonitorLoadCoordinator as SystemMonitorLoadCoordinator, SystemMonitorMemoryCoordinator as SystemMonitorMemoryCoordinator, SystemMonitorNetAddrCoordinator as SystemMonitorNetAddrCoordinator, SystemMonitorNetIOCoordinator as SystemMonitorNetIOCoordinator, SystemMonitorProcessCoordinator as SystemMonitorProcessCoordinator, SystemMonitorProcessorCoordinator as SystemMonitorProcessorCoordinator, SystemMonitorSwapCoordinator as SystemMonitorSwapCoordinator, VirtualMemory as VirtualMemory, dataT as dataT
4
3
  from .util import get_all_disk_mounts as get_all_disk_mounts, get_all_network_interfaces as get_all_network_interfaces, read_cpu_temperature as read_cpu_temperature
5
4
  from _typeshed import Incomplete
@@ -9,12 +8,14 @@ from datetime import datetime
9
8
  from homeassistant.components.sensor import PLATFORM_SCHEMA as PLATFORM_SCHEMA, SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
10
9
  from homeassistant.config_entries import ConfigEntry as ConfigEntry, SOURCE_IMPORT as SOURCE_IMPORT
11
10
  from homeassistant.const import CONF_RESOURCES as CONF_RESOURCES, CONF_TYPE as CONF_TYPE, EntityCategory as EntityCategory, PERCENTAGE as PERCENTAGE, STATE_OFF as STATE_OFF, STATE_ON as STATE_ON, UnitOfDataRate as UnitOfDataRate, UnitOfInformation as UnitOfInformation, UnitOfTemperature as UnitOfTemperature
12
- from homeassistant.core import HomeAssistant as HomeAssistant
11
+ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
13
12
  from homeassistant.helpers.device_registry import DeviceEntryType as DeviceEntryType, DeviceInfo as DeviceInfo
14
13
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
14
+ from homeassistant.helpers.issue_registry import IssueSeverity as IssueSeverity, async_create_issue as async_create_issue
15
15
  from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfoType as DiscoveryInfoType, StateType as StateType
16
16
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
17
17
  from homeassistant.util import slugify as slugify
18
+ from psutil import Process
18
19
  from psutil._common import shwtemp, snetio, snicaddr
19
20
  from typing import Any, Generic, Literal
20
21
 
@@ -29,7 +30,7 @@ SIGNAL_SYSTEMMONITOR_UPDATE: str
29
30
 
30
31
  def get_cpu_icon() -> Literal['mdi:cpu-64-bit', 'mdi:cpu-32-bit']: ...
31
32
  def get_processor_temperature(entity: SystemMonitorSensor[dict[str, list[shwtemp]]]) -> float | None: ...
32
- def get_process(entity: SystemMonitorSensor[list[psutil.Process]]) -> str: ...
33
+ def get_process(entity: SystemMonitorSensor[list[Process]]) -> str: ...
33
34
  def get_network(entity: SystemMonitorSensor[dict[str, snetio]]) -> float | None: ...
34
35
  def get_packets(entity: SystemMonitorSensor[dict[str, snetio]]) -> float | None: ...
35
36
  def get_throughput(entity: SystemMonitorSensor[dict[str, snetio]]) -> float | None: ...
@@ -1,11 +1,12 @@
1
- from .const import CPU_SENSOR_PREFIXES as CPU_SENSOR_PREFIXES
1
+ from .const import CPU_SENSOR_PREFIXES as CPU_SENSOR_PREFIXES, DOMAIN as DOMAIN
2
2
  from _typeshed import Incomplete
3
+ from homeassistant.core import HomeAssistant as HomeAssistant
3
4
  from psutil._common import shwtemp as shwtemp
4
5
 
5
6
  _LOGGER: Incomplete
6
7
  SKIP_DISK_TYPES: Incomplete
7
8
 
8
- def get_all_disk_mounts() -> set[str]: ...
9
- def get_all_network_interfaces() -> set[str]: ...
10
- def get_all_running_processes() -> set[str]: ...
11
- def read_cpu_temperature(temps: dict[str, list[shwtemp]] | None = None) -> float | None: ...
9
+ def get_all_disk_mounts(hass: HomeAssistant) -> set[str]: ...
10
+ def get_all_network_interfaces(hass: HomeAssistant) -> set[str]: ...
11
+ def get_all_running_processes(hass: HomeAssistant) -> set[str]: ...
12
+ def read_cpu_temperature(hass: HomeAssistant, temps: dict[str, list[shwtemp]] | None = None) -> float | None: ...
@@ -0,0 +1,9 @@
1
+ from .entity import TechnoVEEntity as TechnoVEEntity
2
+ from collections.abc import Callable as Callable, Coroutine
3
+ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
4
+ from typing import Any, Concatenate, ParamSpec, TypeVar
5
+
6
+ _TechnoVEEntityT = TypeVar('_TechnoVEEntityT', bound=TechnoVEEntity)
7
+ _P = ParamSpec('_P')
8
+
9
+ def technove_exception_handler(func: Callable[Concatenate[_TechnoVEEntityT, _P], Coroutine[Any, Any, Any]]) -> Callable[Concatenate[_TechnoVEEntityT, _P], Coroutine[Any, Any, None]]: ...
@@ -0,0 +1,33 @@
1
+ from .const import DOMAIN as DOMAIN
2
+ from .coordinator import TechnoVEDataUpdateCoordinator as TechnoVEDataUpdateCoordinator
3
+ from .entity import TechnoVEEntity as TechnoVEEntity
4
+ from .helpers import technove_exception_handler as technove_exception_handler
5
+ from _typeshed import Incomplete
6
+ from collections.abc import Awaitable, Callable as Callable
7
+ from dataclasses import dataclass
8
+ from homeassistant.components.switch import SwitchEntity as SwitchEntity, SwitchEntityDescription as SwitchEntityDescription
9
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
10
+ from homeassistant.const import EntityCategory as EntityCategory
11
+ from homeassistant.core import HomeAssistant as HomeAssistant
12
+ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
13
+ from technove import Station as TechnoVEStation, TechnoVE as TechnoVE
14
+ from typing import Any
15
+
16
+ @dataclass(frozen=True, kw_only=True)
17
+ class TechnoVESwitchDescription(SwitchEntityDescription):
18
+ is_on_fn: Callable[[TechnoVEStation], bool]
19
+ turn_on_fn: Callable[[TechnoVE], Awaitable[dict[str, Any]]]
20
+ turn_off_fn: Callable[[TechnoVE], Awaitable[dict[str, Any]]]
21
+ def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, is_on_fn, turn_on_fn, turn_off_fn) -> None: ...
22
+
23
+ SWITCHES: Incomplete
24
+
25
+ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
26
+
27
+ class TechnoVESwitchEntity(TechnoVEEntity, SwitchEntity):
28
+ entity_description: TechnoVESwitchDescription
29
+ def __init__(self, coordinator: TechnoVEDataUpdateCoordinator, description: TechnoVESwitchDescription) -> None: ...
30
+ @property
31
+ def is_on(self) -> bool: ...
32
+ async def async_turn_on(self, **kwargs: Any) -> None: ...
33
+ async def async_turn_off(self, **kwargs: Any) -> None: ...
@@ -10,3 +10,4 @@ class TedeeConfigFlow(ConfigFlow, domain=DOMAIN):
10
10
  reauth_entry: ConfigEntry | None
11
11
  async def async_step_user(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
12
12
  async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult: ...
13
+ async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
@@ -4,7 +4,7 @@ from collections.abc import Callable as Callable
4
4
  from dataclasses import dataclass
5
5
  from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
- from homeassistant.const import PERCENTAGE as PERCENTAGE, UnitOfTime as UnitOfTime
7
+ from homeassistant.const import EntityCategory as EntityCategory, PERCENTAGE as PERCENTAGE, UnitOfTime as UnitOfTime
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant
9
9
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
10
10
  from pytedee_async import TedeeLock as TedeeLock
@@ -27,6 +27,7 @@ SENSORS: tuple[SensorEntityDescription, ...]
27
27
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
28
28
 
29
29
  class TibberSensor(SensorEntity):
30
+ _attr_has_entity_name: bool
30
31
  _tibber_home: Incomplete
31
32
  _home_name: Incomplete
32
33
  _device_name: Incomplete
@@ -36,13 +37,13 @@ class TibberSensor(SensorEntity):
36
37
  def device_info(self) -> DeviceInfo: ...
37
38
 
38
39
  class TibberSensorElPrice(TibberSensor):
40
+ _attr_state_class: Incomplete
41
+ _attr_translation_key: str
39
42
  _last_updated: Incomplete
40
43
  _spread_load_constant: Incomplete
41
44
  _attr_available: bool
42
45
  _attr_extra_state_attributes: Incomplete
43
46
  _attr_icon: Incomplete
44
- _attr_name: Incomplete
45
- _attr_state_class: Incomplete
46
47
  _attr_unique_id: Incomplete
47
48
  _model: str
48
49
  _device_name: Incomplete
@@ -54,7 +55,6 @@ class TibberSensorElPrice(TibberSensor):
54
55
  class TibberDataSensor(TibberSensor, CoordinatorEntity['TibberDataCoordinator']):
55
56
  entity_description: Incomplete
56
57
  _attr_unique_id: Incomplete
57
- _attr_name: Incomplete
58
58
  _attr_native_unit_of_measurement: Incomplete
59
59
  _device_name: Incomplete
60
60
  def __init__(self, tibber_home: tibber.TibberHome, coordinator: TibberDataCoordinator, entity_description: SensorEntityDescription) -> None: ...
@@ -65,7 +65,6 @@ class TibberSensorRT(TibberSensor, CoordinatorEntity['TibberRtDataCoordinator'])
65
65
  entity_description: Incomplete
66
66
  _model: str
67
67
  _device_name: Incomplete
68
- _attr_name: Incomplete
69
68
  _attr_native_value: Incomplete
70
69
  _attr_unique_id: Incomplete
71
70
  _attr_native_unit_of_measurement: Incomplete
@@ -7,7 +7,7 @@ from homeassistant.components import dhcp as dhcp
7
7
  from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigEntryState as ConfigEntryState, SOURCE_REAUTH as SOURCE_REAUTH
8
8
  from homeassistant.const import CONF_ALIAS as CONF_ALIAS, CONF_DEVICE as CONF_DEVICE, CONF_HOST as CONF_HOST, CONF_MAC as CONF_MAC, CONF_MODEL as CONF_MODEL, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME
9
9
  from homeassistant.core import callback as callback
10
- from homeassistant.data_entry_flow import AbortFlow as AbortFlow, FlowResult as FlowResult
10
+ from homeassistant.data_entry_flow import FlowResult as FlowResult
11
11
  from homeassistant.helpers.typing import DiscoveryInfoType as DiscoveryInfoType
12
12
  from kasa import Credentials, SmartDevice
13
13
  from typing import Any
@@ -23,7 +23,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
23
23
  def __init__(self) -> None: ...
24
24
  async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult: ...
25
25
  async def async_step_integration_discovery(self, discovery_info: DiscoveryInfoType) -> FlowResult: ...
26
- def _update_config_if_entry_in_setup_error(self, entry: ConfigEntry, host: str, config: dict) -> None: ...
26
+ def _update_config_if_entry_in_setup_error(self, entry: ConfigEntry, host: str, config: dict) -> FlowResult | None: ...
27
27
  async def _async_handle_discovery(self, host: str, formatted_mac: str, config: dict | None = None) -> FlowResult: ...
28
28
  async def async_step_discovery_auth_confirm(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
29
29
  def _async_make_placeholders_from_discovery(self) -> dict[str, str]: ...
@@ -31,6 +31,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
31
31
  class TPLinkSmartBulb(CoordinatedTPLinkEntity, LightEntity):
32
32
  _attr_supported_features: Incomplete
33
33
  _attr_name: Incomplete
34
+ _fixed_color_mode: ColorMode | None
34
35
  device: SmartBulb
35
36
  _attr_unique_id: Incomplete
36
37
  _attr_min_color_temp_kelvin: Incomplete
@@ -7,7 +7,7 @@ from homeassistant.components.binary_sensor import BinarySensorDeviceClass as Bi
7
7
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
9
9
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
10
- from tplink_omada_client.devices import OmadaDevice as OmadaDevice, OmadaGateway, OmadaGatewayPort as OmadaGatewayPort
10
+ from tplink_omada_client.devices import OmadaDevice as OmadaDevice, OmadaGateway, OmadaGatewayPortStatus as OmadaGatewayPortStatus
11
11
 
12
12
  async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
13
13
  def get_gateway_port_status_sensors(gateway: OmadaGateway, hass: HomeAssistant, coordinator: OmadaGatewayCoordinator) -> Generator[BinarySensorEntity, None, None]: ...
@@ -17,7 +17,7 @@ class GatewayPortBinarySensorConfig:
17
17
  id_suffix: str
18
18
  name_suffix: str
19
19
  device_class: BinarySensorDeviceClass
20
- update_func: Callable[[OmadaGatewayPort], bool]
20
+ update_func: Callable[[OmadaGatewayPortStatus], bool]
21
21
  def __init__(self, port_number, id_suffix, name_suffix, device_class, update_func) -> None: ...
22
22
  def __lt__(self, other): ...
23
23
  def __le__(self, other): ...
@@ -7,7 +7,7 @@ from homeassistant.core import HomeAssistant as HomeAssistant
7
7
  from homeassistant.data_entry_flow import FlowResult as FlowResult
8
8
  from homeassistant.helpers import selector as selector
9
9
  from homeassistant.helpers.aiohttp_client import async_create_clientsession as async_create_clientsession, async_get_clientsession as async_get_clientsession
10
- from tplink_omada_client.omadaclient import OmadaClient, OmadaSite as OmadaSite
10
+ from tplink_omada_client import OmadaClient, OmadaSite as OmadaSite
11
11
  from types import MappingProxyType
12
12
  from typing import Any, NamedTuple
13
13
 
@@ -1,8 +1,8 @@
1
1
  from .coordinator import OmadaCoordinator as OmadaCoordinator
2
2
  from _typeshed import Incomplete
3
3
  from homeassistant.core import HomeAssistant as HomeAssistant
4
+ from tplink_omada_client import OmadaSiteClient as OmadaSiteClient
4
5
  from tplink_omada_client.devices import OmadaGateway, OmadaSwitch as OmadaSwitch, OmadaSwitchPortDetails
5
- from tplink_omada_client.omadasiteclient import OmadaSiteClient as OmadaSiteClient
6
6
 
7
7
  POLL_SWITCH_PORT: int
8
8
  POLL_GATEWAY: int
@@ -1,7 +1,7 @@
1
1
  from _typeshed import Incomplete
2
2
  from homeassistant.core import HomeAssistant as HomeAssistant
3
3
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
4
- from tplink_omada_client.omadaclient import OmadaSiteClient as OmadaSiteClient
4
+ from tplink_omada_client import OmadaSiteClient as OmadaSiteClient
5
5
  from typing import Generic, TypeVar
6
6
 
7
7
  _LOGGER: Incomplete
@@ -8,8 +8,8 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
9
9
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
10
10
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
11
+ from tplink_omada_client import OmadaSiteClient as OmadaSiteClient
11
12
  from tplink_omada_client.devices import OmadaFirmwareUpdate as OmadaFirmwareUpdate, OmadaListDevice as OmadaListDevice
12
- from tplink_omada_client.omadasiteclient import OmadaSiteClient as OmadaSiteClient
13
13
  from typing import Any, NamedTuple
14
14
 
15
15
  POLL_DELAY_IDLE: Incomplete
@@ -12,7 +12,6 @@ from typing import Any
12
12
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
13
13
 
14
14
  class TractiveDeviceTracker(TractiveEntity, TrackerEntity):
15
- _attr_icon: str
16
15
  _attr_translation_key: str
17
16
  _battery_level: Incomplete
18
17
  _latitude: Incomplete
@@ -1,6 +1,6 @@
1
1
  from .const import PLATFORMS as PLATFORMS, UNIFI_WIRELESS_CLIENTS as UNIFI_WIRELESS_CLIENTS
2
- from .controller import UniFiController as UniFiController, get_unifi_controller as get_unifi_controller
3
2
  from .errors import AuthenticationRequired as AuthenticationRequired, CannotConnect as CannotConnect
3
+ from .hub import UnifiHub as UnifiHub, get_unifi_api as get_unifi_api
4
4
  from .services import async_setup_services as async_setup_services, async_unload_services as async_unload_services
5
5
  from _typeshed import Incomplete
6
6
  from aiounifi.models.client import Client as Client
@@ -1,6 +1,6 @@
1
1
  import aiounifi
2
- from .controller import UniFiController as UniFiController
3
2
  from .entity import HandlerT as HandlerT, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn
3
+ from .hub import UnifiHub as UnifiHub
4
4
  from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
5
5
  from aiounifi.models.api import ApiItemT
6
6
  from collections.abc import Callable as Callable, Coroutine
@@ -1,6 +1,6 @@
1
1
  from .const import CONF_ALLOW_BANDWIDTH_SENSORS as CONF_ALLOW_BANDWIDTH_SENSORS, CONF_ALLOW_UPTIME_SENSORS as CONF_ALLOW_UPTIME_SENSORS, CONF_BLOCK_CLIENT as CONF_BLOCK_CLIENT, CONF_CLIENT_SOURCE as CONF_CLIENT_SOURCE, CONF_DETECTION_TIME as CONF_DETECTION_TIME, CONF_DPI_RESTRICTIONS as CONF_DPI_RESTRICTIONS, CONF_IGNORE_WIRED_BUG as CONF_IGNORE_WIRED_BUG, CONF_SITE_ID as CONF_SITE_ID, CONF_SSID_FILTER as CONF_SSID_FILTER, CONF_TRACK_CLIENTS as CONF_TRACK_CLIENTS, CONF_TRACK_DEVICES as CONF_TRACK_DEVICES, CONF_TRACK_WIRED_CLIENTS as CONF_TRACK_WIRED_CLIENTS, DEFAULT_DPI_RESTRICTIONS as DEFAULT_DPI_RESTRICTIONS, DOMAIN as UNIFI_DOMAIN
2
- from .controller import UniFiController as UniFiController, get_unifi_controller as get_unifi_controller
3
2
  from .errors import AuthenticationRequired as AuthenticationRequired, CannotConnect as CannotConnect
3
+ from .hub import UnifiHub as UnifiHub, get_unifi_api as get_unifi_api
4
4
  from _typeshed import Incomplete
5
5
  from aiounifi.interfaces.sites import Sites as Sites
6
6
  from collections.abc import Mapping
@@ -32,7 +32,7 @@ class UnifiFlowHandler(config_entries.ConfigFlow, domain=UNIFI_DOMAIN):
32
32
  async def async_step_ssdp(self, discovery_info: ssdp.SsdpServiceInfo) -> FlowResult: ...
33
33
 
34
34
  class UnifiOptionsFlowHandler(config_entries.OptionsFlow):
35
- controller: UniFiController
35
+ hub: UnifiHub
36
36
  config_entry: Incomplete
37
37
  options: Incomplete
38
38
  def __init__(self, config_entry: config_entries.ConfigEntry) -> None: ...
@@ -1,6 +1,6 @@
1
1
  import aiounifi
2
- from .controller import UNIFI_DOMAIN as UNIFI_DOMAIN, UniFiController as UniFiController
3
2
  from .entity import HandlerT as HandlerT, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_device_available_fn as async_device_available_fn
3
+ from .hub import UnifiHub as UnifiHub
4
4
  from _typeshed import Incomplete
5
5
  from aiounifi.interfaces.api_handlers import ItemEvent
6
6
  from aiounifi.models.api import ApiItemT
@@ -26,15 +26,15 @@ WIRED_DISCONNECTION: Incomplete
26
26
  WIRELESS_CONNECTION: Incomplete
27
27
  WIRELESS_DISCONNECTION: Incomplete
28
28
 
29
- def async_client_allowed_fn(controller: UniFiController, obj_id: str) -> bool: ...
30
- def async_client_is_connected_fn(controller: UniFiController, obj_id: str) -> bool: ...
31
- def async_device_heartbeat_timedelta_fn(controller: UniFiController, obj_id: str) -> timedelta: ...
29
+ def async_client_allowed_fn(hub: UnifiHub, obj_id: str) -> bool: ...
30
+ def async_client_is_connected_fn(hub: UnifiHub, obj_id: str) -> bool: ...
31
+ def async_device_heartbeat_timedelta_fn(hub: UnifiHub, obj_id: str) -> timedelta: ...
32
32
 
33
33
  @dataclass(frozen=True)
34
34
  class UnifiEntityTrackerDescriptionMixin(Generic[HandlerT, ApiItemT]):
35
- heartbeat_timedelta_fn: Callable[[UniFiController, str], timedelta]
35
+ heartbeat_timedelta_fn: Callable[[UnifiHub, str], timedelta]
36
36
  ip_address_fn: Callable[[aiounifi.Controller, str], str | None]
37
- is_connected_fn: Callable[[UniFiController, str], bool]
37
+ is_connected_fn: Callable[[UnifiHub, str], bool]
38
38
  hostname_fn: Callable[[aiounifi.Controller, str], str | None]
39
39
  def __init__(self, heartbeat_timedelta_fn, ip_address_fn, is_connected_fn, hostname_fn) -> None: ...
40
40