homeassistant-stubs 2024.11.0b3__py3-none-any.whl → 2024.11.0b4__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.
@@ -26,6 +26,7 @@ from homeassistant.helpers.template import Template as Template
26
26
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolDictType as VolDictType
27
27
  from homeassistant.loader import bind_hass as bind_hass
28
28
  from typing import Any, Final
29
+ from webrtc_models import RTCIceCandidate as RTCIceCandidate
29
30
 
30
31
  _LOGGER: Incomplete
31
32
  ENTITY_ID_FORMAT: Final[Incomplete]
@@ -155,7 +156,7 @@ class Camera(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_):
155
156
  async def _async_get_supported_webrtc_provider[_T](self, fn: Callable[[HomeAssistant, Camera], Coroutine[None, None, _T | None]]) -> _T | None: ...
156
157
  def _async_get_webrtc_client_configuration(self) -> WebRTCClientConfiguration: ...
157
158
  def async_get_webrtc_client_configuration(self) -> WebRTCClientConfiguration: ...
158
- async def async_on_webrtc_candidate(self, session_id: str, candidate: str) -> None: ...
159
+ async def async_on_webrtc_candidate(self, session_id: str, candidate: RTCIceCandidate) -> None: ...
159
160
  def close_webrtc_session(self, session_id: str) -> None: ...
160
161
  def _invalidate_camera_capabilities_cache(self) -> None: ...
161
162
  def camera_capabilities(self) -> CameraCapabilities: ...
@@ -12,7 +12,7 @@ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
12
12
  from homeassistant.util.hass_dict import HassKey as HassKey
13
13
  from homeassistant.util.ulid import ulid as ulid
14
14
  from typing import Any, Protocol
15
- from webrtc_models import RTCConfiguration, RTCIceServer as RTCIceServer
15
+ from webrtc_models import RTCConfiguration, RTCIceCandidate, RTCIceServer as RTCIceServer
16
16
 
17
17
  _LOGGER: Incomplete
18
18
  DATA_WEBRTC_PROVIDERS: HassKey[set[CameraWebRTCProvider]]
@@ -38,7 +38,8 @@ class WebRTCAnswer(WebRTCMessage):
38
38
 
39
39
  @dataclass(frozen=True)
40
40
  class WebRTCCandidate(WebRTCMessage):
41
- candidate: str
41
+ candidate: RTCIceCandidate
42
+ def as_dict(self) -> dict[str, Any]: ...
42
43
  def __init__(self, candidate) -> None: ...
43
44
 
44
45
  @dataclass(frozen=True)
@@ -65,7 +66,7 @@ class CameraWebRTCProvider(ABC, metaclass=abc.ABCMeta):
65
66
  @abstractmethod
66
67
  async def async_handle_async_webrtc_offer(self, camera: Camera, offer_sdp: str, session_id: str, send_message: WebRTCSendMessage) -> None: ...
67
68
  @abstractmethod
68
- async def async_on_webrtc_candidate(self, session_id: str, candidate: str) -> None: ...
69
+ async def async_on_webrtc_candidate(self, session_id: str, candidate: RTCIceCandidate) -> None: ...
69
70
  def async_close_session(self, session_id: str) -> None: ...
70
71
 
71
72
  class CameraWebRTCLegacyProvider(Protocol):
@@ -1,4 +1,4 @@
1
- from .const import CONF_DEBUG_UI as CONF_DEBUG_UI, DEBUG_UI_URL_MESSAGE as DEBUG_UI_URL_MESSAGE, DOMAIN as DOMAIN
1
+ from .const import CONF_DEBUG_UI as CONF_DEBUG_UI, DEBUG_UI_URL_MESSAGE as DEBUG_UI_URL_MESSAGE, DEFAULT_URL as DEFAULT_URL, DOMAIN as DOMAIN
2
2
  from .server import Server as Server
3
3
  from _typeshed import Incomplete
4
4
  from go2rtc_client.ws import ReceiveMessages as ReceiveMessages
@@ -12,6 +12,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession as asyn
12
12
  from homeassistant.helpers.typing import ConfigType as ConfigType
