homeassistant/components/nest/camera_sdm.py
async def stream_source(self) -> str | None:
        """Return the source of the stream."""
        if not self.supported_features & CameraEntityFeature.STREAM:
            return None
        if CameraLiveStreamTrait.NAME not in self._device.traits:
            return None
        trait = self._device.traits[CameraLiveStreamTrait.NAME]
        if StreamingProtocol.RTSP not in trait.supported_protocols:
            return None
        async with self._create_stream_url_lock:
            if not self._stream:
                _LOGGER.debug("Fetching stream url")
                try:
                    self._stream = await trait.generate_rtsp_stream()
                except ApiException as err:
                    raise HomeAssistantError(f"Nest API error: {err}") from err
                self._schedule_stream_refresh()
        assert self._stream
        if self._stream.expires_at < utcnow():
            _LOGGER.warning("Stream already expired")
        return self._stream.rtsp_stream_url
Return the source of the stream.
Return the source of the stream.
Return the source of the stream .
async def stream_source(self) -> str | None:
        if not self.supported_features & CameraEntityFeature.STREAM:
            return None
        if CameraLiveStreamTrait.NAME not in self._device.traits:
            return None
        trait = self._device.traits[CameraLiveStreamTrait.NAME]
        if StreamingProtocol.RTSP not in trait.supported_protocols:
            return None
        async with self._create_stream_url_lock:
            if not self._stream:
                _LOGGER.debug("Fetching stream url")
                try:
                    self._stream = await trait.generate_rtsp_stream()
                except ApiException as err:
                    raise HomeAssistantError(f"Nest API error: {err}") from err
                self._schedule_stream_refresh()
        assert self._stream
        if self._stream.expires_at < utcnow():
            _LOGGER.warning("Stream already expired")
        return self._stream.rtsp_stream_url
async def stream_source ( self ) -> str | None : if not self . supported_features & CameraEntityFeature . STREAM : return None if CameraLiveStreamTrait . NAME not in self . _device . traits : return None trait = self . _device . traits [ CameraLiveStreamTrait . NAME ] if StreamingProtocol . RTSP not in trait . supported_protocols : return None async with self . _create_stream_url_lock : if not self . _stream : _LOGGER . debug ( "Fetching stream url" ) try : self . _stream = await trait . generate_rtsp_stream ( ) except ApiException as err : raise HomeAssistantError ( f"Nest API error: {err}" ) from err self . _schedule_stream_refresh ( ) assert self . _stream if self . _stream . expires_at < utcnow ( ) : _LOGGER . warning ( "Stream already expired" ) return self . _stream . rtsp_stream_url
Return the source of the stream.
Return the source of the stream .
"""Return the source of the stream."""
self