13
13
  from homeassistant.util.hass_dict import HassKey as HassKey
14
14
  from homeassistant.util.package import is_docker_env as is_docker_env
15
+ from webrtc_models import RTCIceCandidate
15
16
 
16
17
  _LOGGER: Incomplete
17
18
  _SUPPORTED_STREAMS: Incomplete
@@ -36,5 +37,5 @@ class WebRTCProvider(CameraWebRTCProvider):
36
37
  def domain(self) -> str: ...
37
38
  def async_is_supported(self, stream_source: str) -> bool: ...
38
39
  async def async_handle_async_webrtc_offer(self, camera: Camera, offer_sdp: str, session_id: str, send_message: WebRTCSendMessage) -> None: ...
39
- async def async_on_webrtc_candidate(self, session_id: str, candidate: str) -> None: ...
40
+ async def async_on_webrtc_candidate(self, session_id: str, candidate: RTCIceCandidate) -> None: ...
40
41
  def async_close_session(self, session_id: str) -> None: ...
@@ -1,3 +1,4 @@
1
1
  DOMAIN: str
2
2
  CONF_DEBUG_UI: str
3
3
  DEBUG_UI_URL_MESSAGE: str
4
+ DEFAULT_URL: str
@@ -1,15 +1,23 @@
1
1
  import asyncio
2
+ from .const import DEFAULT_URL as DEFAULT_URL
2
3
  from _typeshed import Incomplete
3
4
  from homeassistant.core import HomeAssistant as HomeAssistant
4
5
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
6
+ from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
5
7
 
6
8
  _LOGGER: Incomplete
7
9
  _TERMINATE_TIMEOUT: int
8
10
  _SETUP_TIMEOUT: int
9
11
  _SUCCESSFUL_BOOT_MESSAGE: str
10
12
  _LOCALHOST_IP: str
13
+ _RESPAWN_COOLDOWN: int
11
14
  _GO2RTC_CONFIG_FORMAT: str
12
15
 
16
+ class Go2RTCServerStartError(HomeAssistantError):
17
+ _message: str
18
+
19
+ class Go2RTCWatchdogError(HomeAssistantError): ...
20
+
13
21
  def _create_temp_file(api_ip: str) -> str: ...
14
22
 
15
23
  class Server:
@@ -18,7 +26,15 @@ class Server:
18
26
  _process: Incomplete
19
27
  _startup_complete: Incomplete
20
28
  _api_ip: Incomplete
29
+ _watchdog_task: Incomplete
30
+ _watchdog_tasks: Incomplete
21
31
  def __init__(self, hass: HomeAssistant, binary: str, *, enable_ui: bool = False) -> None: ...
22
32
  async def start(self) -> None: ...
33
+ async def _start(self) -> None: ...
23
34
  async def _log_output(self, process: asyncio.subprocess.Process) -> None: ...
35
+ async def _watchdog(self) -> None: ...
36
+ async def _monitor_process(self) -> None: ...
37
+ async def _monitor_api(self) -> None: ...
38
+ async def _stop_watchdog(self) -> None: ...
24
39
  async def stop(self) -> None: ...
40
+ async def _stop(self) -> None: ...
@@ -4,21 +4,23 @@ from .const import MEDIA_PLAYER_PREFIX as MEDIA_PLAYER_PREFIX, PLAYABLE_MEDIA_TY
4
4
  from .coordinator import SpotifyConfigEntry as SpotifyConfigEntry, SpotifyCoordinator as SpotifyCoordinator
5
5
  from .entity import SpotifyEntity as SpotifyEntity
6
6
  from _typeshed import Incomplete
7
- from collections.abc import Callable as Callable
7
+ from collections.abc import Awaitable, Callable as Callable, Coroutine
8
8
  from homeassistant.components.media_player import ATTR_MEDIA_ENQUEUE as ATTR_MEDIA_ENQUEUE, BrowseMedia as BrowseMedia, MediaPlayerEnqueue as MediaPlayerEnqueue, MediaPlayerEntity as MediaPlayerEntity, MediaPlayerEntityFeature as MediaPlayerEntityFeature, MediaPlayerState as MediaPlayerState, MediaType as MediaType, RepeatMode as RepeatMode
9
9
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
10
10
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
11
11
  from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
12
12
  from spotifyaio import Device as Device, Item as Item, PlaybackState as PlaybackState
13
- from typing import Any
13
+ from typing import Any, Concatenate
14
14
 
15
15
  _LOGGER: Incomplete
16
16
  SUPPORT_SPOTIFY: Incomplete
17
17
  REPEAT_MODE_MAPPING_TO_HA: Incomplete
18
18
  REPEAT_MODE_MAPPING_TO_SPOTIFY: Incomplete
19
+ AFTER_REQUEST_SLEEP: int
19
20
 
20
21
  async def async_setup_entry(hass: HomeAssistant, entry: SpotifyConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
21
22
  def ensure_item[_R](func: Callable[[SpotifyMediaPlayer, Item], _R]) -> Callable[[SpotifyMediaPlayer], _R | None]: ...
23
+ def async_refresh_after[_T: SpotifyEntity, **_P](func: Callable[Concatenate[_T, _P], Awaitable[None]]) -> Callable[Concatenate[_T, _P], Coroutine[Any, Any, None]]: ...
22
24
 
23
25
  class SpotifyMediaPlayer(SpotifyEntity, MediaPlayerEntity):
24
26
  _attr_media_image_remotely_accessible: bool
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: homeassistant-stubs
3
- Version: 2024.11.0b3
3
+ Version: 2024.11.0b4
4
4
  Summary: PEP 484 typing stubs for Home Assistant Core
5
5
  Project-URL: Homepage, https://github.com/KapJI/homeassistant-stubs
6
6
  Project-URL: Bug Tracker, https://github.com/KapJI/homeassistant-stubs/issues
@@ -18,7 +18,7 @@ Classifier: Topic :: Home Automation
18
18
  Classifier: Topic :: Software Development
19
19
  Classifier: Typing :: Typed
20
20
  Requires-Python: <3.14,>=3.12
21
- Requires-Dist: homeassistant==2024.11.0b3
21
+ Requires-Dist: homeassistant==2024.11.0b4
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  [![CI](https://github.com/KapJI/homeassistant-stubs/actions/workflows/ci.yaml/badge.svg)](https://github.com/KapJI/homeassistant-stubs/actions/workflows/ci.yaml)
@@ -548,7 +548,7 @@ homeassistant-stubs/components/cambridge_audio/entity.pyi,sha256=FBMzxk6dl5vuAtG
548
548
  homeassistant-stubs/components/cambridge_audio/media_player.pyi,sha256=VDtB5KTtAQfAv0XYnY0x8ZfLBDCQ0CpWnwBjCk-rBMY,3595
549
549
  homeassistant-stubs/components/cambridge_audio/select.pyi,sha256=ZO8Y5oLILG1U1ngzpEN9068XLzJfQTlwejH_RrK2mEo,2170
550
550
  homeassistant-stubs/components/cambridge_audio/switch.pyi,sha256=sAmWCY1931fk-LcOm8PuW9RXbYN9uvprKeUwopMNwtk,1879
551
- homeassistant-stubs/components/camera/__init__.pyi,sha256=Ru3XmzqZcanAgosf2dnitpXzKUaxlHwUkPWwrl5ouXE,12535
551
+ homeassistant-stubs/components/camera/__init__.pyi,sha256=JcXfufDnezh4ZwrJ_78zbWczq5fPZCCw3FIZqQLg1II,12608
552
552
  homeassistant-stubs/components/camera/const.pyi,sha256=iYrPzTgW3tqIQ2lHYxR8UcVkuVu1EqISsxCZuoHk5fI,1252
553
553
  homeassistant-stubs/components/camera/diagnostics.pyi,sha256=1MPbSgsu7iSIxA9MPr2XwpX8B8e-qyrPZ9Vq0mnDtYk,459
554
554
  homeassistant-stubs/components/camera/helper.pyi,sha256=ngc3mpX9Z2jOWNtzxoH9xKIW_-9C1QeZ-dFQ2fGg8E8,306
@@ -556,7 +556,7 @@ homeassistant-stubs/components/camera/img_util.pyi,sha256=rEWvDRbmNe8sYRCzqs9mGc
556
556
  homeassistant-stubs/components/camera/media_source.pyi,sha256=TSzIb36nNbaNsiVlPfHn6BtOuc7ppazFxXyivLqclec,1350
557
557
  homeassistant-stubs/components/camera/prefs.pyi,sha256=U94agOymP4IZ03V3PU3LOdbByMH0ZdWPoX4CRtJxEX0,1377
558
558
  homeassistant-stubs/components/camera/significant_change.pyi,sha256=jAQqTYLLfClGsTlFv9chopqShJ6bZQJqS7Fy84yRZ8c,265
559
- homeassistant-stubs/components/camera/webrtc.pyi,sha256=MB-g_lKS1cCECpjX6DbL_1-nVHwJLi8fvoXahGnaRGE,4519
559
+ homeassistant-stubs/components/camera/webrtc.pyi,sha256=pMMMN_LXVyG1B33_Eu_uTM2UKk_M98OsRC3qsOdc30k,4605
560
560
  homeassistant-stubs/components/canary/__init__.pyi,sha256=q-8u1Fbh-Qvx_iJO3Ql6nLg9OXc6jmftc72Apfdc3B4,1420
561
561
  homeassistant-stubs/components/canary/alarm_control_panel.pyi,sha256=YOBMFachY37IjxZsBh2qbXtL-V1P6SsqICnvllLEiTw,1750
562
562
  homeassistant-stubs/components/canary/camera.pyi,sha256=snwzZ1mNBGg9wfq7vq_sjp02ZIh7MH0kDPWe3iqPNIM,2474
@@ -1193,10 +1193,10 @@ homeassistant-stubs/components/glances/config_flow.pyi,sha256=9LFryGmnVNg15dQNth
1193
1193
  homeassistant-stubs/components/glances/const.pyi,sha256=bfttylfl1LkuE1doq8--8feKcQvBtgyt-lU59a6EUKg,155
1194
1194
  homeassistant-stubs/components/glances/coordinator.pyi,sha256=rht3P0VeXXngzYrFQer3jg1jH11lkz5k5frRAAwwhNQ,1009
1195
1195
  homeassistant-stubs/components/glances/sensor.pyi,sha256=lN9vtr3ZXfcHSifVyPCM-ZT9tXPg6awhpfQIyf5WX0Q,2453
1196
- homeassistant-stubs/components/go2rtc/__init__.pyi,sha256=Ugl9SEspuBVQ0u1RTp0fKlsSkMsv17evYs5afzVeSBw,2428
1196
+ homeassistant-stubs/components/go2rtc/__init__.pyi,sha256=LUPwFJRgguUGspIRgHTmuGBMXgKr9PHQkqGNEMQDgII,2510
1197
1197
  homeassistant-stubs/components/go2rtc/config_flow.pyi,sha256=vm2mv28c3EqTWnBZ44h9BsVeFA6HkwcGRrkH-BDe9dA,336
1198
- homeassistant-stubs/components/go2rtc/const.pyi,sha256=k5L4Y6c1Ogd-9RIT1PvM59B8Id_jgvzbF46sUsBt2uo,57
1199
- homeassistant-stubs/components/go2rtc/server.pyi,sha256=uyhjJMJA8LuOecbMGOtscHSTKW00tfi5XPp84nhE1_g,778
1198
+ homeassistant-stubs/components/go2rtc/const.pyi,sha256=YRpZuqxT616y_nBFFcS7akVdBNbAvbqULiReuGDCIzg,74
1199
+ homeassistant-stubs/components/go2rtc/server.pyi,sha256=DUCEr5YzuDaauUr2LQ04qI0-9qr-HpzL25K0_MpHv0A,1397
1200
1200
  homeassistant-stubs/components/goalzero/__init__.pyi,sha256=SewH2e3FxdXwaXOFXOr2DswVJMS2UzOHTk948U2P9eI,764
1201
1201
  homeassistant-stubs/components/goalzero/binary_sensor.pyi,sha256=XynzAbz3knRbNbeALSQT8Vkvj_u6VFtgmFvcMav1mdM,879
1202
1202
  homeassistant-stubs/components/goalzero/config_flow.pyi,sha256=Qe4AZ8GBXtQErAXYkrEdp_D0v1UlRqO-keyDpIx13KM,1083
@@ -2877,7 +2877,7 @@ homeassistant-stubs/components/spotify/const.pyi,sha256=GOw4vthI7eJAe4DJO1OrgoTa
2877
2877
  homeassistant-stubs/components/spotify/coordinator.pyi,sha256=zaZRGWilzTSQBFqjV3YB3XPgYuhsrMq2upsZwSD6Xok,1508
2878
2878
  homeassistant-stubs/components/spotify/diagnostics.pyi,sha256=o60XIOekBhj0Gsy7JUn_EfK2Oj-aRfrLhMPSr41Xrqc,268
2879
2879
  homeassistant-stubs/components/spotify/entity.pyi,sha256=CFCKXDGo1ql1i3J3qsM0TL1ywOzfPIV3eNzf6cVB138,534
2880
- homeassistant-stubs/components/spotify/media_player.pyi,sha256=BZkZHbsEqu3OG-ndUlSSAEy1bLjEReTrilTo9G8lM6Q,4097
2880
+ homeassistant-stubs/components/spotify/media_player.pyi,sha256=NJEH0NKQQUFEdmtiXHWeEU-iRriNJPXSL-e51YIhYYM,4325
2881
2881
  homeassistant-stubs/components/spotify/models.pyi,sha256=2Vrdk4u6nn0Gy0-uwHSNKMaUl60wUmOv4DHaeAGqnAg,540
2882
2882
  homeassistant-stubs/components/spotify/sensor.pyi,sha256=Up3ptvVBXsuNdWhrc2RGYTMph0QDbyyvVGCaKCBulzE,2027
2883
2883
  homeassistant-stubs/components/spotify/system_health.pyi,sha256=Ht4CAzjNxrifQmLgrpkzVKivDt0VIcGlYj7RiDh1PTw,352
@@ -3733,7 +3733,7 @@ homeassistant-stubs/util/yaml/dumper.pyi,sha256=uQjW0KuME-gXVWgYJLNLoRDwDzVhhhgg
3733
3733
  homeassistant-stubs/util/yaml/input.pyi,sha256=wuxpKYTXZL4MujFhqjHnRLv4VPYY6QPYd-Zji-Lz9Mo,383
3734
3734
  homeassistant-stubs/util/yaml/loader.pyi,sha256=QiGKfosJZpv3z8MePSrXiwF8SSxVnaHgMhYZQ351nBM,4692
3735
3735
  homeassistant-stubs/util/yaml/objects.pyi,sha256=YUlr0nf9ugzJT9J2YHaGV2fXu5opuyNvvHPqNW46m5I,707
3736
- homeassistant_stubs-2024.11.0b3.dist-info/METADATA,sha256=fAA1lOU1eNXrSwQP1fuzVY1QQusQZ07QLb9DZ38hueE,2958
3737
- homeassistant_stubs-2024.11.0b3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
3738
- homeassistant_stubs-2024.11.0b3.dist-info/licenses/LICENSE,sha256=_kHFjg-MAmJ-lXc7HiEjUzD3vZutVYKUVZZpAWcIuqo,1075
3739
- homeassistant_stubs-2024.11.0b3.dist-info/RECORD,,
3736
+ homeassistant_stubs-2024.11.0b4.dist-info/METADATA,sha256=IzRtZzn1l3KXqYiytzqGkWr9DD6WhXU5LKqciAlLYEU,2958
3737
+ homeassistant_stubs-2024.11.0b4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
3738
+ homeassistant_stubs-2024.11.0b4.dist-info/licenses/LICENSE,sha256=_kHFjg-MAmJ-lXc7HiEjUzD3vZutVYKUVZZpAWcIuqo,1075
3739
+ homeassistant_stubs-2024.11.0b4.dist-info/RECORD,,